The .NET Framework is Microsoft's platform for building and running applications and web services. It includes the Common Language Runtime (CLR) which manages memory and executes code, the Common Type System (CTS) which defines supported data types, and a class library. The CLR allows applications written in multiple languages like C# and VB.NET to run on different operating systems. Key benefits include integration of web services, platform independence, and language independence.
2. What is .NET?
• Microsoft’s “vision” or marketing strategy, as well as
new technologies
• A brand applied to a new technology
• Most significant new technologies
– Common Language Runtime (CLR)
– Common Language Infrastructure (CLI)
– Web Services
• Dawn of a new era of computing?
3. Benefits
• Better integration of web services
• Platform, that is OS independent
• Language independence
– Programming in your choice of language
• Sophisticated Base layer, - the “framework“
• Improves reliability, scalability, performance,
and security
4. The .NET Framework
• Windows “Standard” .NET Framework
• Embedded Compact .NET Framework
• .NET Framework class library
• Common Language Runtime (CLR)
5. Framework Principle
.NET Framework
Applications
Platform Specific Class Libs
Base Class Libs
Execution Engine (MSCOREE.DLL)
Platform Adaptation Layer
Host Operating System
6. Framework Blueprint
.NET Framework
.Net Compliant Language
Windows Forms,
(VC, VB.NET, ASP.NET,
Web Forms,
C#, JS.NET, J#
Web Services
others 3rd party)
.NET Framework Base Classes
(ADO.NET, XML, Threading, Diagnostics, IO, Net,
Secutity etc.
Common Language Runtime
(Memory Management, Common Type System,
Lifecycle Monitoring)
7. The .NET Class Library
• Object-oriented collection of reusable classes
• “System” namespace
– All Framework classes
• Accessible by a .NET language
• Includes:
– Database, rendering, file access & IO, diagnostics,
object collections
– Security, Reflection, Threading and Eventing
8. The .NET Class Library
• Some Core types:
– Char
– Boolean
– Int16
– Array
• Also:
– Console
– Math
– GC (Garbage Collection)
9. Common Language Runtime
(CLR)
• Manages memory
• Thread execution
• Code execution
• Type safety verification
• Lifespan / Lifetime Management
• Compilation (Just In-time Compiler)
10. Common Language
Infrastructure (CLI)
• Subset of the CLR submitted to ECMA
standards organization
• Submitted for standardization:
– C#
– Semantics for metadata
– Microsoft Intermediate Language (MSIL)
– Parts of the .NET framework class library
11. Common Type System (CTS)
• A single type system shared by compilers,
tools and the CLR
• Common type support for different languages
• Types
– Reference (heap allocation)
– Value (stack allocation)
12. Common Language
Specification (CLS)
• Comprises a subset of CTS
• A programming language must support CLS
– For compliance with the .NET Framework
• Contract:
– between language designers and the .NET
Framework
13. Managed Code
• Software written for the CLR is referred to as
managed code
• Most significant concepts in managed code:
– Assemblies
– Microsoft Intermediate Language (MSIL)
14. Assemblies
• code libraries compiled for CLR
• make up a logical unit of functionality
• Eases deployment, versioning and security.
• A scheme for organizing code compiled for the CLR
• Manifest describes dependencies, versions, scope
• Contains Microsoft Intermediate Language (MSIL)
15. The Microsoft Intermediate
Language (MSIL)
• Intermediate code that runs in the CLR
• Not a machine specific binary but an
intermediate machine code representation
• Must be converted by a .NET Framework:
– just-in-time (JIT) compiler translates to native code
16. MSIL Tools
• MSIL Assembler (Ilasm.exe)
– Generates executable from MSIL
• MSIL Disassembler (Ildasm.exe)
– Creates MSIL code from executable
• Native Image Generator Tool (Ngen.exe)
– Compiles MSIL to machine code in lieu of JIT
compiler
17. MSIL “Hello World”
• Assembler directives begin with a period
• MSIL Instructions lines: 8, 9 and 10
1. /* this is an MSIL comment */
2. .assembly extern mscorlib {}
3. .assembly hello {}
4. .method static public void main() il managed
5. {
6. .entrypoint
7. .maxstack 1
8. ldstr "Hello world!"
9. call void [mscorlib]System.Console::WriteLine(class System.String)
10. ret
11. }
18. .NET Languages
• The CLR was designed to support multiple
languages:
– C#
– VB
– C++
– J#
– -…
19. C#
• Fully tailored to .NET
• Twice as comprehensive as of C++
• C++ scope available via virtual declaration
• Powerful COM-InterOp
• Programmer decides when to use Managed
Envionment and when not:
– Shallow learning curve
20. Web Technologies
• The .Net XML Web services are distributed, server-
side applications
• XML Web services built on industry standards
– XML
– WSDL
– SOAP
– UDDI
– WSDL
21. XML
• XML provides a way to describe information in
a structured format
• Tag based <….> content </…>
• Attributes, values, rules…
• Document trees and hierarchies via “nesting”
• Supported by the World Wide Web Consortium
(W3C)
22. WSDL
• XML based language used to define Web
services interfaces
• Similar to IDL for COM and CORBA (Common
Object Request Broker Architecture)
23. SOAP
• Provides an XML envelope for data exchange in
distributed networks
• Message consists of three parts:
– Envelope that defines a framework for describing what is in a
message and how to process it
– Encoding rules for expressing instances of application-
defined data types
– Convention for representing remote procedure calls (RPCs)
and responses
24. UDDI
• Umbrella organization of businesses
• Goal: expose web services through a registry
• The Registry is itself a web service
– provides information about other web services
– provides information about integration
25. Open Standards
• CLI, C# submitted to ECMA standards
organization
• Open source implementations of the .NET
Development Framework and C#
– Mono project by Ximian
– The GNU open source organization
26. Resources
•Based upon: Eric Landry, Microsoft .NET
Framework Overview, A Presentation
•UDDI Homepage
•http://www.uddi.org/
•EMCA filing of CLI and C#
•http://www.ecma.ch/ecma1/STAND/ecma-
335.htm