So What is .NET?

 
Introduction
bySimon Robinsonet al.
Wrox Press 2002
  

We can best answer the question, "what is .NET?" by comparing it with Windows and asking what Windows is to developers. The answer to that is twofold. In the first instance, Windows is a library; it is the set of all function calls in the Windows API, which are available for you to use in your program. These functions provide common features such as displaying dialog boxes, multiple-document-interface and single-document-interface windows , accessing base functions such as security features or component services, and so on. In the second instance, Windows is the environment in which your application runs, as well as the operating system itself.

In a similar way, .NET is two things. First, it is a library, one that is just as extensive as the Windows API. You can use it to call up all the same sorts of features that have traditionally been the role of the Windows operating system: displaying windows and dialog boxes, verifying security credentials, calling on base operating system services, creating threads, and so on, as well as newer areas such as accessing databases or connecting to the Internet or providing web services.

Second, .NET provides the environment ("the .NET runtime") in which your program is run. When .NET-aware code is executed, it will be .NET that starts up your code, manages the running threads, provides various background services, and in a real sense is the immediate environment seen by the code. You can therefore view .NET as something that provides a level of abstraction from the operating system.

We should stress, however, that .NET is not itself an operating system. The operating system is still Windows at least until (and unless) .NET gets ported to other systems, and the Windows API is still there behind the scenes. The .NET environment sits as a layer between the Windows OS and other applications, providing a much more up-to-date, object-oriented, and easy to use framework for developing and running code. Of course, older applications which are not .NET-aware, will continue to work with Windows and the Windows API directly just as they always have done.

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 .NET 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 VB.NET, C#, J#, and managed C++ compile to a common Intermediate Language . This means that languages are interoperable in a way that has not been seen before.

  • Better Support for Dynamic Web Pages while ASP offers a lot of flexibility, it is also inefficient due to its use of interpreted scripting languages, and the lack of object-oriented design often results 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# or VB.NET.

  • Efficient Data Access a set of .NET components, collectively known as ADO.NET, provide 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 non-Windows 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 .NET .NET comes with a new developer environment, Visual Studio .NET, which can cope equally well with C++, C#, and VB.NET, as well as with ASP.NET code. Visual Studio.NET integrates all the best features of the respective language-specific environments of Visual Studio 6.

  • C# C# is a new object-oriented language intended for use with .NET.

We will be looking more closely at the benefits of the .NET architecture in Chapter 1.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net