.NET overview

zhaozj2021-02-16  62

This article many places draw on David Chappell's "understanding .Net" and other online articles, but there are some of my own text. The original meaning of writing this article is to use some less text to give readers a comprehensive, but not impressive. Here, "understanding.Net" David Chappell and translator Hou Jie, glory have other authors expressed gratitude!

.NET overview

Microsoft .NET appears, can be said to be an earthquake. It will shock anyone working in the Windows environment, and will also produce aftershocks in a broader world. Microsoft's one-time brings us so much change, we must adapt to it. In the short term, we will make our days more difficult, after all, there are too many things! However, we have mastered this new tool and new technologies, and most Windows developers will find that they have the ability to build more powerful and more useful software in shorter time.

One. What is .NET

.NET is a trademark applied to a series of technologies

Microsoft will be .NET as a vision and platform for digital future. If this innovation is more specifically and more accurately, it is regarded as a trademark. A Microsoft has implemented several different technologies. Some of these technologies are new, providing new services and new possibilities, while others allow us to create all kinds of Windows applications we already know today in the latest way. Of course, there are some .NET family members are just a new version of the technology decorated .NET brand.

.NET is software to become a service transfer

The meaning of .NET is most widely accepted and understood. "Software is the service", the previous year was originally presented by Oracle CEO LARRY Ellison and Sun's CEO SCOTT MCNEALY in 1997. However, Oracle and Sun did not truly change this concept into reality, and their perspective is more focused on resource centralization. However, I heard the company that Ellison and McNealy, which, including Microsoft, which also realized that this insight has said that a huge change in the software industry, .NET is Microsoft to this concept, this change Your own reaction.

.NET is a new programming model - that is, an Internet platform

MICORSOFT is tending to view .NET as a system. Under the surface, it contains two different programming models: one is a web service programming model and the other is a system programming model.

Microsoft began to program the .NET system programming model as an integral part of .NET. The plan will eventually replace the existing component object model (COM) and Windows Application Programming Interface (APIS), which has no finally formally named models using a series of new basic classes.

The most important new technology in .NET pushes Web Services. As indicated by its name, Web Services provides some features that allow us to call over the network. Most of the .NET trademark technology can directly support Web Services directly to some extent. However, .NET is never just Web Services, Microsoft is placed under the .NET trademark umbrella including:

.NET Framework: Includes a common language running runtime, a CLR, and a .NET framework library. The CLR is the standard basis for building a new application, and .NET class library provides a new standard development environment for many CLR-based applications. This class library, includes technologies: ASP.NET, the latest generation of ASP (Active Server Pages) technology; ADO.NET, the latest generation of ADO (ActiveX Data Objects) technology; and support for "Building and Using Web Services" and many more. Microsoft also issued a .NET Framework Lite, named .NET Compact Framework for small devices such as Personal Digital Assistants (PDAs). Visual Studio.net: Supports multiple programming languages ​​that can be used, including Visual Basic; a enhanced version of C ; a .NET-based Java alternative language J #, and a new language C # that is tailored for .NET Framework .

.NET My Services: A set of services, allows users to store and access personal information on the server that is accessible to the Internet, such as a schedule and address book, and more. These services also provide general features such as Autherntational, allowing customers to prove their identity; also provides a way to send messages to customers on different devices.

.NET Enterprise Servers: This is a series of software servers, including Exchange Server 2003, SharePoint Server 2003, Project Server 2003, BizTalk Server2000, Application Center 2000, Commerce Server 2000, Host Integration Server 2000, SQL Server 2000, etc. In addition to several products called 2003, others have nothing to do with .NET technology here, but obvious, in the future version, they will be based on .NET technology, the above called 2003 The version has proven this.

two. .NET features

High efficiency development

Through the .NET Framework provides us with a huge and clear type, our programming is extremely easy, as well as automatic garbage collection mechanism, etc. A series of new features, allowing our programmers to make more The energy is placed on how to implement the business logic required by the customer, rather than the computer's control for memory. Even no matter which application you develop, whether it is C / S, B / S, or a smart device or database programming, you can use a programming language you are most familiar with and don't need to learn such as C , ASP , SQL, etc. Various languages ​​are different. .NET also brings seamless integration between multiple languages, such as a system that can develop multi-purpose programming languages, and the classes written by VB.NET can be easily inherited with C #. These have greatly improved our development efficiency.

2. Multi-platform features

Although it is undeniable that the .NET application can only be run on the Windows platform, but .Net is prepared for cross-platform applications. According to our knowledge, Microsoft has a third-party developer already The .NET program operates on UNIX, OS2, Linux, etc. Working (such as open source project mono). We can also see our .NET app will be able to run on the PDA or even mobile phones. In the near future, we will be able to only care about how our applications will meet the needs of our customers without considering what platforms are developed. 3. No contact deployment

With the reflection characteristics of .NET, .NET applications can accurately describe themselves. This makes no contact deployment possible, .NET applications do not need to store information in the registry, just simple XCOPY can run correctly on the user's machine, which makes the deployment cost of the company will be greatly reduced.

4. Eliminate DLL Hell

Also based on .NET reflection characteristics, each application will clearly know which DLL you need to use, the different versions of the same DLL can be peaceful, thus completely eliminating the DLL Hell that makes us headache.

5. Trustworthy calculation

For a long time, the security problem of Microsoft systems has been prepared. But finally, Bill Gates decided to change this status quo. In .NET, this safety consideration is placed directly to the code level. By a series of technologies, Code Access Security, Based on Role Security, Strong Name, Permissions, Permissions and Permissions, Maximize the security of the system.

three. .NET Framework architecture

.NET is a hierarchical, modular, one and hierarchical. Every layer of .NET Framewok is an abstraction layer. Among them, .NET language is the top layer and the most abstract layer. The public language runtime is located at the bottom, it is the least abstraction, closest to the local environment. This is important because the public language runtime needs to work closely with the operating environment to manage .NET applications. .NET Framework is divided into multiple modules, each of which has their respective specific responsibilities. Finally, since the high-rise is only requested from the underlying layer, .NET is hierarchical.

four. WebServices (web service)

To make a thorough understanding .NET, you must understand Web Services, you must also understand the basic elements of each .NET technology you have just listed.

Today, the typical way of web applications is GUI

In the past ten years, the software world has no bigger impact than INTERNE and WWW. Zone 20 years ago, or the era of mainframe. At that time, only a very small number of people can use a computer, and can only pass the adjacent information industry. The appearance of personal computers and image modified users has changed everything, and the computer has been popularized by thousands of households and make it truly a commodity that can be produced in large industries. The business community realizes that the network and personal computer-based servers may change their business model, and personal computers have also rapidly become an emerging entertainment medium for consumers. Then, the Internet followed. It revolutionously changed our communication mode, created rich and innovative information and entertainment resources, and in front of "business", a letter "E" representing "Electronics". Today, there are nearly 300 million people in the world who are using the Internet. The information provided by the International Data Group shows that this year's global online transaction amount will exceed $ 25 billion. World Wide Web has fundamentally changed our access to information, shopping, finding work, and daily lives. He is all directly interacting through an app with a graphical interface (GUI). Not exaggerated, with GUI-based applications, it has created the Web today.

