Você está na página 1de 23

.

NET

".NET is a framework Is a layer between the operating system and the programming language. It supports many programming languages, including VB.NET, C# etc. .NET provides a common set of class libraries, which can be accessed from any .NET based programming language. There will not be separate set of classes and libraries for each language. If you know any one .NET language, you can write code in any .NET language!! .NET is Microsoft's new Internet and Web strategy .

Visual Studio.NET ?

VS.NET is just an editor, provided by Microsoft to help developers write .NET programs easily. VS.NET editor automatically generates lot of code, allows developers to drag and drop controls to a form, provide short cuts to compile and build the application etc.

DOT NET FRAMEWORK


.Net

Framework should be loaded on server. It is a software written in Perl language. It is a framework where application runs. It should be installed only on Microsoft Operating System.

ASP. Net is part of the Microsoft .Net Framework. The .Net Framework consists of 2 parts: 1.Framework Class Library 2.Common Language Runtime

Framework Class Library


The .Net Framework contains thousands of classes . The .Net Framework contains almost 13000 classes you can use when building applications. Each class in the framework can include properties, methods and events.

Namespaces

1. 2.

Microsoft divided the classes in the framework into separate namespaces. A namespace is simply a category. for e.g.:namespace for all file system classes is System.IO. All classes for working a Microsoft sql server database are located in the System.Data.Sqlclient namespace. Before using a class in a page, we must indicate the namespace associated with the class. Namespaces are recognized by symbols. It includes empty curly brackets { } before it.

Ways to include namespace


1. Specify a namespace each and every time you use a class like:System.IO.File.Exists(SomeFile.txt) 2. You can add an <%import %> directive to a page to import a particular namespace. Like: to use SMTP client class, we have to include import the following namespace: %@Import Namespace=System.Net.Mail % After you import a particular namespace, we can use all the classes in that namespace. 3.If we want to use the same namespace on multiple pages ,then we can add that namespace in web config file like:

<configuration> <System. web> <pages> <namespace> <add namespace=system.Net.Mail/> </namespace> </pages> </system. web> </configuration>

Assemblies

An assembly is the actual .dll file on your hard drive where the classes in the .Net Framework are stored. All the classes in ASP. Net Framework are located in an assembly named System.Web.Dll

2)COMMON LANGUAGE RUNTIME The common language runtime is responsible for executing your application code . When you write your application for the .Net framework with a language such as c# or visual basic.net,source code is never compiled directly into machine code. Instead the c# or visual basic compiler converts your code into a special language named MSIL(Microsoft intermediate language). MSIL is a low level and platform independent language. When application actually executes, the MSIL code is just in time compiled into machine code by the JITTER(Just inTime compiler). Normally entire application is not compiled from MSIL into machine code.Instead,only the methods that are actually called during execution are compiled. .Net framework understands only one language:MSIL. We can write applications using any one of different languages for the .NET framework because the .Net framework includes compilers for these languages that enable us to compile our code into MSIL.

Types Of Jitter

Pre- Jit Ecno-Jit Normal-Jit

What does it mean by managed code?

By managed code, it means that the complete life cycle and execution is managed by the .NET Common Language Runtime (CLR). The .NET CLR manages the memory on behalf of the managed code, performs garbage collection on the managed heap, perform assembly validation and assembly (component) resolution on behalf of the program. The CLR also maintains the security constraints applied to the managed code.

Features Of Dot Net Framework

Interoperability- The ability of two or more systems or components to exchange information and to use the information that has been exchanged.. Common Language Runtime- The Common Language Runtime (CLR) is the virtual machine component of the .NET framework. All .NET programs execute under the supervision of the CLR, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling. Security -.NET provides a common security model for all applications

Features(cont..)

3) Language Independence The .NET Framework introduces a Common Type System, or CTS. The CTS specification defines all possible data types and programming constructs supported by the CLR and how they may or may not interact with each other. Because of this feature, the .NET Framework supports the exchange of instances of types between programs written in any of the .NET languages (I): CTS- It is intended to allow programs written in different programming languages to easily share information.

4) Base Class Library The Base Class Library (BCL), part of the Framework Class Library (FCL), is a library of functionality available to all languages using the .NET Framework. The BCL provides classes which encapsulate a number of common functions

ASP. Net

ASP.NET is the name of the Microsoft technology used for web site development. ASP.NET is NOT a programming language like C# or VB.NET ASP.NET development requires a programming language like C# or VB.NET to write code. ASP stands for Active Server Pages. There are several other technologies exist for web development (E.g.: PHP). ASP.NET is the technology from Microsoft and it is the widely used one. ASP.NET technology comes with a rich set of components and controls that make the web development very easy. Visual Studio .NET is the editor from Microsoft which helps you develop ASP.NET web sites faster and easily.

Requirements
You need the following: Windows Server 2003, Windows Server 2008, Windows 2000, Windows XP, or Windows Vista Visual Studio 2008 (this will install the .NET Framework 3.5) SQL Server 2000, 2005, or 2008 Asp.Net Dev server. It supports the file system.

Partial Classes

Partial classes enable you to separate your classes into multiple class files, which are then combined into a single class when the application is compiled You are presented with only the pieces of the class that you need. In Asp.net 1.1,that code was also included in the page which was used by only the compiler. But Now that code presents but not visible. That code is present in another class.

.Net application Execution Steps:

.Net architecture contains a new layer called CLR, without this layer any .Net application can not be executed. Following are the steps involved in a program execution.

C# code
C# Compiler

MSIL CODE
JITTER CLR

NATIVE CODE

PROCESSOR

In-Place Compilation
It is a default Mode.It means single file compilation at runtime. Suppose we have 4 pages A,B,C,D.If a page will send the request for compilation ,it will compile that page. Disadvantages Source code required Advantages It is useful on those sites,where changes take place daily. If we are making any change on any page,it will not stop the work of website.

Site-Pre-Compilation

It compiles the whole site in advance.For compiling the whole site in advance ,we use Asp.net_compiler.In this case, we dont require to give the source code . This compiler makes individual compile files for every individual pages. Name of every compiled file is same for first 2 words that is App_web after that it can take any name. Drawback If we want to make any changes in any of these pages, it will change the names of every other page. After compiling if we give it to server ,it will be time consuming.

Is .Net Platform Independent?

.Net compliers generates the MSIL code and this MSIL will run on CLR. This MSIL is not platform specific i.e. it can run on any platform if CLR for the platform is available. But Microsoft has not provided CLR other than Windows platform. So .Net technology is platform independent but we don't have CLR for other platforms from Microsoft.

CLS/CTS ( Common Language Specification/ Common Type System)

The rules that should be followed by any .Net languages are called CLS or Common Language Specification. And there are some set of types in the MSIL that should be supported by any language as a minimum requirement. These set of types are called CTS or Common Type System. It defines about how Objects should be declared, defined and used within .NET. CLS is the subset of CTS.

Language-Integrated Query: Consistent Access to Diverse Data

Most applications work with data in some way. That data can be represented in a variety of ways, including as tables in a relational database, in XML documents, and in objects held in memory. Accessing each of these kinds of data has traditionally required using a different approach. Rather than requiring specialized languages and a separate approach for each kind of data, LINQ adds a set of extensions to C# and VB that allow common access to diverse information.

Windows Communication Foundation: Support for Service-Oriented Applications

Rather than requiring developers to use a different technology with a different application programming interface for each kind of communication, WCF provides a common approach using a common API.

Thank You!!!

Você também pode gostar