ebook img

.NET Framework - Warsaw University of Technology PDF

48 Pages·2006·0.26 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview .NET Framework - Warsaw University of Technology

Advanced Windows Programming .NET Framework basedon: A. Troelsen, Pro C# 2005 and.NET 2.0 Platform, 3rd Ed., 2005, Apress J. Richter, Applied.NET FrameworksProgramming, 2002, MS Press D. Watkinset al., Programminginthe.NET Environment, 2002, AddisonWesley T. Thai, H. Lam, .NET FrameworkEssentials, 2001, O’Reilly D. Beyer, C# COM+ Programming, M&TBooks, 2001, chapter1 Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -2 Contents (cid:132) The most important features of .NET (cid:132) Assemblies (cid:132) Metadata (cid:132) Common Type System (cid:132) Common Intermediate Language (cid:132) Common Language Runtime (cid:132) Deploying .NET Runtime (cid:132) Garbage Collection (cid:132) Serialization Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -3 .NET Benefits In comparison with previous Microsoft’s technologies: (cid:132) Consistent programming model – common OO programming model (cid:132) Simplified programming model – no error codes, GUIDs, IUnknown, etc. (cid:132) Run once, run always – no "DLL hell" (cid:132) Simplified deployment – easy to use installation projects (cid:132) Wide platform reach (cid:132) Programming language integration (cid:132) Simplified code reuse (cid:132) Automatic memory management (garbage collection) (cid:132) Type-safe verification (cid:132) Rich debugging support – CLR debugging, language independent (cid:132) Consistent method failure paradigm – exceptions (cid:132) Security – code access security (cid:132) Interoperability – using existing COM components, calling Win32 functions Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -4 Base Class Libraries (cid:132) Classes available to all .NET Framework languages (cid:132) Various primitives: (cid:132) threads, file input/output, graphical rendering, interaction with external hardware devices (cid:132) database access, XML manipulation, security Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -5 .NET Programming Languages (cid:132) http://www.dotnetpowered.com/languages.aspx (cid:132) Examples: (cid:132) C# (cid:132) Managed Extensions for C++ (cid:132) Java - Visual J# .NET (cid:132) JavaScript - JScript .NET (cid:132) Perl (cid:132) Pascal, Delphi (cid:132) PHP (cid:132) Smalltalk Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -6 .NET Assemblies (cid:132) Binaries containing Common Intermediate Language (CIL) instructions and type metadata (cid:132) .dll or .exe files, which cannot be run without the .NET runtime (cid:132) The most important features: (cid:132) establishing a type boundary (cid:132) versioning (cid:132) self-describing (cid:132) configurable Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -7 .NET Assembly’s Format (cid:132) .NET assembly consists of the following elements: (cid:132) Win32 File Header (cid:132) CLR File Header (cid:132) CIL code (cid:132) type metadata (cid:132) assembly manifest (cid:132) optional embedded resource Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -8 Single-File and Multifile Assemblies (cid:132) In a great number of cases, there is a simple one-to-one correspondence between a .NET assembly and the binary file (.dll or .exe) (cid:132) this is single-file assembly (cid:132) Multifile assemblies are composed of numerous .NET binaries (modules) (cid:132) one of these modules (primary module) must contain the assembly manifest (cid:132) multifile assemblies allow to use more flexible deployment option (e.g. the user is forced to download only selected modules) Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -9 Private Assemblies (cid:132) Private assemblies are required to be located in application’s directory or subdirectory (cid:132) Identification of a private assembly: (cid:132) name of the module that contains the assembly’s manifest (without an extension) (cid:132) version number (cid:132) Probing – the process of mapping an external assembly request to the location of the requested binary file Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow AdvancedWindows Programming .NET Framework -10 Shared Assemblies (cid:132) Single copy of a shared assembly can be used by several applications on a single machine (cid:132) A shared assembly should be installed into the Global Assembly Cache (GAC), located in Assembly subdirectory of Windows directory (cid:132) since VS 2005 also *.exe files can be installed into the GAC (previously only *.dll files were accepted) (cid:132) To list content of the GAC, install a new assembly, or uninstall an assembly, use gacutil.exe utility (cid:132) installing an assembly: gacutil.exe –i MyAssembly.dll (cid:132) Two or more assemblies of the same name can coexist in the GAC (must have different versions) (cid:132) the end of "DLL hell" Krzysztof Mossakowski FacultyofMathematicsandInformationScience http://www.mini.pw.edu.pl/~mossakow

Description:
.NET Framework basedon: A. Troelsen, Pro C# 2005 and.NET 2.0 Platform, 3rd Ed., 2005, Apress J. Richter, Applied.NET FrameworksProgramming, 2002, MS Press
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.