Microsoft.NET strategy based on a set of open Internet protocols, launched a series of products, technologies and services, blowing the horn of Internet technology change. About.NET, Microsoft CEO Steve Ballmer described it this way: “Microsoft.NET represents a collection, an environment, a programmable architecture that can be used as a platform to support the next generation of the Internet.” This sentence is a succinct summary of the external features of.NET.
1. NET platform
.NET is first and foremost an environment. This is an ideal future Internet environment, Microsoft’s idea is a “no longer pay attention to a single website, a single device connected with the Internet network environment, but to let all the computer groups, related equipment and service providers work together” network computing environment. In short, the Internet provides services capable of a higher degree of automation.
In the future, the Internet should be presented to end users in the form of an integrated service. Users only need to know what they want instead of searching and operating online step by step to achieve their goals. In order to build such an Internet environment, the first problem to be solved is to design and create a new generation of Internet architecture for the defects of the existing Internet. This structure is not a topology structure on the physical network level, but a programmable Internet software structure for software and application level, different from the static browsing of the browser. .net therefore positions itself as a programmable architecture that can be used as a platform to support the next generation of the Internet.
The ultimate goal of.net is to enable users to access the information, files, and programs they need anywhere, anytime, and with any device. Users don’t need to know where these things are, or even how to get them. All they have to do is make a request and then just receive it, and all the complexity of the background is completely hidden. As a result, there will be less work for enterprise IT staff to manage complex platforms and understand how the work of various distributed applications is coordinated. .NET includes four important features: software as a service, a common language based on XML, a convergence of multiple devices and platforms, and a new generation of human-machine interfaces. These four features basically cover the technical features of.NET.
(1) Software to service
“Today’s software product is just a CD that you buy, install, manage and maintain yourself,” Ballmer said of software services. But software services are services from the Internet that install, update, and track software for users, and let them roam with them across different machines. It stores its own information and references for the user. These are different styles of software and software services.” This paragraph summarizes the core of software as a service. With the rise of ASP (application service) industry, software is gradually transforming from product form to service form, which is the overall trend of IT industry.
In.NET, the final software application appears as a Web service and is published on the Internet. Web service is a wrapped component that can be published on the Web..NET describes and publishes this Web service information through WSDL protocol, searches for related services through DISCO protocol, and transfers and calls related simple objects through SOAP protocol. As shown in Figure 1, the visual programming tool Orchestration in the.NET platform is used to generate XML-based XLANG code. It works with the Biz Talk server, the.NET framework, And Visual Studio.NET were an important part of the Windows D2000 strategy.
Microsoft’s.NET strategy means that the company and the developers on Microsoft’s platforms will make services, not software. In the next few years, Microsoft will release.net platforms and tools to develop Web services on the Internet. At that time, users, developers, and IT staff working on.NET stopped buying software, installing software, and maintaining software. Instead, they will customize the service, the software will be installed automatically, and all maintenance and upgrades will be done over the Internet.
(2) Common language based on XML.
XML is a markup language that evolved from SGML. As a meta-language, it can define the data exchange language for different kinds of applications. In THE FRAMEWORK of.NET, XML is used as a means of seamless integration between applications, data collection and merger between various applications, and interoperability and collaboration between different applications. In particular,.NET defines the Simple Object Access Protocol through XML. SOAP), Web Services Description Language (WSDL), Web Services discovery Protocol. The SOAP protocol provides a simple, lightweight mechanism for exchanging structured typed data using XML in a decentralised environment. The WSDL protocol defines the structure of a service description document, such as type, message, port type, port, and service itself. The Web Services discovery protocol defines how to extract service description documents, associated service discovery algorithms, and so on from a resource or collection of resources.
(3) Integration of multiple devices and platforms
As the Internet has become a center for information and data, various devices and services have been or are being connected to and integrated into the Internet and are trying to become part of it. NET seeks to integrate with various Internet access devices and platforms, mainly focusing on wireless devices and home network devices and related software and platforms.
(4) A new generation of human-machine interface
The new generation of man-machine interface is mainly reflected in two aspects of “intelligence and interaction”. .NET includes input and presentation methods through natural speech, vision, handwriting and other modes; Xml-based editable composite information architecture — universal canvas; Personalized information proxy service; So that the machine can better automatic processing of intelligent marking and other technologies.
.net platform and framework is based on Microsoft software industry foundation upgrade and evolution. However,.NET is still trying to ensure that Windows and its products can be integrated with.NET, as far as possible on the basis of Microsoft’s original software assets, so that.NET continues to be the center of the Internet.
2. The.net framework
The Microsoft.NET development framework is shown in Figure 2. The common language runtime and the set of base libraries it provides are the foundation of the entire development framework; In the development of technology,.NET provides a new database access technology ADO.NET, as well as network application development technology ASP.NET and Windows programming technology Win Forms; In the development language,.net provides VB, VC++, C# and other languages support; Visual Studio.NET is a development tool with full.NET support.
2.1 Common language runtime
Microsoft.NET brings a new development framework to developers, and C ommon Language Runtime (C LR) is at the bottom of this framework, is the foundation of this framework. Readers may already be familiar with the concepts of the so-called C runtime, VB runtime, and Jave Virtual machine, while the Common Language runtime provides a unified runtime environment for multiple languages.
In addition, it also provides more functions and features, for example, a unified and simplified programming model, users do not have to confuse with Win32API and C OM; The problem of DLL version and update is avoided, which greatly simplifies the release and upgrade of application programs. Multiple language interactions, for example, can even be written in VB using C ++ classes; Automatic memory and resource management, etc.
Microsoft.NET is based on the common language runtime to achieve these developers dream of functionality. Code developed based on the common language runtime is called controlled code, and it runs as follows: You write the source code in a programming Language supported by the common Language runtime, then use a compiler for the common Language runtime to generate a machine-independent Version of Microsoft Intermediate Language (MIL) while generating the metadata needed to run it. Use the Just In Time Compiler (JITC) to generate the appropriate machine code for execution while the code is running.
2.2 Basic class library
For developers, of course, in addition to the new features provided by the common language runtime, they are also interested in what kind of programming interface it provides to developers, which is the Base Class Library. This set of basic libraries covers everything from input and output to data access, providing a unified object-oriented, hierarchical, and extensible programming interface. It uses a dot-separated approach that makes it easy to find and use class libraries. For example, the root in the base library has a namespace of System and the library that provides Data access has a namespace of system.data. To use it, developers simply add a reference to the base library they need in their application, and then they can use all the methods, properties, and so on in that library. The ease of using and extending the base libraries compared to traditional Windows programming enables developers to efficiently and quickly build web applications based on the next generation of the Internet.
2.3 ADO.NET
Almost all applications need access to data of various types, from simple text files to large relational databases. ADO.net is the technology to access database in Microsoft.NET.
ADO.net provides a set of libraries for connecting to a database, running commands, and returning recordsets. Compared with ADO (Active Xata Object), Connection and Command objects are very similar. ADO.NET innovation is mainly reflected in the following aspects:
First, ADO.NET provides strong support for XML, which was a major design goal of ADO.NET. In ADO.NET, XML Reader, XML Writer, XML Navigator, XML Document and other XML data can be easily created and used, and support W3C XSLT, DTD, XDR and other standards. ADO.net support for XML also provides the foundation for XML to become the unified format for data exchange in Microsoft.NET.
Second, ADO.NET introduced the concept of Data Set, which is an in-memory Data buffer that provides a relational view of the Data. Whether the data comes from a relational database or an XML document, people can create and use it with a unified programming model. It replaces the original Recordset object, improves the interactivity and scalability of the program, especially suitable for distributed applications.
In addition, ADO.net also introduced some new objects, such as Data Reader can be used to efficiently read Data, produce a read-only recordset and so on.
In short, ADO.NET makes data manipulation in Microsoft.NET very convenient and efficient through a new set of objects and programming models and close integration with XML.
2.4 ASP.NET
Net is the network programming structure in Microsoft.NET, which makes it very convenient and efficient to build, run and publish network applications. ASP.net can be understood from the following aspects:
(1) Web forms.
The design purpose of ASP.net WEB form is to enable developers to create WEB forms very easily. It introduces the rapid development model in VB into network development, which greatly simplifies the development of network applications. Specifically: in ASP.net can support a variety of languages, not only support scripting language, universal language runtime support of all languages in ASP.NET can be used; Code and content separate, in the current ASP (Active Server Pages) development, content and script interleave, maintenance and upgrade is very difficult, they can make developers and designers can better division of labor cooperation, improve the efficiency of development; In addition, by introducing server-side control in ASP.net, the rapid development similar to VB is applied to the network development, which greatly improves the efficiency of building network forms, and server-side control is extensible, developers can build their own server-side controls.
(2) ASP.net Web service.
Web services are at the heart of the next generation of programmable networks, which are essentially namable network resources that can be used to easily represent and use objects across the Internet, just as COM objects are used today, except that the use and representation of Web services are achieved through SOAP or even HTTP. In ASP.net, it is very easy to build and use web services. To build a web service in ASP.net is to write a file with the suffix.asmx, to which you can add the methods you want to express. The web service builder doesn’t need to know the details of SOAP, XML, just focus on the service itself. This also presents a great opportunity for ISPs; The simplest way to use network services is to use HTTP protocol (HTTP GET or HTTP POST). Users only need to directly access the URL of the network service (.asmx file). Of course, users can also use web services more flexibly in their own applications through SOAP.
(3) ASP.net application framework.
ASP.net applications are no longer interpreted scripts, but compiled and run, coupled with flexible buffering technology, so that its performance has been fundamentally improved; As ASP.net application framework based on the general language runtime, so the release of a network application, just a copy of the file process, even the release of components is so, update and delete network applications, can directly replace/delete files; Developers can store the configuration information of applications in XML files. Administrators and developers can manage applications separately. Provides more diversified authentication and security management methods; Reliability and so on have been greatly improved.
2.5 WinForms
Traditional Windows-based applications (Win Forms) are still an integral part of Microsoft’s.NET strategy. When developing traditional Windows-based application program in Microsoft.NET, it can not only use existing technology such as Active X control and rich Windows interface, but also develop based on general language runtime, can use ADO.net, network services, etc. This also enables new.NET features such as avoiding DLL hell and multilingual support.
2.6 Development Language
From the introduction above, you already know that the Microsoft.NET development framework supports multiple languages, including VB, C ++, C #, and Jscript, and deep interaction between them, in the current beta version. Moreover, Microsoft supports third-party production of compilers and development tools for Microsoft.NET, which means that almost any programming language in the market can be used in the Microsoft.NET development framework. This allows developers to choose whatever language they like, which is what developers love about openness and interaction.
In particular, Microsoft has introduced the new C # language in Microsoft.NET, a new object-oriented language that allows developers to quickly build different applications from the underlying system level to the high-level business components. C # brings rapid development similar to VB to C and C ++, while ensuring powerful functionality and flexibility. It is also specially designed for.NET. For example, C # allows XML data to be mapped directly to its data type. These features combine to make C # an excellent next generation network programming language. At the same time, Microsoft.NET has made great improvements to the original VB and C ++, making them more suitable for the needs of Microsoft.NET development framework. For example, in Visual Basic.net, object-oriented features such as inheritance, structured error handling, etc.; Manageable C ++ extensions that greatly improve the efficiency of developing Microsoft.NET applications using C ++.
Visual Studio.NET is tightly integrated with the.NET development framework and is an excellent tool for building Internet applications. Visual Studio.NET improves developer productivity by providing a unified integrated development environment and tools. Integrated multiple language support; Simplifies server-side development; It provides methods to efficiently create and use web services.
One of the main goals of the.NET framework is to make COM development easier. The most difficult part of COM development is dealing with the basic structure of COM. Thus, in order to simplify COM development, the.NET framework has virtually automatically handled all the tasks that developers think are closely related to COM, including reference calculation, interface description, and registration. It is important to realize that this does not mean that.NET framework artifacts are not COM artifacts. In fact, COM developers using Visual Studio6.0 can invoke.net framework artifacts that, in their view, are more like COM artifacts with iUnknown data. In contrast,.NET framework developers using Visual Studio.NET treat COM artifacts as.NET framework artifacts.
To avoid confusion, this relationship needs to be specified here: COM developers have to do manually what most.NET framework developers can do automatically at run time. For example, the security module of the COM component must be written by hand, and the memory occupied by the module cannot be automatically managed, while the registry entry must be placed in the Windows registry when the COM component is installed. For the.NET framework, the runtime automates these functions. For example, the component itself is self-describing and can be installed without registering in the Windows registry.
When COM is combined with Microsoft transaction Servers (MTS) and distributed COM (D COM), it becomes COM +. COM + provides a set of services for the middle tier. In particular, COM + provides process management functions and database and object connection pool processing functions. In a future release, it will also provide a feature called partitioning — a more powerful process isolation feature designed specifically for application service providers. COM + services are primarily developed for middle-tier applications and provide reliability and scalability primarily for large distributed applications. These services complement those provided by the.NET framework; These services can be accessed directly through.net framework classes.
2.7 Other Features
Several elements of the.NET framework are worth mentioning. The first is its security system and configuration system. Working together, the two systems effectively eliminate the possibility of running unsafe code and significantly reduce the challenges of DLL hell configuring applications.
A security system is a highly detailed, fact-based system that gives developers and administrators multiple code-handling permissions (not just “on” or “off”). In the future, decisions on how to enforce these permissions will depend on the core elements of the code itself. For example, when a.NET framework application is downloaded to a system, it requests a set of permissions (such as write permissions to temporary directories). The runtime collects factual information about the application (such as where it was downloaded from, whether it has a valid signature, and even how accurately it accesses the system) and decides whether to allow the application to run based on administrative policies. The runtime can even tell the application that it is unable to grant all requested permissions and allow the application to decide whether to continue running. With this security system, many application configuration problems can be solved.
One of the biggest challenges faced by developers and administrators (and ultimately users) is version management. If everything crashes after a new application is installed, and the system was running perfectly fine until then, it is most likely that the newly installed application overwrote some shared libraries and, most likely, fixed bugs that the existing application was using. This happens so often that people have dubbed it “DLL hell.” The.NET framework has several advanced features that can eliminate DLL hell altogether. First, it has a very powerful internal naming system that effectively prevents two libraries from being mistaken for each other because they have the same name.
In addition, it provides a new feature called “parallel” configuration. If the newly installed application in the previous example did overwrite the shared library, the existing application can fix the library. When the existing application starts up again, it checks all the shared files. If it finds that the file has been changed and the changes are incompatible, it can ask the runtime to extract a version that it can use. Thanks to a strong security system, the runtime can safely do this, and the application completes its repair work.
In short, Microsoft.NET development framework on the basis of the general language runtime, to provide developers with a sound base class library, the next generation of database access technology ADO.NET, network development technology asp. Developers can use multiple languages and Visual Studio.NET to quickly build the next generation of web applications. With the popularization of relevant Internet standards and technologies, it can be predicted that more and more developers will adopt this development structure and develop rich and diverse next generation Internet applications.