Sunteți pe pagina 1din 5

.NET is a frameworkan API for programming on the Windows platformThe Microsoft .NET Framework is at the heart of the .

NET strategy. This framework manages and executes applications and Web services, contains a class library (called the Framework Class Library or FCL), enforces security and provides many other programming capabilities. The details of the .NET Framework are found in the Common Language Specification (CLS), which contains information about the storage of data types, objects and so on. The Common Language Runtime (CLR) is another central part of the .NET Framework it executes C# programs. Programs are compiled into machine-specific instructions in two steps. First, the program is compiled into Microsoft Intermediate Language (MSIL), which defines instructions for the CLR. Code converted into MSIL from other languages and sources can be woven together by the CLR. Then, another compiler in the CLR compiles the MSIL into machine code (for a particular platform), creating a single application. If the .NET Framework exists (and is installed) for a platform, that platform can run any .NET program. The ability of a program to run (without modification) across multiple platforms is known as platform independence. Code written once can be used on another machine without modification, saving both time and money. The .NET Framework also provides a high level of language interoperability. Programs written in different languages are all compiled into MSILthe different parts can be combined to create a single, unified program.
Another benefit of the .NET Framework is the CLRs execution-management features. The CLR manages memory, security and other features, relieving the programmer of these responsibilities. The .NET Framework also provides programmers with a huge library of classes.

The four components of the .NET Framework

Advantages of .NET
We've talked in general terms about how great .NET is, but we haven't said much about how it helps to make your life as a developer easier. In this section, we'll discuss some of the improved features of .NET in brief. Object-Oriented Programming both the .NET Framework and C# are entirely based on object-oriented principles right from the start. Good Design a base class library, which is designed from the ground up in a highly intuitive way. Language Independence with .NET, all of the languages Visual Basic .NET, C#, J#, and managed C++ compile to a common Intermediate Language. This means that languages are inter- operable in a way that has not been seen before. Better Support for Dynamic Web Pages while ASP offered a lot of flexibility, it was also inefficient because of its use of interpreted scripting languages, and the lack of objectoriented design often resulted in messy ASP code. .NET offers an integrated support for Web pages, using a new technology ASP.NET. With ASP.NET, code in your pages is compiled, and may be written in a .NET-aware high-level language such as C#, J#, or Visual Basic 2005. Efficient Data Access a set of .NET components, collectively known as ADO.NET, provides efficient access to relational databases and a variety of data sources. Components are also available to allow access to the file system, and to directories. In particular, XML support is built into .NET, allowing you to manipulate data, which may be imported from or exported to nonWindows platforms. Code Sharing .NET has completely revamped the way that code is shared between applications, introducing the concept of the assembly, which replaces the traditional DLL.

Assemblies have formal facilities for versioning, and different versions of assemblies can exist side by side. Improved Security each assembly can also contain built-in security information that can indicate precisely who or what category of user or process is allowed to call which methods on which classes. This gives you a very fine degree of control over how the assemblies that you deploy can be used. Zero Impact Installation there are two types of assembly: shared and private. Shared assemblies are common libraries available to all software, while private assemblies are intended only for use with particular software. A private assembly is entirely self-contained, so the process of installing it is simple. There are no registry entries; the appropriate files are simply placed in the appropriate folder in the file system. Support for Web Services .NET has fully integrated support for developing Web services as easily as you'd develop any other type of application. Visual Studio 2005 .NET comes with a developer environment, Visual Studio 2005, which can cope equally well with C++, C#, J#, and Visual Basic 2005, as well as with ASP.NET code. Visual Studio 2005 integrates all the best features of the respective language-specific environments of Visual Studio .NET 2002/2003 and Visual Studio 6. C# C# is a new object-oriented language intended for use with .NET.

C#
Officially, Microsoft describes C# as a "simple, modern, object-oriented, and type-safe programming language derived from C and C++ Some of the features of C# are: Full support for classes and object-oriented programming, including both interface and implementation inheritance, virtual functions, and operator overloading. A consistent and well-defined set of basic types. Built-in support for automatic generation of XML documentation. Automatic cleanup of dynamically allocated memory.

The facility to mark classes or methods with user-defined attributes. This can be useful for documentation and can have some effects on compilation (for example, marking methods to be compiled only in debug builds). Full access to the .NET base class library, as well as easy access to the Windows API (if you really need it, which won't be all that often). Pointers and direct memory access are available if required, but the language has been designed in such a way that you can work without them in almost all cases. Support for properties and events in the style of Visual Basic. Just by changing the compiler options, you can compile either to an executable or to a library of .NET components that can be called up by other code in the same way as ActiveX controls (COM components). C# can be used to write ASP.NET dynamic Web pages and XML Web services.

The .NET base classes are a massive collection of managed code classes that allow you to do almost any of the tasks that were previously available through the Windows API.

ASP
Active Server Pages (ASP) is a Microsoft technology for creating Web pages with dynamic content. An ASP page is basically an HTML file with embedded chunks of server-side VBScript or JavaScrip However, ASP is not without its shortcomings. First, ASP pages sometimes render slowly because the server-side code is interpreted instead of compiled. Second, ASP files can be difficult to maintain because they were unstructured; the server-side ASP code and plain HTML are all jumbled up together. Third, ASP sometimes makes development difficult because there is little support for error handling and type-checking. Features of ASP.NET First, and perhaps most important, ASP.NET pages are structured. That is, each page is effectively a class that inherits from the .NET System.Web.UI.Page class. Another nice thing about ASP.NET pages is that you can create them in Visual Studio 2005, the same

environment in which you create the business logic and data access components that those ASP.NET pages use For maximum clarity, the ASP.NET code-behind feature lets you take the structured approach even further. ASP.NET allows you to isolate the server-side functionality of a page to a class, compile that class into a DLL, and place that DLL into a directory below the HTML portion. Whereas classic ASP pages are interpreted with each page request, the Web server caches ASP.NET pages after compilation. This means that subsequent requests of an ASP.NET page execute more quickly than the first.

S-ar putea să vă placă și