However, GUI is not all of the Web, Web Services represents the future of the Web's future, which may no longer be the maintenance tool of the next stage web. In the face of these online myths, we still have found a huge improvement space. Today's Internet is also a way to simulate old-fashioned large computers. Despite sufficient bandwidth resources, a lot of information is still "lock" in the central database, and is guarded by "security personnel". Users must rely on the web server to complete all Internet operations, which cool like a discretionary multiplexing system. The website seems to be an isolated island, and it is impossible to communicate meaningful communication according to the user's instructions. Today's network seems to provide limited services to a single website through a single website - because most web pages can only present the data "picture" of the HTML format, not the information itself. (For most web pages, it is very difficult to take care of both under the prior art conditions.) Non-So, the browser itself is just a "dumb read-only terminal" in which the browser itself is just a "dumb reading terminal" - you can It is easy to browse information, but it is difficult to edit, analyze, and replicate (actually all the job needs to do). "Personalization" means repeatedly entering the website, and the personal privacy is constantly leaked to every website you visit. You have to adapt to technology, not our requirements, adapt to your requirements. We hope that we can get information in a variety of ways, not just a browser. If the application that provides these web services can be accessed by the outside world, then the outside world can use this important service. In Microsoft, "everything is a service." Customers of these network services can no longer sit in front of the browser, but running on the table, mobile phone or other devices. Customer software can call remote operations of applications in a variety of ways and transmit information using XML (Extensible Markup Language). In other words, this application can be accessed with "Web Services).

Web Services can be applied to many aspects

This technique can be applied to many aspects. It can be used to allow desktop customers or handheld devices to access applications on the Internet, which is beneficial to the system; can also be used for B2B integration, connecting different enterprise organizations through the Internet. Web Services may even be used for enterprise application integration, thus connecting an enterprise organization "originally running on private network" applications. In all of these cases, Web Services technology provides "standard glue" software small modules for typed color.

XML Web Services is fully open and can be implemented by any platform. .NET My Services is a specific implementation of XML Web Services, transmitted data by XML Web Services, specifically, is to achieve information communication by using XML described SOAP messages, and SOAP messages can pass through HTTP or DIME ( Direct Internet Message Encapsulation, Direct Internet Message Package Protocol to pass. The working principle of XML Web Services is shown in the figure. Combined with the Microsoft .NET Passport user authentication system, .NET My Services can integrate applications and services as a user-centered, and implement individual and organization collaboration and information sharing.

Four basic technologies since Web Services:

Web Services technology can be broken down into four independent fields, each of which solves a particular aspect of the problem.

Description "Information Send via network": When calling a remote operation, some parameters must be passed and some information is retrieved. If you use Web Services, this information must be described in XML. As a modern universal language that is commonly accepted to describe data, XML can describe and exchange different types of information. Define "Web Services Ability": There must be a mechanism that allows the Web Services supplier to accurately define the technical details of the Services he provided and can be understood by the recipient of the service. This is done by the Web Services Description Language (WSDL). WSDL itself is also defined by XML.

Accessing Web Services: Once you define a good interface, the customer must use some protocol to call the operation within the interface. There is no dedicated protocol here, but the most important choice is SOAP (Simple Object Access Protocol). SOAP provides an approach to identify "the one will call it": he uses "Data-Using XML Definition Different Data" Transfer Operation Enter, and "data using XML definition" rebounds arbitrarily.

Find the Web Services: For those who use the Web Services development client program, there must be some way, let them know what kind of service you can get, let them know what Web Service provides? What is the appearance of the interface? Considering the existence of the Internet, establishing a standard registry is reasonable to store and access information. This is what the UDDI (Universal Description, Discovery, And Integration) technology. Using UDDI, Web Services suppliers can use standard ways to make things that they offer, so that customers can learn what services provide some services, and let customers know, in order to develop client software, they need What is found.

Web services is common: Any Time, Any Where

Each of the above techniques is developed by a group of manufacturers and users. For example, XML is a large group development funded by the World Wide Web Association (W3C). WSDL is mainly developed by Microsoft and IBM. UDDI was originally developed by Microsoft, IBM, and Ariba, and later there were more organizations to join and worked together. There is no SEB Services technology from a single manufacturer. Therefore, Web Services on XML, WSDL, SOAP, and UDDI can be used in all platforms, all languages, and all object models. Coupled with the ability to cross the firewall, whenever, no matter where, no matter where your system is architectures in Windows, UNIX, Mac or Linux or even PPC, as long as there is Internet, you can Enjoy the service provided by Web Services.

Apply Web Services

Web Services can be used almost any occasion. The most obvious use is divided into three categories:

Allows to access the application via the Internet: This allows you to do not have to be limited to the browser, you can use the choice of more efficient ways, through a interface that is suitable for the client device, you can express you Willing, and implement your will. Microsoft .NET means simple overall services; unified information browsing, editing, and authorization; view your information, work and online and offline media; a whole system solution; at any time, anywhere; absolute freedom. For example, any modifications for your personal information - whether through personal computers, portable devices or Lingtong cards - instant and automatically notify all places requiring this information. For example, you can book a ticket online at any time, anywhere, not just to access the airline's website. Accessing Web Services in this way, also triggeting another possibility: Why don't I create revenue for some service for their suppliers (companies)? As the web application on the browser supports the new business model, bringing the Internet Big Bang, Web Services can also bring new ways to make new money for their suppliers. Although your dentist is impossible to charge you because you have made an appointment, some services are really affirmed.

B2B Integration: Another important application of Web Services is B2B integration. Generally, it also depends on the Internet, which will connect to software running in different enterprise organizations. As far as it is, the software of each company is still an information on the ocean of the Internet, and it is also necessary to connect to a special method. The reason is many aspects, the platform is different, the software is different, the firewall ... etc. This limits the connection between each other, although HTML is standard, but that is only suitable for people, want to pay the program to understand the web page The information contained in it is difficult. Web Services provides a common and standard way to make this no longer just a beautiful dream. Imagine that Web Services will play a magical role in corporate collaboration, such as supply chain management.

A2A integration: Many business organizations are how to connect existing applications together. Regardless of the scale, each company has some software written in different languages, and the mix is ​​running on different systems. Combining these complicated applications as a useful whole, it is one of the huge challenges facing these companies, let alone add new programs for this mixed monster. Web Services provides an effective solution for this annoying A2A integration problem. It is straightforward, and Web Services provides a good universal glue for this five-flowered environment.

WEB SERVICES's future bright

Web Services is undoubtedly a good idea. He has enabled many manufacturers to run on all platforms across intranet and Internet and therefore bring a new way to open world. Web Services contains technology - XML, WSDL, SOAP, UDDI - are relatively new technologies. Although these technologies are not deep, they are supported by many manufacturers, and it is possible to play an important role in future distributed computing environments. The app is based on the app on the browser, which has created Web's today, and Web Services may have achieved a better tomorrow. And, it will bring us a new idea: everything is a service.

Fives. Common Language Runtime (General Language Run)

Everything in .NET Framework relies on CLR

General Language Operation Layer (CLR, Common Language Runtime) is the foundation of anything in the .NET Framework. To make a thorough understanding .NET language such as C # and Visual Basic.net, you must understand CLR; you must understand the .NET Framework class library such as ASP.NET and ADO.NET, and you must understand CLR. Since .NET Framework has become the default basis of Microsoft's new software, anyone who intends to work in Microsoft Environment should work hard to grasp CLR. What is the CLR definition?

In general, every language has its own unique syntax, a set of control structures, a data type, and a "Class how to inherit" concept. The decisions made by language design will be affected by Target Applications, that is, "language users can do this language" will affect the original design. Of course, language designers are also inevitably doped with personal emotional factors.

However, for one of the programming languages, most people will reach a consensus. Although the opinions are not agree, everyone has a universal agreement. then,

The CLR defines a set of universal semantics that can be used in multiple languages.

The CLR also provides other general services:

GARBAGE Collection, automatic release of controlled objects that are no longer referenced

Metadata (metadata) standard format. Each type of information is stored in this type of compiled code. This is different from COM, no longer a separate type library, no longer requires IDL. Today's Interfaces and Classess are defined directly using any programming languages ​​employed by developers, and then converted to Metadata standard format.

A common system (COMMON Scheme) to organize compiled code (called assembly, assembly). The assembly can be composed of one or more dynamic link libraries, dlls, and / or executable files (Executables, Exec), and contains the metadata of the Classes he contained. A single application can be used to refer to a code for one or more accessories, so each assembly can clearly describe other accessories he rely on.

What is controlled code (Managed Code)

The software built on the CLR is called the control code, and the CLR provides a variety of things to create and run this special code. The most basic thing is a set of Standard Format for metadata, which can be used by the CLR-BASED language, which is "software constructed in standard type". The CLR also provides a Packaging technology for controlled code and a runtime environment for running a controlled code.

Development of controlled code: General Purpose System (CTS)

CTS defines the core semantics, but does not define syntax. CTS does not specify a particular syntax or keyword, just define a universal type, they can be used in many languages. Each language can freely define any of what he wants, but if a language point is based on the CLR, it will at least use a part of the CTS definition.

The clr-based language reveals CTS Types in a different way. A set of Types defined by CTS is gather in the CLR. The programming languages ​​on the CRL are desented in a language to reveal these Types. Although a CLR-BASED language creator can freely implement any subset of the CTS definition Types, or even add your own Types, most CLR-based languages ​​are also widely used by Types defined by CTS. CLS: common language specification (Common language specification)

CTS defines a set of very large and quite complex Types, but not all of these Types make sense to all languages. A key objective of CLR is to allow developers to write code in some language and call them in another language. But unless the two languages ​​support the same Types in the same way, don't want to succeed. Then, if each language has realized every CTS Types, you can't afford it for language involvers.

A compromise solution for this problem is CLS. CLS defines a huge CTS subset, if you want to interoperate with other CLS languages ​​(interoperability), it must be subject to it. CLS defines a subset of CTS, which is possible to "cross-language interoperability".

Compilant Control Code (Compiableing Managed Code)

The controlled code has generated MSIL (Microsoft Intermediate Language, Microsoft Intermediate Language) and Metadata (metadata). Regardless of whether the controlled code is written in any language, the compiler will convert all Types-Class, StruCTs, Intergers, Delegates machines in the controlled code to MSIL and Metadata.

Microsoft Intermediate Language (Microsoft Intermediate Language, MSIL)

The MSIL and Processor's Native Instruction Set is very similar. However, there is no hardware used to run these instructions, at least this. The MSIL code is always compiled as the native code of the processor that will run on it before running - no matter which processor is

In fact, MSIL is the assembly language of the CLR. In the above description, you can find that the CLR defined is a stack-based abstract machine, which means that many MSIL operations are defined according to this stack. The MSIL instruction set is closely mapped to the CLR CTS.

Metadata

Metadata describes information about Types in the module, including:

TYPE name

TYPE visibility, can be public or askSEMBLY

This type inherits from what type (if any)

Any Interfaces (interface) implemented by this Type

Any Methods implemented by this Type

Any Properties exposed by this Type

Any Events exposed by this Type (event)

More details can be obtained. For example, the description of each Method, including the parameters of Method and its type, and return it is worth you.

Since Metadata always exists, tool software can always rely on him, such as Visual Studio.net, always displaying Metadata to developers, what Methods she just knocked in is Methods available.

Attributes (Features)

Metadata also includes Attributes, stores values ​​within Metadata, which can be read and can be used to control all aspects of the code running behavior. The .NET Framework class library relies on it in many ways, including developing transactional needs, specifying those Methods should be open to SOAP-CALLED Web Services, and describe security requirements. Organizational control code: assembly (Assembly)

The assembly consists of one or more files, which constitutes a logical unit. Each assembly has a list, Metadata: Manifest, enameled accessories. The list is included in a file of the assembly, and includes information of the assembly, and information of the "File of the assembly). One assembly can be composed of one or more files (DLLS, EXES, HTML, etc.), representing a set of resources, as well as the type of definition and implementation. A accessory can also include references to other accessories. All of these resources , Types and references are described in one manifest. This manifest is also part of the accessory, so the accessory is a self-description, no other additional components to describe it! Another important feature of the accessory is part of the .NET environment, or the basic unit . Because, distinguishing between a type of identity is to include the name of the accessory name plus the type name itself. For example, the accessory A defines the type T, and the accessory B also defines the same name Type T, but .NET is considered to be different types. Accessories are also the basic unit of the .NET framework for security policies, many security policies are based on accessories.

The assembly can eliminate the so-called DLL Hell. All assemblies have a simple text name, but can also be "strong name", strong names will be unique, CLR uses a strong name to version check, put the strong version management, This effectively eliminates the so-called DLL Hell. If you want to install the fitting to the GAC (Globle assembly cache, global assembly cache), you must have a strong name.

Just-in-Time Compiration, JIT)

