Danh mục

C# .NET Web Developer's Guide P2

Số trang: 20      Loại file: pdf      Dung lượng: 195.25 KB      Lượt xem: 13      Lượt tải: 0    
tailieu_vip

Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Introducing the Microsoft .NET Platformin use, these objects will always have a reference count greater than zero, so unless they are implicitly deconstructed, their memory may never be recovered. For a C or C++ programmer—accustomed to ensuring that objects are properly destroyed, essentially managing memory on their own—this sounds perfectly normal, and a good reason for not trusting anyone else to take care of managing resources. However, in the .NET environment, Microsoft is striving to make developing software easier. Later in this chapter, we cover a how .NET garbage collection works, and the improvements that have been made over...
Nội dung trích xuất từ tài liệu:
C# .NET Web Developer`s Guide P28 Chapter 1 • Introducing the Microsoft .NET Platform in use, these objects will always have a reference count greater than zero, so unless they are implicitly deconstructed, their memory may never be recovered. For a C or C++ programmer—accustomed to ensuring that objects are properly destroyed, essentially managing memory on their own—this sounds per- fectly normal, and a good reason for not trusting anyone else to take care of managing resources. However, in the .NET environment, Microsoft is striving to make developing software easier. Later in this chapter, we cover a how .NET garbage collection works, and the improvements that have been made over strict reference counting or manual memory management approaches. Versioning Support Anyone who doesn’t understand the phrase “DLL Hell” hasn’t been developing (or at least supporting) software for Windows very long. For the uninitiated, you’ll find yourself in DLL Hell someday when a customer installs a software package that uses one of the same DLLs as your application. However, your appli- cation used version 1.0 of this DLL, and the new software replaces it with version 1.1.We developers all always make sure everything is 100% backwards-compat- ible, right? The new DLL makes your application exhibit some strange problem or perhaps just stop working altogether. After a lot of investigation, you figure out what the offending DLL is and have the customer replace the new one with the version that works with your software. Now their new software doesn’t work… welcome to DLL Hell. Many developers resort to simply installing every DLL their application requires in the application directory so that it will be found first when the application loads the libraries.This defeats the purpose of shared libraries, but it is one way around the problem. COM was going to change this; one of its primary tenants was that you never changed a methods interface you simply add new methods. Unfortunately, software developers are frequently perfectionists, and leaving a “broken” function alone just chafes some people. Problem is, changing a components interface once it’s in use can have adverse affects on the client software that expected the old behavior. Because COM objects are loaded using information in the Registry, simply placing the DLL or control in the application directory doesn’t work for this problem. The .NET architecture now separates application components so that an application always loads the components with which it was built and tested. If the application runs after installation, the application should always run.This is done with assemblies, which are .NET-packaged components. Although current DLLs and COM objects do contain version information, the OS does not use this information for any real purpose. Assemblies contain version information that the www.syngress.com Introducing the Microsoft .NET Platform • Chapter 1 9.NET Common Language Runtime uses to ensure that an application will loadthe components it was built with.We cover more of the specifics of how assem-blies and versioning works later in the chapter.Support for Open StandardsIn today’s world, not every device you may want to work with is going to berunning a Microsoft OS or using an Intel CPU. Realizing this, the architects of.NET are relying on XML and its most visible descendant, SOAP, an emergingstandard for sending messages across the Internet that activates programs or appli-cations regardless of their underlying infrastructure. SOAP will provide the meansfor disparate systems to exchange information easily, but even more, SOAP allowsyou to invoke methods on remote systems and return the results. Because SOAPis a simple text-based protocol similar to HTTP, it can easily pass through fire-walls, unlike DCOM or CORBA objects. Other standards employed by the .NET platform include UniversalDescription, Discovery, and Integration (UDDI), a directory of companies andtheir XML interfaces and the Web Services Description Language (WSDL),which describes what a piece of application code can do. By basing much of.NET on open standards and by submitting the proposed draft standards for C#and the .NET Common Language Infrastructure to ECMA, an internationalstandards organization, Microsoft hopes to see its version of the future of softwareadopted beyond its own domain.Easy DeploymentToday, developing installations for Windows-based applications can be incrediblydifficult, to the point that most companies use third party tools for developingtheir installation programs, and even then it’s not pleasant.There are usually alarge number ...

Tài liệu được xem nhiều: