.Net Framework
Introduction to .NET The .NET Platform Clients
Web Form Protocols: HTTP, HTML, XML, SOAP, UDDI
Your Internal Web Service
Applications
Web Service
.NET Framework Windows and Linux and…
.NET Foundation Web Services
Third-Party Web Services
Tools: Visual Studio.NET, Notepad
.NET Enterprise 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
…
ASP.NET: Web Services and Web Forms
Windows Forms
ADO.NET: Data and XML .NET Framework Base Classes
Visual Studio.NET
Common Language Specification
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 .NET language
csc.exe or vbc.exe
DLL or EXE
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 code
MSIL Ngen
Native code
VB
C#
C++
Compiler
Compiler
Compiler
Assembly
Assembly
Assembly
Common Language Runtime JIT Compiler
Managed Code CLR Services
Managed CLR Code
Managed Code
Unmanaged Code
Operating System Services
5
Common Language Runtime Services • Code management • Conversion of MSIL to native code • Loading and execution of managed code • Creation and management of metadata • Verification of type safety • Insertion and execution of security checks • Memory management and isolation
• Garbage collection • Handling exceptions across languages • Interoperation between .NET Framework objects and COM objects and Win32 DLLs • Automation of object layout for late binding • Developer services (profiling, debugging, etc.)
Windows Forms • Framework for building rich clients • Built upon .NET Framework, languages • Rapid Application Development (RAD) • Visual inheritance • Anchoring and docking • Rich set of controls
• Extensible controls • Data-aware • Easily hooked into Web Services • ActiveX support • Licensing support • Printing support • Advanced graphics
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