The controlled code written by the developer is compiled into native code when it is running after being compiled into MSIL. There are two ways to complete this goal, one is a MSIL code that compiled Methods one by one by one, and the other is that all compiled compilation before the assembly is running.

The most common way to compile MSIL as native code is to first make CLR to assemble the accessory, and then compiled when each Method is first called. Since each Method is only compiled only when the first time is called, we call it instant compilation (JIT). Each Methods will be cached after the first call is compiled, so there is no need to compile when it is called again.

When a Method is compiled, it is also checked for security, which is called verification, and the detection includes MTHOD MSIL and Metadata to ensure that the code does not have illegal access. The "CLR built-in security function" will be told to rely on this verification process, which is also used to verify other aspects of the controlled code behavior.

Code Access Security (Code Access Security)

Code security issues have always been a headache, you don't know what you installed on your computer. Especially in the Internet everywhere, it is even more likely to bring you a huge security crisis. There must be a way to limit code - especially downloaded code - activity range.

The Code Access Security mechanism restricts the range of action of the code in the run. Currently, the Windows typical solution that controls "download code can be run" is: ask users, but .NET code security mechanism does not rely on users' knowledge. What can the CLR-BASED code do, there is a collection of two things: what is the "authority" of code requirements? What is the "permission" "permission" actually granted when the code runtime is active? In order to indicate which access permission it needs, the assembly can accurately indicate what kind of permissions that need to run the environment. The code access security makes the CLR can limit the behavior of a particular assembly in accordance with the mounting name, the publisher, from the other trail. This mechanism is very flexible, providing a lot of options to meet extensive requirements. Moreover, in a world that diffuses global networks and mobile code, a total of a mandatory means to limit the behavior and scope of the code, it is indispensable. Role-Based Security

The role security provided by the CLR solves another problem that the code access security cannot be resolved, that is how to limit some users to run certain code, while others cannot run these code. The CLR allows each Method to add attributes to indicate which roles allowed to run this code, and this code is allowed when the role is matched with the role played by the user.

Garbage Collection

The "garbage collection" mechanism automatically releases the object that is no longer used. For each C programmer, the most headache may be the problem of memory leaks. Maybe C programmers believe that memory is too important, so it cannot be managed by the system. But today, today, .NET programmers believe that how to deal with business logic, establish a necessary system, which is the most important, in this, why not give memory to the system to manage, Energy to realize business logic?

In the .NET Framework application execution, Managed HEAP has played a crucial role. Each Reference Type is not assigned to HEAP, for example, every Classes and every string. Once the application runs, Heap memory will be filled. In order to create a new entity, the program must get more free space. This process is called "garbage collection".

The garbage collector tracks and reclaims the object allocated in the hosted memory, regularly performs garbage collection to recover the memory that is not effectively referenced. When the memory request cannot be met using the available memory, the GC will be automatically performed.

At the time of garbage collection, the garbage collector returns to the managed object in memory, and then searches for the referenced object from the managed code and marks as valid, then releases that the memory is not marked as a valid object and retracts the memory. Effective objects move together. This is the four steps of GC.

It can be seen from the above, GC is very influential, so it is generally said that this kind of thing is still as possible.

In order to reduce some performance impact, .NET's GC support object aging, or the concept of independence, the generation is the measurement unit, an algex, or a generation of an algenever, or a period of the object. Currently .NET's garbage collector supports three generations. Each time the GC is performed, there is no recycled object to automatically improve the generation. Copy-created objects belong to a new generation, which is lower than the algebra of objects created earlier in the application lifecycle. The object in the middle of the rare is in zero. When each GC is time, the objects in the zero generation are first reclaimed, and only the more than the demand is still unable to meet the demand after the lower algebraic object recycling is completed.

Application Domains

The application domain is a new concept. We know that the process can isolate the "Its Application" and "Other Applications" so that the crash of an application will not affect other. But this will affect performance and make communication between processes difficult. The application domain provides us with another way to solve the problem, one process can contain multiple application domains, and applications in each application domain are isolated from each other, avoiding "starting a new process for each application". " The overhead brought, the communication between the communication is more efficient than the communication between the processes. AppDomain provides the benefits of the process and there is no big overhead that processes.

App Domains provides a consistent environment adapted to a variety of platforms. The .NET Framework is integrated on Windows and other possible operating systems, while different operating systems have a completely different process model, especially the systems used in small devices. Let App Domains define their own process model, which helps .NET Framework across all platforms, providing an consistent environment.

six. .NET language

Visual Basic.Net

In the Windows World, Visual Basic is definitely the most popular programming language, and Visual Basic.NET has changed the sky-covered changes in this widely used tool. VB.NET is built over the CLR (General Language Operation Layer), so most components of this language have been effectively defined by the CLR. In fact, in addition to grammar, you can't see what is similar to that of VB.NET and VB that year. In terms of large aspects, VB.NET supports new features such as inheritance, delegates, from small aspects, the index of the VB.NET array starts from 0!

2. C . Net

C . NET is actually called C with controlled expansion (Managed Extensions).

C is a very popular language that has been widely used for more than 10 years. "Provide some way to make C and .NET Framework" is indispensable. However, like VB, C semantics is not strictly matched with the semantics of CLR. Worse, Microsoft does not have C , so Microsoft does not have a modification of C to a reborn for C as a major surgery for Visual Basic. If unilaterally modified this language, it will be severely protest, but if you do not provide "Let the developer can create a .NET FRMEWORK-BASED application" method, many developers will not be happy. At least, Bill Gates will be very good.

Thus, Microsoft chooses to develop a expansion set relative to basic C languages. The formal name is Managed Extensions for C .

The new C defines several new keywords, they all start with two underscores, the most important of which is as follows:

__gc: It is pointed out that a Type is controlled by a garbage collection mechanism. In other words, this keyword means that the Types he declared is a CTS Reference Type.

__value: It is pointed out that a Types is not controlled by the garbage collection mechanism. In other words, the Types it declares is a CTS Value Type.

__interface: to define a CTS Interface Type.

__box: Convert CTS Value Type to REFERENCE TYPE. __unbox: Transfer (Boxed) CTS Value Type back to its original form.

__delegate: to define a CTS Delegate Type.

Based on the above changes, Managed C has such a characteristic:

Managed C code and UNMANAGED C code can coexist in the same process.

Managed C allows full access to the CLR feature.

C is the only language that can be directly compiled as native code in Visual Studio. Native Code.

The C language will not be endless, but its role will converge, may also converge quite powerful, as a "preferred tool for developing a wide range of applications" has ended.

3. C #

C # is an object-oriented language with similarity and C syntax

As its name is implied, C # is a new member in the C language family. C is derived from C, strictly said that C is not a strict object-oriented language because of the burden of C. And C # is different, C # full-oriented object-oriented, and does not bring a few cruel complexity. For anyone who has a background of C or Java, C # especially comes.

Standardization of C # and CLR

Microsoft has submitted C # and CLI (a subset of CommON Language Infrastucture, General Language Infrastructure, CLR) to international standardization group ECMA, which is moving towards the road of ECMA standards. With C # together, it is submitted and desirable to obtain standardized: Metadata (metadata) syntax and semantics, MSIL (renamed Heart Common Intermediate Language, CIL, General Intermediary language), and part .NET Framework class library.

Sun has done similar things to Java, but retreats at the last moment. Sun refused to take this step because it is because he is not willing to give up control of Java. From this point, the prospect of C # may be worth looking forward to it.

Interfaces

Interface (interface) is used to define an agreement of a program. The class or structure of the interface should be strictly consistent with the definition of the interface. With this agreement, you can leave the restrictions on the programming language (theoretical). The interface can be inherited from multiple base interfaces, and the class or structure can implement multiple interfaces. The interface can contain methods, attributes, events, and indexers. The interface itself does not provide the implementation of the members it defined. The interface only specifies the membership that implements the interface or interface that the interface must be provided. The interface is like a template. This template defines how objects must be implemented. The purpose is to let these methods can be referenced as an interface instance. The interface cannot be instantiated. Classs can implement multiple interfaces and are indexed by these implementations. Interface variables can only index instances of classes that implement the interface.

Attributes

Attributes can be said to be an innovation in the C # language. Of course, you can also say it. The reason is that the implementation behind it is actually two functions - an assignment function (GET), a value function (SET), which can be clearly seen from the intermediate language code generated. The reason is that it is indeed an appeal of a special interface for object-oriented programming has always been in the language-oriented programming of the OO style of "Properties". The design of the understanding of the design is the root of the tool we use this property. C # does not advocate the use of the domain's protection level to public and use the user outside the class or any operation - that is too not Oo, or the specific point is too unsafe! For all the domains other than the class, C # recommends expressing attributes. Attributes do not represent storage locations, which is the foundation of attributes and domains. Delegates, Event (event)

The agent is implemented by a pointer function such as a language such as C , a different function pointer, an agent is an object-oriented, secure type. Acting a reference type of a public base class (system), the method is pressed into an agent, and the instance method is called the instance of the instance of the instance, or the method of the instance, and the static method is called the composition of the class. Entity or class method. The powerful function of the agent is that it can automatically match the method, regardless of its type.

Based on it, C # also defines a full OO thing, Event (event), image, event is a member of the object to "issue notification". Depending on your needs, you can subscribe to an event in an object and respond to events.

Seven. .NET Framework class library (Class Library)

Namespace

Unlike the planarization structure of the COM class library, the .NET class library is organized as a set of names with hierarchies. Each name space can contain Types such as classes and interfaces, as well as other sub-namespaces. The ROOT name of the entire system is system, each .NET Framework application emits some of the Types included on System. Types contained in other namespaces may also be used frequently by many developers. SYSTEM is the foundation, but not all.

The structure of the .NET class library

Eight. Access data: ADO.NET

Deal with data, such as search, update, and processing, so that the basic task of the software. Today, most data is usually stored in some type of database management system (DBMS), which is usually a relational database (RELATIONAL DATABASE). Developers need certain mechanisms to allow their applications to access this information. Windows DNA has a group name called ActiveX Data Objects (ADO), which solves this problem. The ADO's Radical Update Time is the NET Framework.

ADO.NET provides a number of benefits than earlier versions of ADO and other data access components. These benefits are divided into the following categories:

Interoperability

ADO.NET applications can utilize XML flexibility and extensive acceptance. Since XML is a format for transmitting data sets in the network, you can read any components of the XML format can handle data. In fact, the receiving component does not have to be an ADO.NET component: The transfer component can simply transmit a data set to its goal, regardless of the implementation of the receiving component. The target component can be a Visual Studio application or any other application that is implemented in any tool. The only requirement is that the receiving component can read XML. As an industrial standard, XML is designed in the case of this interoperability. Maintenanceability

