The .
NET Platform
The .NET Framework
.NET Enterprise Servers
.NET My Services
Visual Studio .NET
Guy Ronen 2005
The Benefits of the .NET Framework
xml, soap, http, xslt, xpath, html, tcp
All functionality is available to every CLS language
Object Oriented, Namespaces, CTS, All objects, One string type (Unicode)
,
Cross-language class inheritance, Extensible/Modular design patterns
Win32 API
VB MFC/ATL ASP
.NET Framework
Guy Ronen 2005
The .NET Framework
VB.NET C# C++ Managed Extensions J#
XML Web Services ASP.NET Win Forms
ADO.NET Data, DB and XML
.NET Class Libraries and IDEs
CLR
(Common Language Runtime)
COM+
Message Active
(Transactions, Partitions, IIS WMI
Queuing Object Pooling) Directory
Win32
Guy Ronen 2005
Creating a .NET Assembly
csc /target:module
Source Code
Files Managed csc /target:exe
Creating Modules
.cs PE (foo.exe)
MSIL, .netmodule
.vb Metadata
.netmodule PE Header
Unmanaged Stub
Resource
Files .NET Assembly
Manifest
.wmv Linking Metadata
Foo.dll
MSIL
.html
Compiled
Resources
.gif
Compiling csc /target:library
Resources
Multiple managed modules,
source code files and resource files
are compiled to produce an assembly Guy Ronen 2005
Assembly Manifest
Name
A string which is the name of the assembly
by default: the same name of the file that contains it
Version
A four-numbers field in the format of Mj.Mi.Rev.Build
Major:
Radical changes to the application/assembly which are visible and relevant
to the user
(usually a major set of features that was added to the application and changes in its look-and-feel)
Minor:
Minor changes to the application/assembly which are visible and relevant to the user
(usually a minor set of features that was added to the application with no changes in its look-and-feel)
Revision:
Internal changes to the application/assembly which are not visible or directly relevant to the user
(usually some minor bug-fixes, security issues, performance improvements etc.)
Build:
Every change in the source code, even if only semantic changes, requires a re-build.
(usually changes due to code review and code refactoring which does not influence any code logic)
Guy Ronen 2005
Assembly Manifest
Locale
A string which represents the localization code of the
application/assembly
examples: en-US | he-IL | fr-FR
(defaults to null)
Public Key
The public key of a digitally signed assembly
Guy Ronen 2005
The CLR (Common Language Runtime)
Base Class Library Support
Thread Support COM Marshaler
Type Checker Exception Manager
Security Engine Garbage Collector
IL to Native Code Debug
Compilers Manager Engine
Class Loader
Assembly Loader
Guy Ronen 2005
The Process of Managed Execution
EXE Source Code
Compiler Files
PE Header
Manifest and .cs
Metadata Linker .vb
.NET
MSIL
Class
Libraries
Manifest Assembly Loader
Metadata
A class in an unloaded assembly
MSIL
Class Loader
A method in an unloaded class
private JIT Compiler
assemblies
Manifest
Metadata
machine Call to an
MSIL
uncompiled
Resources code
method
Execution
Runtime Engine (CLR)
Guy Ronen 2005
Hello C#.NET
All code resides in classes
The entry point of the program
Use static methods of Console class for console I/O
Primitives are objects and have methods (i.e. count.ToString())
Syntax and statements are C/C++ like
Guy Ronen 2005