asp.net session 1

19
.NET Framework Session 1

Upload: sisir-ghosh

Post on 13-Jan-2015

329 views

Category:

Technology


1 download

DESCRIPTION

 

TRANSCRIPT

Page 1: ASP.NET Session 1

.NET Framework

Session 1

Page 2: ASP.NET 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

Page 3: ASP.NET Session 1

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.

Page 4: ASP.NET Session 1

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.)

Page 5: ASP.NET Session 1

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

Page 6: ASP.NET Session 1

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.

Page 7: ASP.NET Session 1

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

Page 8: ASP.NET Session 1

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 .

Page 9: ASP.NET Session 1

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

Page 10: ASP.NET Session 1

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

Page 11: ASP.NET Session 1

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.

Page 12: ASP.NET Session 1

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.

Page 13: ASP.NET Session 1

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

Page 14: ASP.NET Session 1

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.

Page 15: ASP.NET Session 1

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#.

Page 16: ASP.NET Session 1

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#.

Page 17: ASP.NET Session 1

.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).

Page 18: ASP.NET Session 1

.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

Page 19: ASP.NET Session 1

Summary

• .NET Framework.

• .NET Classes.

• Common Language Runtime.