In the survival of the deployed system, moderate changes are possible, but because of it is very difficult, there are few substantial structural changes. This is unfortunate, because in the natural process of the event, this substantive change will become very necessary. For example, when the deployed application is increasingly welcoming by the user, the increased performance load may require structural changes. With the growth of performance loads on the deployed application server, system resources will become insufficient, and the response time or throughput will be affected. In the face of this problem, software designers can choose to divide the server's business logic processing and user interface processing to separate layers on a separate computer. In fact, the application server layer will be replaced with two layers to alleviate the lack of system resources.

This problem is not to design a three-layer application. Instead, it is to increase the number of layers after application deployment. This conversion is easy to perform if the original application is implemented using the data set as ADO.NET. Keep in mind that these two floors will be arranged when replacing a single layer with two layers. Since these layers can transmit data through data sets in XML format, communication is relatively easy.

Programmable

ADO.NET data components in Visual Studio are packaged in different ways to help you speed up programming speed and reduce the error rate. For example, the data command extracts the task of generating and executing a SQL statement or a stored procedure.

Strong type data set

The ADO.NET data class generated by these tools causes the type of data set. This in turn allows you to access data through programming types. Finally, the code of the data set that has been declared is safer because it provides the compilation of the type. For example, assuming that AvailableCredit is expressed as a currency value. If the programmer is assigned a string value in Availablecredit, the environment reports the error to the programmer when compiling. When a data set that is not declared type, the programmer will know the error until it runs.

For applications that are not connected, the ADO.NET database provides performance than ADO not connected records. Significant processing overhead is caused by converting the record set that is not connected between the interlayer transmission using COM. In ADO.NET, this data type conversion is not necessary.

Scalability

Because the Web can greatly increase the demand for data, scalability is critical. The Internet app has unlimited potential users. Although the application can serve more than a dozen users, it may not provide the same good service to hundreds of (or millions) users. Applications for resources such as database locks and database connections are not well served for a large number of user services, as users' demand for these limited resources will eventually exceed their supply.

ADO.NET achieves scalability by encouraging programmers to save limited resources. Since all ADO.NET applications use non-connection access to data, it does not reserve database locks or active database connections over a longer duration.

Next generation SQL Server: yukon

Yukon is a new generation of SQL Server for supply in 2005. Integrated .NET Framework 2.0. The more in-depth integration between SQL Server "Yukon", NET technology and Microsoft Developer tool will increase the production capacity and elasticity of developers, allowing developers to build and maintain strong, safe and expandable database applications. Developers will have a development tool for Transact-SQL, XML, and Multidimensional Expression (MDX). Integration with the Visual Studio? Development environment will provide more effective practical and commercial intelligent applications development and detection. SQL Server "Yukon" will also contain powerful improvements to Transact-SQL languages.

Benefit from more development and flexibility. With embedded COMMON LANGUAGE RUNTIME (CLR) in the database engine, developers will be able to choose from diversified familiar languages ​​to develop database applications, including Transact-SQL, Microsoft Visual Basic? .NET, Microsoft Visual C # ? Net and Microsoft Visual J #? .NET. In addition, CLR integration will provide more flexibility to developers through the types and functions defined by the user. CLR will also provide opportunities to quickly develop database applications using the program code of the use of the workforce.

Use a platform, application, or device to share data. For data types such as native XML support, user-defined data type and XQuery improvements will be perfectly connected to the internal and external systems. SQL Server "Yukon" will provide native support for relationships and XML data, allowing businesses to store, manage, and analyze data for their needs. For existing and new open standards, such as hypervisor transfer protocols (HTTP), XML, Simple Object Acquisition Protocol (SOAP), XQuery, and XML Structure Description Definition (XSD) support, will also accelerate acceleration acceleration Communication between enterprise systems.

nine. Develop Windows related applications

Sometimes, the Browser-based application seems to take over the world. Although the developer has invested a lot of time, it is completely clear how Windows GUI is going. They are now also left to HTML and JavaScript detail. For now software, the browser has become a new default interface.

But Windows Guis still cannot be underestimated. Although the browser is dominated, it is not disappearing directly to access the screen pixel. The .NET Framework designer offers a new set of classes, which is a CLR-BASED application to build Windows Guis. This set of Classes is often referred to as Windows Forms in the System.Windows.Forms namespace.

Local application

A typical GUI model is an Form that has a code responsible for responding events. Windows Forms follows this traditional model. Each Form is an entity of the Form Class, and the message loop accepted and distributed, provided by the Application Class. Each entity of the Form Class has a large set of Properties that control the look that the Form is displayed on the screen. Forms usually contains other Class, which is collectively referred to as a Windows Forms Control (Controls), which is generally used to show some output, accept some input, or both of the user. The space also has Properties, YON and custom appearance. Both Forms and Controls can correspond to Events and make some action.

Another related technology is GDI

GDI is a subsystem of Microsoft Windows XP and subsequent Windows operating systems, and is a new simple, fast graphic image development technology provided by .NET. As the name suggests, GDI is a follow-up version of GDI (earlier version provided by the earlier version of Windows). GDI is an Application Programming Interface (API) that is displayed by a class deployed as a hosted code. This set of categories is called GDI "managed interface". Programmers can display information on the screen or printer using the GDI graphics device interface without considering the specific situation of a particular display device. The application's programmer calls the method provided by the GDI class, and these methods are in turn calls a specific device driver. GDI isolates the application with graphical hardware, which is the application that allows developers to create equipment-independent applications.

2. Intelligent client technology

What is smart client?

Briefly, the Smart Client Smart Client is such an expandable desktop application that integrates different applications: it can have no contact deployment, that is, it is necessary to install, dynamically loaded, XCOPY can run without modifying the registry You can dynamically upgrade, automatically update, which can be easily connected to the firewall problem without worrying about firewall problems and convenient departline, convenient to connect WebServices's Windows applications.

SMART Client Features

Dynamically loaded, you need to install

The mutual call between the various components of the application does not use direct reference, but is dynamically loaded, that is, the way to install, effectively reduces the consumption of system resources. Application software developers can develop according to the public interface of the enterprise application system, and then publish the application component on the enterprise server, and the client application will automatically discover and load the application component.

More loose coupling

Since the mutual calls between the above-mentioned constitutors do not use direct reference, the system implemented more loosely coupled, providing an application upgrade update to the application upgrade.

Further modularity

Due to the loose coupling characteristics of the application, the further modularity of the system makes it possible, new features, new features, only need to develop new modules that meet interface definitions and add a connection. There is no need to modify the reproduction of existing procedures.

Zero contact deployment

As long as you do one main program file to the local, you can run it directly, you don't have to change the registry or shared system components, and other application components will be automatically downloaded at the first runtime.

Network load application component

Smart Client's application can easily load applications from the web server, and because the programs and load are implemented from the 80-port, there is no need to consider the firewall problem, which provides convenient for the centralized management of the enterprise system.

Automatic update

Simply publish the new version of the program on the server, automatically discover the latest version of the program and application components by the client, and download and update automatically.

Applications available online with offline

The SMART Client application despite the use of network loading assemblies, but once loaded, the assembly is cached to the local. When the user starts at least once an application, its assembly is downloaded and cached to the local memory, so the user can run your smart client offline (by converting the browser to offline working status), suppose the application is not You can run it permanently access Web Services or a shared database.

The biggest benefit of building a smart client is to use offline. Although the connection between the business is getting closer, we still can't provide a continuous connection to the enterprise application. Offline mode of operation can automatically receive data and application updates when you re-online, this feature is that people want to get, but before .NET, this is difficult to achieve. Like the fat client, the smart client distributes a lot of processing to the client, which is for the server to eliminate the load that needs to be borne in a web-based application. Finally, the intelligent client takes a user hopes that the application is working - allowing fast data access and management without the need for unnecessary screen updates. Personalized user interface

