DT Unit I Part 2
DT Unit I Part 2
NET Framework
.NET Enterprise Vision
Users
Any device,
Any place,
Any time
XML Web
Services
Integrate business
Authentication applications and
Scheduling processes
Notification
Back Office
Heterogeneous
application and
server
infrastructure
Customer Sales
ERP & Billing Service 2
So what is .NET?
• .NET is a platform that provides a standardized set of
services.
3
.NET Framework
• Programming model for .NET
4
The Core of .NET Framework: FCL & CLR
• Common Language Runtime
• Garbage collection
• Language integration
• Multiple versioning support (no more DLL hell!)
• Integrated security
5
.NET
Framework
Common Language Runtime
• CLR manages code execution at runtime
Operating System
6
Common Language Runtime
• Manages running code
• Threading
• Memory management
7
.NET Framework
Base Class Library
• Object-oriented collection of reusable types
Operating System
8
Base Class Libraray
• Includes a set of standard class libraries.
9
.NET Framework
Data Access Layer
• Access relational databases
Operating System
10
.NET Framework
ASP.NET & Windows Forms
• Create application’s front-end – Web-based user
interface, Windows GUI, Web services, …
Operating System
11
.NET Framework
Programming Languages
• Use your favorite language
Operating System
12
.NET Framework
Common Language Specification
C++ Common
C# VBLanguage
Perl Specification
J# …
ASP .NET Windows
Web Forms Web Services
Mobile Internet Toolkit
Forms
Operating System
13
.NET Framework
Visual Studio .NET
C++ C# VB Perl J# …
Operating System
14
Managed Code
• Code that targets the CLR is referred to as managed code
15
Multiple Language Support
IL (MSIL or CIL) – Intermediate Language
It is low-level (machine) language, but it is Object-oriented
16
Intermediate Language
• .NET languages are compiled to an Intermediate
Language (IL)
17
Example of MSIL Code
.method private hidebysig static void Main()
cil managed
{
.entrypoint
// Code size 11 (0xb)
.maxstack 8
IL_0000: ldstr "Hello, world!"
IL_0005: call void
[mscorlib]System.Console::WriteLine(string)
IL_000a: ret
} // end of method HelloWorld::Main
18
Common Type System (CTS)
• All .NET languages have the same primitive data types. An
int in C# is the same as an int in VB.NET
• Third-parties languages
• Perl, Python, Pascal, APL, COBOL, Eiffel, Haskell, ML,
Oberon, Scheme, Smalltalk…
20
C# Language – Example
using System;
class HelloWorld
{
public static void main()
{
Console.WriteLine(“Hello, world!”);
}
}
21
Code Compilation and Execution
Compilation
Also called
Source Language Code
Assembly
Code Compiler MSIL
Metadata (.EXE or
.DLL file)
Before
installation or
the first time
Execution each method is
called
Native JIT
Code Compiler
22
Assemblies
• DLL or EXE file
• Smallest deployable unit in the CLR
• Have unique version number
• No version conflicts (known as DLL hell)
• Contains IL code to be executed
• Security boundary – permissions are granted at the
assembly level
• Self-describing manifest – metadata that describes the
types in the assembly
23
Visual Studio .NET
• Integrate Development Environment (IDE) tool that contains
a rich set of features
• Supports managed and unmanaged applications
• Supports C#, C++, VB.NET, …
• Many useful tools and wizards
• Windows Forms Designer
• ASP.NET Web Forms Designer
• Web Services support
• SQL Server integration with ADO.NET and XML
• The .NET Framework SDK includes command line
compilers
24
Visual Studio .NET - Snapshot
25
ADO.NET and XML
• ADO.NET consumes all types of data
• XML (hierarchical), relational, etc.
26
VS.NET – DataSet Designer
27
Windows Forms
• Windows Forms is framework for building rich GUI applications
• RAD (Rapid Application Development)
• component-based
• event-driven
• ActiveX® Support
• Printing support
• Unicode support
• UI inheritance 28
Benefits of .NET Framework
2. Deployment
3. Reliability
4. Security
Deployment
•With features such as controlled code sharing, side-by-side
versioning, the .NET framework makes deployment easier
•The code execution environment supports safe code execution for
reduced conflicts in software deployment and versioning
Reliability
.NET performance on Microsoft® Windows Server™ and other
Windows Server families is also very stable and reliable.
30
Benefits of .NET Framework
Security
•Offers enhanced application security using various XML
configuration settings
•Managed code & CLR offers safeguard features such as role-
based security & code access security.
32
.NET Framework – Can you identify the
Components???
C++ C# VB Perl J# …
<<4>>
Windows
<<3>>
Forms
<<5>>
<<2>>
<<1>>
Operating System
33
Code Compilation and Execution -
Find
Compilation
Language <<2>>
VB.NET Compiler MSIL
<<3>>
<<1>>
Execution (<<5>>)
Native <<4>>
Code
34
Visual Studio
Installing Visual Studio .Net
34
.NET Framework – Resources
• .NET Framework Home Site –
http://msdn.microsoft.com/netframework/
• ASP.NET – http://www.asp.net/
35