You are on page 1of 8

.

Net Framework

Introduction to .NET
The .NET Platform
Clients Applications

Web Form Web Service

Protocols: HTTP, .NET Framework Tools:
HTML, XML, Visual Studio.NET,
SOAP, UDDI Notepad
Windows and Linux and…

Your Internal .NET Foundation Third-Party .NET Enterprise
Web Service Web Services Web Services Servers

1
The .NET Framework
What Is the .NET Framework?
• A set of technologies for developing and using
components to create:
– web forms
– web services
– windows applications
• Supports the software lifecycle
– development
– debugging
– deployment
– maintenance

The .NET Framework
The .NET Framework and Visual Studio.NET

VB C++ C# JScript …
Visual Studio.NET

Common Language Specification
ASP.NET: Web Services Windows
and Web Forms Forms
ADO.NET: Data and XML

.NET Framework Base Classes

Common Language Runtime

2
Common Language Runtime
Program written in any .NET supported language
C#, VB.NET, etc.

compile

Intermediate Language (IL) - like Java bytecode
(.exe or .dll)

Common Language Runtime
Loads and executes code, garbage collects etc

Common Language Runtime
Compilation

Source Code Assembly

Compiler
C++, C#, VB or any csc.exe or vbc.exe DLL or EXE
.NET language

3
Intermediate Language (IL)
• .NET languages are not compiled to machine code.
They are compiled to an Intermediate Language (IL).

• CLR accepts the IL code and recompiles it to
machine code. The recompilation is just-in-time (JIT)
meaning it is done as soon as a function or
subroutine is called.

• The JIT code stays in memory for subsequent calls.
In cases where there is not enough memory it is
discarded thus making JIT process interpretive.

Common Language Runtime
Assemblies
• Assembly
– logical unit of deployment
– contains manifest, metadata, MSIL and resources
• Manifest
– metadata about the components in an assembly
(version, types, dependencies, etc.)
• Type metadata
– completely describes all types defined in
an assembly: properties, methods, arguments, return
values, attributes, base classes, …

4
Common Language Runtime
Assemblies

• Microsoft Intermediate Language
– MSIL or IL
– all languages compile to IL (managed code)
– IL is always compiled to native code before
being executed
• Resources
– data, images, audio, etc.

Common Language Runtime
Execution Model
Source
VB C# C++
code
Compiler Compiler Compiler

MSIL Assembly Assembly Assembly

Ngen Common Language Runtime JIT Compiler

Native Managed Managed Managed Unmanaged
code Code CLR
Code Code Code
CLR Services

Operating System Services

5
Common Language Runtime
Services
• Code management • Garbage collection
• Conversion of MSIL to • Handling exceptions
native code across languages
• Loading and execution of • Interoperation between
managed code .NET Framework objects
• Creation and and COM objects and
management of metadata Win32 DLLs
• Verification of type safety • Automation of object
• Insertion and execution of layout for late binding
security checks • Developer services
• Memory management (profiling, debugging, etc.)
and isolation

Windows Forms
• Framework for building • Extensible controls
rich clients • Data-aware
• Built upon .NET • Easily hooked into
Framework, languages Web Services
• Rapid Application • ActiveX support
Development (RAD) • Licensing support
• Visual inheritance • Printing support
• Anchoring and docking • Advanced graphics
• Rich set of controls

6
Web Forms
• Built with ASP.NET
– logical evolution of ASP
– similar development model: edit the page and go
• Requires less code
– actually more code but less programming
• New programming model
– event-driven/server-side controls
– rich controls (e.g. data grid, validation)
– data binding
– controls generate browser-specific code

Web Forms
• Allows separation of UI and business logic
– separation of concerns is a good thing
– cleaner, more maintainable code
• Uses .NET languages
– not just scripting
• Easy to use components
• Simple configuration (XML-based)

7
More Resources
.NET
– http://www.microsoft.com/net/
– http://msdn.microsoft.com/net/
– http://www.gotdotnet.com
– msnews.microsoft.com news server
• microsoft.public.dotnet.general newsgroup

8