The user can set the client application according to the preferences, and the configuration information will be saved to the server.

Perfect integration with WebServices

The Smart Client app can be easily integrated with WebServices, so you can easily enjoy the perfect user experience of the C / S application without worrying about a series of issues such as firewalls.

Advantages of Smart Client

Despite a lot of advertisements, thin web solutions don't have to be the future of all enterprise applications. Don't discard WinForms to build an idea of ​​enterprise applications, because enterprise applications require centralized distribution. The following table describes the contrast between Smart Client and other solutions:

Table 1 relatively couple

You can simplify your decision process by comparing the functions of your smart client and web applications.

Smart Client's working model

Figure 1. Smart client working model

The application loader uses HTTP to access and download assembly from a virtual directory on the web server. After downloading, the assembly is cached, only when needed.

3. Future of Windows: Longhorn

In May 2003, Microsoft conducted the internal premiere of Windows next operating system Longhorn in the New Orleans Windows Hardware Developers (Winhec). Microsoft introduced the development plan of the Longhorn operating system at the court, and believes that Longhorn is the Windows 95 operating system. After the Windows XP operating system, the most powerful and most prominent desktop operating system.

Key Technologies of Longhorn:

Application Programming Model "Winfx". The extension of the programming model of ".NET Framework", Microsoft said: "The development efficiency and application of the developer will significantly increase the development efficiency of the developer." You can even think that .NET Framework will be renamed WinFX, becoming a Longhorn main API.

Graphics technology "avalon". It is a user interface, a document, and a comprehensive architecture for displaying multimedia.

Storage technology "Winfs". The means of retrieving, association, and information will be strengthened. The corresponding application data structure is employed based on a specific requirement.

Communication technology "indigo". Support for web services, can exchange high security information, and can interconnect.

ten. Develop web related applications

Accessing software via the web is already a very generous thing. Most new enterprise applications provide at least the options for the browser interface, even only provide the browser interface. In view of this, if an application platform does not provide level of support for building a web-based software, it is not destined to fail. In fact, the way to use software through web is also changing, and it is important to communicate with users through the browser, but the Web Services also debut. The Web has been driven by a simple eye drive, expanding to the world driven by the application.

ASP.NET is the primary basis for building web-related applications. As a .NET Framework class library, it also supports creating "browser applications" and "Web Services applications", both depend on the infrastructure.

Browser application

From the previous ASP: Italian noodles

ASP.NET's new performance:

Code separation

This feature is called code-behind, put the code in a separate file, you will not see the hidden code in the pasta.

(Similar) Event Drive Model

ASP.NET implements a mechanism such as an event-driven model, but because HTTP is a stateless protocol, it can only be called "similar".

Web Controls

Web Controls makes it easy to create Forms and HTML Controls. For example, in the typical selection box / select box in the ASP, you have to create a loop to allow the control system to load data. But in ASP.NET, you will have a "data-bound", which means it will be connected to the data source and automatically load data.

language support

ASP.NET supports multiple languages, and its default language will be: Visual Basic instead of VBScript, which means we can get rid of VBScript language restrictions, our code will be compiled after compiling (instead of explanation) .

Better code control

We are very loved for this feature that COM objects no longer need to register on the server. But through this process, you can no longer be able to run another DLL version on your server, and the code is quite confidential, which means that if there is no correct development tool and source code, it is difficult to change the code.

Better upgrade capabilities

This system is built, which has a certain feature to improve performance in multiprocessors and string environments. For example, the Session State is maintained by a separate processor, on a separate machine, even in a database that is allowed to cross the crossed server session.

2. Web Services Application

Web servces application dependent .ASMX webpage in ASP.NET

Like the browser application described so far, the server-side ASP.NET Web Services application also rely on the web. The files where these pages are located have a .asmx extension, which does not include any HTML, just some code. This is because the server is only accessed by software, not accessible, so there is no need for HTML, in other words, the server does not show the user interface.

Web method attribute is used to open Method as Web Services

In order to open a .asmx file into a web service, your only thing to do is inserting Web Method Attribute in the declaration of Method, so you can. Once the file is suggested, this Attribute will be stored in the metadata of "assembled for this to create", just like all other characteristics. He provides a signal to ASP.NET technology: This Method should be accessed by Web Service.

Web service client relies on Proxies (proxy)

In order to use Web Services, the developers must first create an Proxy Class that opens the same Method. With this proxy class, the client knows how to call and enjoy the service.

.NET Remoting

.NET Remoting does not belong to the technical category of ASP.NET, but provides a function similar to Web Services.

Comparison of .NET Remoting and Web Services:

Both use SOAP protocol

.NET Remoting is limited to communication between communications, and Web Services is committed to providing different capabilities of different platforms.

Under the premise of communication between communication, .NET Remoting provides higher performance. eleven. Development of Smart Device

What is Smart Device

The Chinese meaning of Smart Device is "smart device", which refers to the mobile, embedded or human machine-interactive electronic product using the Windows CE operating system, and other electronic products using the Smart Phone, Pocket PC. Pocket PC (hereinafter referred to as PPC) I will be very familiar, now there is a fairly user group. The products such as Casio, Kangbai, etc. have already entered the Chinese market, and domestic companies such as Lenovo also actively launched similar products, competing for this future, which is very potential.

What is .NET Compact Framework

Microsoft introduced .NET Framework 1.0 for Windows platforms a year ago, I think everyone is very familiar with this. In April 2003, Microsoft launched Windows Server 2003 and Visual Studio .NET 2003. The Windows Server 2003 is more integrated .NET Framework 1.1, and VS.NET 2003 has also added a lot of fresh development templates.

The Chinese name of the .NET Compact Framework is .NET Framework Lite. Simply, if the Windows CE operating system is an embedded or mobile electronic device Windows, then .NET Compact Framework is the .NET Framework on these devices. In fact .NET Compact Framework is a subset and supplement to embedded or mobile electronic devices for embedded or mobile electronic devices .NET Framework. .NET Compact Framework has two main components: public language runtime and .NET Compact Framework class libraries.

Public language runtime

The public language runtime provides an execution environment for managing the .NET Compact Framework code. The form of code management can be memory management, thread management, security management, code verification and compilation, and other system services. It is designed to enhance performance at runtime. It uses real-time (JIT)-compiled methods to allow managed code to run in this machine language running the application. This way, you can create applications for multiple platforms without having to worry about recompiling or regenerating executables for each platform.

Even if your mobile app is written in Visual Basic .NET or C # .net, you can still integrate functionality and subroutines stored outside the dynamic link library (DLL, including Windows CE API). The data type provided by .NET Compact Framework and the structure of the structure allow you to easily integrate the Windows CE API's functionality into your application.

.NET Compact Framework class library

The .NET Compact Framework class library is a collection of reusable classes that are closely integrated with the public language running library. Your app will take advantage of these libraries to derive the required features. Just like other object-oriented class libraries, .NET Compact Framework type can be used to complete many common programming tasks, including interface design, using XML, database access, thread management, and file input / output, etc.

.NET Compact Framework is a compatibility of the .NET Framework full version

Since .NET Compact Framework is a compatible subset of .NET Framework, you mean that you can use VB.NET or C # to develop applications for the Pocket PC using your familiar you know, and you don't need to consider this PPC. The processor is ARM, MIPS or other processors, even better, this application can work as good as your desktop!

twelve. Offic extension application uses Office as a business solution platform

Developers can use Microsoft Office 2003 applications as a platform for creating custom solutions. Office allows developers to take advantage of a wide range of preset features.

Using Microsoft Office Word 2003 or Microsoft Office Excel 2003 As a solution, developers can use familiar user interfaces and powerful tools such as spelling, multi-language support, change tracking, and data perspective. Another advantage is that the client part of the solution is used, which is easier to implement complex solutions than using a web-based structure.

