Guide to Reviewing the Microsoft. Net framework

Дата канвертавання24.04.2016
Памер308.55 Kb.
1   2   3   4   5   6   7   8   9   ...   12

developer productivity

Use Any Programming Language

Benefit Summary

  • Use any programming language.

  • Take advantage of industry-leading tools.

  • Write less code due to greater componentization and reduction of plumbing.

  • Employ Windows application services.

  • Use multilanguage integration to take existing development skills to new challenges.

  • Use integrated XML Web services technologies to build next-generation applications.

  • Use COM+ Services for easy access to advanced scalability and reliability features.

The .NET Framework enables developers to use any programming language, and for applications written in different programming languages to integrate deeply with each other, enabling current development skills to go forward without retraining.

Objects written on top of the .NET Framework can integrate with each other regardless of the language in which they were created, because they are built on top of a common type system. The multilanguage integration of the .NET Framework includes:

  • Calling methods on other objects

  • Inheriting implementations from other objects

  • Passing instances of a class to other objects

  • Using a single debugger across multiple objects

  • Trapping errors from other objects

Cross-language integration is useful in several scenarios. For example, development projects gain access to a larger skills base—project managers can choose developers skilled in any programming language and join them together on the same team. Alternately, developers writing components for a distributed Web application will find it helpful to know that no matter what language they choose to write their components in, those components can interact closely with each other and with components supplied by other developers.

Take Advantage of Industry-Leading Tools

The .NET Framework is designed for development tools and includes many features specifically targeted as improving the quality of the tools that use it, such as integrated debug and profiling. Microsoft Visual Studio .NET is built on top of and designed to take advantage of the .NET Framework.

Developers Write Less Code

The .NET Framework uses a component-based, plumbing-free design that enables developers to focus on writing business logic. Developers don’t need to write IDL or registry code—and ASP.NET, for example, includes dozens of controls that encapsulate common programmer tasks, such as implementing a shopping cart feature.

The .NET Framework decreases the amount of code the developer has to write. This is done through many mechanisms, such as self-describing metadata, automatic memory management, a rich set of controls, simplified programming classes, and the capability to automatically transform any application method into an XML Web service with the addition of a single keyword.

Decreasing the Plumbing

With most development environments today, the developer has to cope with infrastructure overhead—details that are required for building an application but that aren’t actually business logic. The .NET Framework reduces this through many mechanisms such as automatic memory management, metadata, a rich set of controls, and the ability transform an application method into an XML Web service with the addition of a single keyword.

Automatic Memory Management

Many of the problems associated with modern applications can be attributed to memory leaks; in fact keeping track of the memory being used can be a very daunting task. The .NET Framework solves this problem with a high-performance, generational memory manager that is responsible for freeing unused memory efficiently and without imposing a high overhead on application performance.


Metadata enables developers to write less code by eliminating the need for separate IDL files. This is possible because the objects themselves contain metadata that metadata describes information about the methods, fields, properties, and events associated with a class.


The controls in the .NET Framework offer code savings in two primary areas: the adaptive user interface features and server-side controls.

Server-side Controls

Server-side controls assist developers by separating the code and the content, enabling developers to concentrate on the business logic they are trying to write.

Automatic Browser Detection

Automatic browser detection enables the runtime to sense the capabilities of the client automatically and render suitable HTML. The HTML rendered to achieve a consistent look of a Web page for down-level browser software and up-level browser software, such as Internet Explorer 5.5, may look radically different—but the ASP.NET code that generates the HTML is exactly the same.

Employ Windows 2000 Applications Services

Windows 2000 has the most advanced application services available: the fastest transaction monitor and message queuing engine, the most advanced data access subsystem, the best Web server. The .NET Framework takes advantage of these. For example, .NET Framework transactions are COM+ transactions, and all the new COM+ capabilities in Windows XP and Windows .NET Server can be used from the .NET Framework.

Create XML Web Services Easily

Taking advantage of the Internet by using COM component interfaces was made simple in 1996 with the release of Active Server Page (ASP) scripts running under the Windows 2000 Server Internet Information Server (IIS). For example, most developers could easily update a database from a Web page by using ActiveX Data Objects (ADO), Visual Basic Scripting Edition (VBScript), and ASP. As outlined in the ASP.NET section of this guide, Microsoft is making this even easier and more reliable. With the .NET Framework, developers can make all objects Internet-accessible simply by marking them with the WebMethod keyword.

C# function made available as an XML Web service.

Note that the function is not available to the Internet until the keyword “[WebMethod]“ is added in the second screen shot.

But this is only half the solution; the WebMethod keyword gives programmers the capability to expose functionality to the Internet, but how does a developer use these functions? The .NET Framework supplies the utility WebServiceUtil.exe, which takes the path to a WSDL file and a language (C#, Visual Basic, or JScript) as input arguments. The utility then generates a single source file as output. This file contains a proxy class, defined using the language specified, that exposes methods (both synchronous and asynchronous) for each of the methods exposed by the XML Web service. Each proxy method contains the appropriate network invocation and marshaling code necessary to invoke and receive a response from the remote service. Visual Studio .NET makes this even easier by providing an explorer interface (please see the Visual Studio .NET sections for more information on the Visual Studio Server Explorer).

Use COM+ Services

Introduced in 1992, the Microsoft Component Object Model (COM) is the most popular object model for building reusable components, with more than 10,000 components commercially available. Over time, COM has evolved from a technology for embedding one document inside another (OLE) to a technology for distributing self-contained applications (ActiveX) to a technology for building and running middle-tier business logic (COM+).

Based on years of experience, Microsoft architects undertook the challenge of making COM development easier. Visual Basic began to show how to accomplish this in 1995. The .NET Framework takes that simplification to its next step by automating COM features, such as reference counting, interface description, and registration.

The .NET Framework natively supports COM. In fact, a COM developer using the Microsoft Visual Studio 6.0 development system could call a .NET Framework component and, to the developer, it would look like a COM component, complete with IUnknown. Conversely, a .NET Framework developer using Visual Studio .NET would see a COM component as a .NET Framework component.

COM+ is COM combined with Microsoft Transaction Server, distributed COM (DCOM), and other component services, such as Partitions. COM+ also provides a set of middle-tier-oriented services. In particular, COM+ provides process management and database and object-connection pooling. In future versions, it will also provide stronger process isolation for application service providers—a feature called partitioning.

The COM+ services are primarily oriented toward middle-tier application development, and they focus on providing reliability and scalability for large-scale, distributed applications. These services are complementary to the programming services provided by the .NET Framework. The .NET Framework provides direct access to these component services.

You can think of COM+ as providing the component services for building scalable, reliable distributed middle-tier applications. The .NET Framework provides the language services that simplify and speed up application development and deployment.

Automatic Transaction Support

One of the most critical .NET Framework COM+ features that developers will want to use is COM+ Transactions. It is easy to build applications that use transaction support in the .NET Framework through simple keywords and settings. In fact, the .NET Framework takes advantage of the COM+ transaction infrastructure to provide both manual and automatic distributed transactions.

The beauty of the integration between the .NET Framework and COM+ transactions is that .NET Framework developers can use the high-performance COM+ transaction environment without needing to learn COM+. For example, you can simply copy your .NET Framework components that need COM+ Services such as transactions into a directory, and the .NET Framework will dynamically add the components to the COM+ transaction monitor.

C# function using transactions through a keyword.

1   2   3   4   5   6   7   8   9   ...   12

База данных защищена авторским правом © 2016
звярнуцца да адміністрацыі

    Галоўная старонка