asp.net session 1
DESCRIPTION
TRANSCRIPT
.NET Framework
Session 1
Objectives
1. .NET Framework architecture.
2. C# vs Java.
3. .NET Framework component.
4. Advantages of .NET Framework .
5. Framework Classes.
6. CLR
What is .NET framework .NET is a new technology for building modern application that can be executed in any modern operating system and modern devices like PCs,servers,palm-tops etc.
.NET is the Microsoft services strategy to connect information, people, systems, and devices through software. Integrated across the Microsoft platform, .NET technology provides the ability to quickly build, deploy, manage, and use connected, security-enhanced solutions.
The .NET Framework has been designed so that it can be used from any language, including C# as well as C++, Visual Basic, JScript, and even older languages such as COBOL.
(.NET is platform independent. As of now it can work on Windows and Linux OS because MS has launched only two JIT(Just In Time) compilers one for each OS. If MS launches JIT compilers for other OS’s it will be able to run in them too.)
It provides complete environment to developers for developing
1)Windows application
2)Web application(ASP.NET)
3) Web Services
4)Console application
5)Class libraries
The key features of .NET framework are:
A) Base Class Library:- The base class library of .NET framework contains rich collection of classes that are available to developer for codes.
B)Common Language Runtime:- It is heart of .NET framework. .NET framework provides a runtime environment called the Common Language Runtime or CLR.(Similar to JVM in Java).
C)Class Loader:-class loader is component of .NET framework's runtime which loads the classes from class library as required by MSIL.
CLR(Common Language Runtime)
• CLR provides some functionality, such as a)Memory management
b) exception handling c)Debugging d)Security e)Thread execution f)Code execution g)Code safety h)Code verification & Compilation
Managed & Unmanaged Code• Managed code is the code that is executed
directly by the CLR.Therefore,the application that are created using managed code automatically have CLR services, such as code access security(CAS) & automatic garbage collection. The CLR compiles the application to Intermediate Language(IL) code not machine code .
CLR perform to execute a piece of Managed Code
• 1)Selecting a language compiler: Select programming language
• 2)Compiling the code to IL code: converting source code to IL code, language independent
• 3)Compiling IL code to native code: using JIT Compiler
• 4)Executing the code: Require result
The CLR converts CIL to native code
Source Code
C#.Net
VB.Net
Other .Net Language
Byte Code Native Code
CIL CodeNative Code
C# Compiler
VB.Net Compiler
Other Compiler
JIT
Unmanaged Code
Unmanaged code directly compiles to machine code and runs on the machine where it has compiled.
It does not have services,such as code access security(CAS) & memory management which are provided by the runtime.
D) Assemblies: Assemblies are the fundamental units of deployment, version name, securities permissions etc.
An assemblies is a .NET executable program or unit of deployment like EXE or DLL that delivered as a single unit.
When you build a C# windows or console application, the .exe file produced is an assembly.
If you build a class library the DLL file produced is also an assembly.
Multiple versions can be deployed side by side in different folders.
These different version can be executed at the same time without interfering with each other.
CLR Execution ModelVBSource
codeCompiler
C++C#
CompilerCompiler
AssemblyIL Code
AssemblyIL Code
AssemblyIL Code
Operating System Services
Common Language Runtime
JIT Compiler
Native Code
Managedcode
UnmanagedComponent
Life as a Visual Basic 6.0 Programmer
VB6 is popular due to its ability to build complex user interfaces, code libraries (e.g., COM servers), and data access logic with minimal headache.
Down back of VB6
• VB6 is that it is not a fully object-oriented language.• For example, VB6 does not allow the programmer to
establish classical inheritance.
C# Vs JAVA
C# provides greater expressiveness & writes performance critical code .
Operator Overloading is possible in C#, but not in JAVA.
JAVA runs on any machine with JVM, whereas C# on CLR.
Applets in JAVA, similar to Web Forms/Win Forms in C#.
C# Vs JAVA
In JAVA, the “lang” package is automatically
imported, whereas in C# you have to explicitly
specify “ Using System”.
There is no partial class concept in JAVA,but it
is present in C#.
.NET Framework component
A runtime environment, called the "Common Language Runtime" (CLR) that handles memory allocation, error trapping, and security features.
A set of extensive Framework class libraries, written from the ground up that comprise practically any functionality .
Two top-level development, for web applications (ASP.NET) and regular Windows applications (Windows Forms).
.NET Framework ClassesBy Anil Kum
ar
System.Data
DesignOLEDB
SQLTypesSQL
System
GlobalizationDiagnosticsConfigurationCollections
ResourcesReflectionNetIO
ThreadingTextServiceProcessSecurity Runtime
InteropServicesRemotingSerialization
System.Xml
XPathXSLT Serialization
System.Web
Configuration SessionStateCaching Security
ServicesDescriptionDiscoveryProtocols
UIHtmlControls
WebControls
System.Drawing
ImagingDrawing2D
TextPrinting
System.Windows.FormsForm Button
MessageBox ListControl
Summary
• .NET Framework.
• .NET Classes.
• Common Language Runtime.