Visual Studio tool for Microsoft Office systems

Microsoft Visual Studio tools for Microsoft Office systems can help you create a solution, the method is to use Visual Basic .NET and Visual C # extension Word 2003 documentation and Excel 2003 workbook. The Visual Studio tool for Office includes a new Visual Studio .NET project for creating a Word document, a rear code of the Word template, and an Excel workbook. These items include:

Quote for the main interoperability assembly of the project

Quote for the required system components

Project initialization

Make developers quickly get started with security settings

Visual Studio tools for Microsoft Office systems help you quickly create a solution, which takes the built-in functionality of each application and provides the following advantages:

Back end hosted code for Word and Excel

Visual Studio tools for Office include Visual Studio .NET projects to help you write Word and Excel's backend managed code in Visual Basic and C # in the Visual Studio .NET environment. Your code responds to an event that occurs in a document or workbook. For more information, see the structure of the Office solution extension using the managed code.

Deployment and maintenance

When deploying an Office solution using a managed code extended, you can store compilation code and document in a shared location for easy maintenance; you can also send a copy of the assembly and document to each user to accommodate a mobile mode.

Safety

Security features provided by Microsoft .NET Framework are secure. The default policy is not allowed to operate in any assembly, which helps protect users from viruses and other malicious code. Before the end user can use the managed code extension of the document, the administrator must explicitly grant the assembly to fully trust.

Offline access

If you deploy an assembly to a network location that can be accessed with a web address (http: // or https: //), you can use the Internet Explorer feature to cache the program to your local computer. This allows the local document to use the assembly when not connected to the network. If you deploy a local copy of a document and an assembly to each user, you don't need to consider the network connection problem.

Typical structure of solutions

The following relationship diagram illustrates a typical solution structure. The upper part of this relationship shows the runtime experience from the end user's angle.

Steps involving end users at runtime:

1. The end user opens a document or workbook with a managed code extension (pointing to the custom attribute of the hosted code assembly).

2. Documents or workbooks download the compiled assembly from the shared network location.

3. The assembly responds to the events in the document or workbook.

The lower part of this relationship is a design when the developer and (optional) design are designed.

Steps involving developers and designers when designing:

1. Developers create a Microsoft Office 2003 project in Visual Studio .NET. The project includes a document and an assembly running in the back side of the document. This document can be existing documents (mostly created by designers), or you can create a new document with the project. 2. Designers (developers or others creating the project) created the final appearance of the document for the end user.

Since developers work primarily in Visual Studio .NET, end users work primarily in Microsoft Office 2003, so it can be understood in two ways to understand the Office solution using managed code extension.

Developers 'perspective End users' perspective developers write code and excel accessible using Visual Studio .net. Although developers seem to be created a executable running Word or Excel, the actual working mode is not like this. The document is associated with a assembly and contains pointers to the assembly. When you open a document, Word or Excel locizes the assembly and runs code for all processed events. Users using the solution only open documents or workbooks as opening any other Office files (or create new documents from the template). The assembly provides custom features in the document or workbook, such as automatically populating it with the current data, or the display dialog box to request input information. When this code performs these actions, users don't know why this document is different from any of the other Office documents.

thirteen. .NET My Services

The next generation of computing model based on XML Web Service has identified the industry. As a software vendor with a longer product line, Microsoft has been leading to the next generation. After introducing various related products of XML Web Service, Microsoft has recently released its own XML Web Service-based platform, which is Microsoft My Services. For a long time in the past, My Services had been concerned with its development code HAILSTORM.

Information communication challenge

Although in the past 25 years, the extraordinary value of information technology has been widely recognized by the user, but it is still far from mature, and it has to be strengthened and improved in many ways. Various equipment and applications are all polite and do not consider contacting the world around.

The consequence of this is that each device, each application and even each Web site has its own set of rules and usage methods, causing users' confusion. For example, we enter a friend's phone number to the PC to tap the keyboard in a certain order, and the method required to enter the same phone number in the Palm Pilot, Pocket PC or mobile phone is completely different. Therefore, we have to start from the most basic character input method, learn to use each device.

Although we are proud of the progress of informationization, we don't really master the information and equipment around you. It is not difficult to find that our important information is scattered in the technical space. There are hundreds of corners: in a PC application In a server in units, the user tracking table in the unit and the website ... The phone number stored in the mobile phone is not known for the email program, because these two technologies are unable to understand the other's language.

If you move, change the address, you often have to update your delivery address in every Web site, if you neglect, "Convenient" Internet will bring you a less than a little lesson. You may not have your personal information, which often is forgotten on an internet. The isolation characteristics of various applications, Web sites, and services make various technologies to work effectively. If you have booked online, because there is a lack of effective communication, the Web site is difficult to automatically synchronize your trip to the schedule application. Even if it is achieved, the communication between communication cannot guarantee that the customer is the same. Maybe we have to admit that now, we actually adaptive information technology, before we enjoy new technologies, we must first adapt to the new rules that have been imposed. This inconvenience has restricted more creative new technologies and new products development and application.

First read .NET My Services

According to the definition of Microsoft, .NET My Services is a set of users-centered software service structure frameworks, which is a collection of various uses of XML Web Services. Microsoft .NET My Services can simplify the work integrated with existing isolated applications. The biggest change is that .NET My Services is user-oriented, not for specific devices or applications. It enables users to truly control their own information to protect private data, making personalized services easier. Thanks to Microsoft .NET technology, .NET My Services can make various devices, applications, and services work effectively, and users can control who can access their own information, which level access, as well as payment, etc.

User or the user is actually centered on user data. Therefore, .NET My Services attaches great importance to the security of user data, ensuring security, completeness, and privacy of data through Microsoft .NET Passport. When any application needs to access user data, users need to confirm.

Take the ticket to automatically access the user's personal intent information and payment service (by the user's confirmation), if the user is a business trip, online travel ticket booking service is also available. After the .NET MY Services, individual group relationship services determine the location of the company in the company, depending on the relationship, and matches the company's business travel policy, so that the flight level and schedule can meet the relevant provisions of the company. Once the flight is selected, the travel service can also automatically select the corresponding schedule service, automatically update the route information, and notify when the flight delay. With .NET My Services, you can share the schedule to make the reception to know your trends. Your schedule information can be accessed through your PC, others's PC, a smart phone, PDA, and any smart information devices.

.NET My Services Working Principle

.NET MY Services is actually consisting of 3 parts, namely identity authentication (.NET Passport), Message Transfer (SOAP), and Data Description (XML). Figure 2 shows the process of using the .NET My Services to access user data using the application .NET MY Services.

.NET Passport

.NET Passport is the use of the Kerberos protocol to complete identity authentication, Windows 2000 and Windows XP use the Kerberos protocol. Simply put, Kerberos implements user authentication by centrally stored security information and distributed "Tickets". Specifically, .NET MY Services implements user authentication by the following steps.

Users enable client applications or browsers, open the login interface, and enter your username and password.

Login Action Runs a client application or website requests a login confirmation certificate to .NET Passport (ie "Ticket-Granting-Ticket", TGT). .NET Passport verifies the user password to issue TGT to confirm that the login has been successful. Under the premise of meeting a certain safety constraint, the TGT is cached during a certain period of time.

The client application or website is submitted to the TGT to the "Provenance Service" in Kerberos, and the "Session Ticket" is issued.

.NET Passport uses TGT to verify that the client's identity is correct (ie, if it is valid), confirming the corresponding Web Service issued session proof.

The client has proved to the requested Web Service submission. After confirmation, the client is unfained by the Web Service information exchange, and all data is encrypted via the session to ensure security.

SOAP

