1960s-1970s: J. Iliffe “The Principles of the Base Machine”; U.S. Burroughs B6700/B7700 – initiated the idea of multi-language programming support
1979-1982. Multi-processor super-computers “Elbrus-1” and “Elbrus-2” (Russia) with high-level languages hardware support and multi-language programming system based on procedural languages: EL-76, Pascal, FORTRAN, COBOL, PL/1 etc. (all in all > 20 languages implemented)
14 trang |
Chia sẻ: vietpd | Lượt xem: 1578 | Lượt tải: 0
Bạn đang xem nội dung tài liệu Bài giảng Microsoft.NET architecture and the C# language, để tải tài liệu về máy bạn click vào nút DOWNLOAD ở trên
Microsoft.NET architectureand the C# languageLecture 1 Vladimir O. Safonov, Professor of computer science, Head of laboratory, St. Petersburg University, Russia Email: v_o_safonov@mail.ru References Platt D. Introducing Microsoft.NET. - MS Press, 2001 Richter J. Applied Microsoft.NET Framework Programming. – MS Press, 2002. Prosise D. Programming for Microsoft.NET. –MS Press, 2002. Reilly D. J. Designing ASP.NET Applications. – MS Press, 2002. Petzold Ch. Programming for Microsoft Windows in C# (Vol. 1-2). MS Press, 2002. 6. Mayoh J. C#: The Art of Programming. The Encyclopedia of a Programmer, 2002 7. Short S. XML Web Services Development with Microsoft.NET - 2003 8. Franklin K. VB.NET for developers. - 2002 9. Some kinds of up-to-date software development tasks Client-server systems Internet (Web) applications Integrated solutions Embedded systems Mobile intelligent devices software Wearable computers software Characteristic features of large software systems of XXI century Internet, WWW, and Intranet - awareness Universal representation of software models (UML) and data (XML) Enhanced requirements to security and reliability Integration of various programming languages and tools, databases, knowledge bases and networking tools into a single infrastructure Design and development of reusable software components Modern software development platforms Java (Sun Microsystems, 1995-1998) – a platform for software development in Java object-oriented language, compiled into Java bytecode (still in the status of Sun proprietary standard) .NET (Microsoft, 2000) – a multi-language object-oriented software development platform with a common intermediate language (CIL), common language infrastructure (CLI), and a common data representation based on XML (ISO/ ECMA standards). The C# language is the most comfortable for .NET but not the only one and not mandatory Some hints of history 1960s-1970s: J. Iliffe “The Principles of the Base Machine”; U.S. Burroughs B6700/B7700 – initiated the idea of multi-language programming support 1979-1982. Multi-processor super-computers “Elbrus-1” and “Elbrus-2” (Russia) with high-level languages hardware support and multi-language programming system based on procedural languages: EL-76, Pascal, FORTRAN, COBOL, PL/1 etc. (all in all > 20 languages implemented) Stack-based instruction set: A+B -> VAL А; VAL В; ADD Actually the above set used as IR: hardware support of JIT compilation into three-address register instruction set Extended object code file = the object code itself (postfix notation) + its extension (unified-format tables contained identifier definitions and program structure information) References: V.Safonov. Programming languages and techniqques for the “Elbrus” System.- Moscow, “Science” Publishing Co., 1989, in Russian, 400 pp. Microsoft .NET software tools Microsoft.NET Framework SDK - the basic command line interface tool accessible via Web for free; integrated with the latest Windows 2003 Server OS Microsoft Visual Studio .NET (the other names - Microsoft Visual Studio 7.0 or 7.1) – a powerful integrated development environment (IDE) for .NET; includes C#.NET, VB.NET, C++.NET, JScript.NET and J#.NET languages Now there are more that 20 languages already implemented for .NET, including Oberon and Eiffel object-oriented programming languages; ML functional programming language, etc. Shared Source Common Language Infrastructure (SSCLI, a.k.a. Rotor) is a non-commercial use shared source version of .NET running on Windows 2000/XP/2003, UNIX FreeBSD and MacOS) General ideas and principles of .NET A compiler from any language (e.g., C# or VB) compiles an application into a common for all languages intermediate format - CIL (Common Intermediate Language, also referred to as MS IL – Microsoft Intermediate Language); Besides the CIL code, the compiler also generates metadata – a common for all languages information on the types and named entities (classes, methods, fields, etc.) defined and used in the application; CIL + metadata + manifest = PE file (Portable Executable); in general, an assembly consisting of one or more PE files At runtime, the CIL code is dynamically compiled (on-the-fly) into a concrete target platform’s native code (x86, Macintosh, IA-64, etc.) by a Just-in-Time (JIT) compiler All the data exchanged via Internet/Intranet, and all configuration files are represented in XML format The advantages of .NET approach .NET Portable Executable (PE) files generated by .NET compilers, and the data in the XML format can be transferred via Internet (e.g., over HTTP protocol) and be JIT compiled or interpreted on client side hosts Metadata enable managed-code (mode) execution, with runtime type-checking, runtime security checking, etc. A software developer can develop her application in any language implemented for .NET and comfortable with her, and include into her application any modules developed in other languages also implemented for .NET Basic notions and acronyms used for .NET .NET – a common runtime infrastructure complying to appropriate ISO/ECMA standards; e.g.: Microsoft.NET (running on Windows 2000/XP/2003); SSCLI (Rotor) running on Windows 2000/XP/2003, UNIX FreeBSD, MacOS) CLI (Common Language Infrastructure) – an ECMA standard to implement the .NET common infrastructure for all languages CTS (Common Type System) – the common type system for .NET (ISO/ECMA standard) CLR (Common Language Runtime) – the common runtime environment for .NET - a library consisting of thousands of classes (ISO/ECMA standard) CIL (MS IL) – the common intermediate language for .NET based on postfix (reverse Polish) notation Basic notions and acronyms used for .NET(continued) Metadata – a common (table-based) representation of information on the types and the named entities defined and used in an application Manifest – contents (inventory) of an assembly, in particular, of a PE file representing an assembly PE (Portable Executable) – the file to contain CIL code, metadata, resources and manifest Assembly – a representation of an application in a form of a PE file or a set of PE files, generated by a .NET compiler Comparison of .NET and Java 2 platforms .NET – multi-language programming; Java 2 – programming in Java only (in Java modules written in other languages play a kind of subordinate part as native methods; primarily in C/C++) .NET – a universal type system and universal data representation; in Java 2 everything is Java-oriented only Java and C# languages: no doubt, C# has taken everything useful from Java, but it contains a lot of additional comfortable features lacking in Java (properties, indexers, attributes aliases, extra kinds of statements, etc.) Resume: both platforms are very interesting and worth studying, but it’s the .NET platform that’s the future .NET is the platform of the next decade (Microsoft) Homework for the lecture 1 Please download and install on your computer the .NET Framework SDK 1.1 (requirements to OS: Windows 2000/XP; size – approx. 130 MB); if you’re running Win 2003 Server the .NET Framework should already be installed with the OS. Run a number of simple examples in C# from J. Prosise’s book Please try to make a comparative assessment of Java 2 and Microsoft.NET Q & A Questions and answers