SOAP is based on XML-based protocol, and a SOAP message consists of 3 parts. The first is an envelope, used to describe the structure, content, and processing method of the message. Second, a set of rules describing methods for processing different types of data. Finally, it is about the original process call and its corresponding approach.

With SOAP, applications can not only implement data sharing, but also to call the method and attributes of the remote application object, without having to understand the other party's application structure, and do not require a specific binary code, runtime library, and any platform-related conditions. .NET My Services accesses the Web Service through the SOAP protocol.

Xml

The bottom layer of .NET MY Services is XML, a marker language based on SGML-based text. XML has an excellent characteristic that can be self-description and data-centered. There are already many related materials about XML, and there will be many other details.

fourteen. Visual Studio.NET

At the 2001 Atlanta Tech ED 2001, Bill Gates introduced the latest developments in Microsoft for enthusiasm. However, Visual Studio .NET is the cornerstone of the NET platform, not just a development environment. Visual Studio.net is built with developers to create applications.

Due to the common language runtime (CommON language runtime), Visual Studio.net provides a general development environment for C , C # and VB programmers. JScript programmers will receive a limited support for Visual Studio.net when creating an ASP.NET and Web service applications. And XML developers will very much like it to strong support for XML documents, XML outlines, and XSL conversions.

practice

Visual Studio .NET is easy to set up. The installer will take you the main three steps: update the system component, install the .NET frame, and increase the Visual Studio .NET. If you like it, you will get C and your class libraries and tools, C # and VB. You will also get Crystal Reports, server components, and tools for resetting applications. When the environment is called, a window similar to the browser will appear, you will be taken to the start page, this page contains links to online resources, updates, news, and downloads. Downloadings are especially useful because it takes you directly to Microsoft's MSDN area where you can get the latest software toolkit, source code examples, and reference implementations. The web host link brings you a web page that contains a list of companies that support ASP.NET. Like Microsoft said: "Each company provides you with an experimental test place." Another link allows you to modify your shape based on your current development type. For example, the web developer can choose an InterDev shape, setting a keyboard and window layout similar to Visual Studio 6, setting a help file filter - it only pops up a document related to the Internet development. Visual Studio.net makes full use of screen space. First, multiple windows can be opened on the screen, and then switch between the window via the jumper. You can also fix the window on the screen, or place them to any side of the screen, such as the attribute window. When the mouse is slippery at the berth window, it immediately slides to the screen. This makes it easy to convert between navigation windows, toolbars, attribute detectors, and editing. The environment is configurable. From the Tools menu, you can modify the regular settings for all environments and you can set options for each language. That is, if you need to convert between VB and C #, this setting function is useful. In addition to controlling Visual Studio.NET, you can customize the editor, set fonts, and colors, setting the default storage location for engineering and scenarios. The characteristics of the development environment include improvement of the debugger and shape, and a tool that supports the new deployment model has increased source code control. As a quick reference, the Schedule summarizes the main features. edit

Visual Studio provides a unified code editor for all languages ​​supported by Visual Studio.net, and supports specific features for each language. The editor has great improvements, such as a word prompt, incrementing search, code outline, overlapping text, line number, point color display, and shortcuts. The editor also provides a number of language-specific features, such as it can complete the prototype and function calls when entering.

In addition to programming languages, the editor also supports HTML documents, laminated style forms, and even XML development. In fact, keywords in the XML document, such as XML declarations and properties, have been displayed by high brightness through color. Moreover, the editor provides source views and data views. In the data view, the structure of the document is displayed in the left window. When an XML element is selected in this level, the table right of the window displays its sub-elements so that you can dig your element data. However, abnormal is that all XML elements can be transferred into the data view. A document with unpredictable structures, the editor will not know when trying to transfer to the data view.

Another pleasant thing is that Visual Studio .NET enables you to create an XML outline according to the document instance. By default, the document instance is opened in the document source view. You can still be in the source or convert to the data view, then right-click on the view, select the creation outline from the pop-up menu. Then there is a dialog box that allows you to enter the name of the outline document. Once the outline is created, the reference to it will be inserted into the original document instance. For those who don't want to write XML outlines from head, Visual Studio.net allows you to skip start.

Engineering and solution

Another convenient feature is a solution. A given solution involves multiple projects. Solutions like a stand-alone engineering, managed in the Solution window. Therefore, you can access, create, edit, and delete a single file in any project defined by the solution. When setting up an independent project, VB, C # and C programmers usually discover this process is very labor-saving. Use VB to create an ASP.NET application in a few minutes. The environment automatically creates a virtual directory on the local web server, adds ASPX and Global.asax files, CSS style forms, some parts, find files, and an XML document containing engineering configuration information --Web.config. What you do is just executing an ASPX document in a web browser to run your application.

On the other hand, JScript developers will face difficulties because JScript is not integrated with the Microsoft Development Environment (MDE). This means that you must manually set the virtual directory, manually created, manage many files.

Language change

Like the platforms it support, Visual Studio .NET also has changed in programming. VB programmers will feel tremendous due to integration of VB and general language runtime. You may need to re-design the entire code block. For beginners, inheritance and polymorphism means that VB will eventually become a true object-oriented program. VB can now transcend method and overload method calls. VB also introduces structural abnormal processing, supports interfaces and multi-threads similar to COM. In addition, many language components are abandoned, some are replaced by new attributes, methods, and functions.

JScript can also find that JScript has changed significantly. All JScript variables must now be declared due to the essence of compiled languages. Data types are also introduced. Previously, JScript programmers could create variables without data related to data. However, now the .NET application specifies the data type for variables. Don't leave JScript programmers, but the introduction of data types makes JScript programmers have encountered problems that have not been encountered before (such as type compatibility). JScript also introduces a class, function overload, and the property acquisition and setting. Other language features include constant statements, enumerators, and new import declarations. It is definitely not the first generation of scripting languages.

Visual Studio .NET is a very rich development environment, and the support capabilities of universal language make developers to freely convert between C , VB and C #. The editor also supports XML documents, XML outline, HTML, and CSS creation. Debugger and Profiler have enhanced, new tools support deployment, source code control, and many other features. Of course, there are many important changes to possible .NET programmers. That's why I can't imagine how Visual Studio creates the .NET application.

fifteen. Conclusion

.NET provides developers with better, more powerful environments

The startup of .NET is a big step towards Microsoft. By providing a new foundation for developing Windows applications, this company is almost almost forced developers to begin climbing a lengthy learning curve. However, the benefits of Web Services, .NET Framework, .Net My Services, and .Net other parts. This new development environment is more now, and more services are available. Once the developers have mastered .NET core technology, their productivity will greatly improve; use built-in Web Services support to develop new types of applications. In the end, .NET is likely to achieve the ultimate goal: the best software has developed with the least amount of time.

In order to get more powerful power, you must accept changes

However, in order to obtain these powerful power, the negative impact of developers must endure is: a large change. Windows developers must learn many new language features (if they learn C #, that even a new language), one (at least some part) is both large and new standard libraries, as well as new concepts such as Web Services, etc. Some developers even have confidence setbacks because they have a large part of the knowledge that has lost its role. For example, unless you want to interact with the existing code, COM is unable to use what is in ..NET Framework, the software developers in the Microsoft Environment, the COM detail knowledge learned, for the development of Framework -BASED app has no significance. With the introduction of the .NET Framework's Windows Forms, existing GUI technology has become worthless. Even in terms of data access, there is a considerable difference because ADO has been replaced by ADO.NET. However, complaining is no meaning, and for developers who wish to work in this environment, the only option is to invest the necessary time, starting with .NET, because .net is developing applications on Windows the future of.

As the changes of cheeses change,

And enjoy changes!

转载请注明原文地址:https://www.9cbs.com/read-24278.html

New Post(0)