.NET initial reading

zhaozj2021-02-08  241

BY ROBERT HESS original: http://msdn.microsoft.com/voice/hess12112000.asp.net initial reading now Maybe you will have no face because I have never heard of the new .NET strategy of Microsoft. Depending on your information from others or in your reading, your mind is .NET perhaps a magnificent building for the entire distributed structure, or just a web application alias. But there is a thing that is more clear, that is, everyone is .NET, and .NET development to Web and application this means what is more confused.

I don't dare to claim to be .NET experts, but I think I have been involved in its design, the development process, so I can provide some useful information to help you understand the position, purpose and goals of .NET. So, although the next content does not provide development-grade information, you can't tell you how to use the .NET development program, but you can really give you some guidelines, so that you can tell you at least for your colleague or family.

Recalling the past, we have to go back to see how the new programming mode evolves into part of the operating system. Now I want to go back to the early 1980s. At that time, when considering buying a computer, IBM PC has begun to become one of many options. Its operating system is MS-DOS, just like almost all operating systems at that time, this is a strict command line, based on the text-based operating system.

Although most applications at the time were well operated in these early computers based on the text-based environment, some programmers began to accept challenges to create their own, graphical environments. The user first starts with the text-based operating system and then runs the program to switch to graphics mode. This type of program is relatively simple, only provides few functions, and some are relatively powerful and functional. To design and implement a set of graphical user interfaces (GUI) libraries to do considerable work. Special pain is that there is almost no common in these different implementations. To fully implement a truly powerful GUI, you need to start from the operating system level. So later, Apple, Microsoft and other companies have developed the operating system of the graphics interface, which not only supports the development of GUI applications, but also greatly expands the ability of these programs, which provides the library not only support window and menu. The drawing also provides a rich system service to make developers more smooth. These services include print modes that are independent of the device, even system clipboards, and more, which are very useful for developers.

I hope that I will be clear about this history, we will start here.

Go back now, now we jump back to now. Imagine the Internet is playing the role of personal computers in the 1980s, the Web site is the original program. If this web site just includes some hyperlinks or some text documents, it is like a program of the past text mode. If this site provides interactive service, then it can be compared to the GUI at the time. Program. Under Interactive Services, users provide information to the Web site, which is handed over to application logic in the Web site to process and generate a result. Such an example has a shopping cart, the translation service provided by Altavista and the package tracking service provided by UPS.

First take a look at the shopping cart. Almost all shopping carts will support enter credit card information. Many times this information is only recorded as part of the transaction information, a good shopping cart will be able to quickly and accurately check the credit card information to the credit card issuer, if the user enters the wrong message, it should give the user one remind. But what should I do when this Web site wants to support a new credit card type? The developer of this site must contact the credit card company to find out the electronic verification service they support, and then write its own code according to the company's electronic verification.

What will the translation service? If we are writing an e-mail program, don't you think it is useful to join the instant translation feature in your program? Altavista has a site that provides this service, you can quietly launch a hidden browser control, give it some necessary information, then check the information it returned, locate the translated information on the returned page. Finally, finally extract it out to provide to the user. This is similar to those of some graphical interfaces from text mode or in a large computer terminal. This is a widely known screen interception, which is more complicated and quite fragile, because the layout of the target screen changes, even a very small change will bring a very serious problem, and in some cases this implementation It is not moral. Now let's discuss discussing parcel tracking services, imagine if your site allows your users to query the current state of the goods they ordered, will it be? This information will be very effective through the UPS tracking number, or the links to the UPS site, then your users will get a detailed report about their current state, maybe this time The parcel is still boring over the sea. But you don't think this will be more convenient, that is your site and UPS site interaction work, then provide this information on your own website? In this way, this information will share the same user interface as the other parts of your site, and don't worry that users don't know how to return to your site after you accidentally lose your site.

In order to provide users with an integrated service experience, the above example or requires you to find a way to get their services from other companies, then develop your own user interface for these services; or write a screen intercept program to take the corresponding Information If the company has provided the same service as it is available. Very obvious, whether it is the implementation, the amount of code and coupling is too large, and there are many potential problems and malfunctions. These pathways are in essentially in the 80s to interact with the equipment that cannot be directly supported by the operating system.

Standard Agreement A more good solution should be a wide range of ways to interact with remote services. This way is not just connected to a company's service, but also find what kind of service providing this company, just like XML, SOAP and UDDI goals. XML (extended tag language) represents information into a format that is easy to program acquisition or processing in your needs, SOAP (Simple Object Access Protocol) based on XML, special designed to provide remote service interface information. UDDI (Universal Description, discovery, and interface is a set of standards that are advocated by industry and have the ability to detect Internet services and resources. These standard interfaces are working hard to work hard in the long way to connect and use the service provided by another site. However, because the current operating system is not able to support XML / SOAP directly, you must use these interfaces after skipping some obstacles. You can write your own XML-based compilation engine, or use others, then interact with the XML document object model, create and check the data passed back and forth. This is very meaningful, and it is absolutely more than the screen interception. Going to the .NET better solution is that all XML / SOAP / UDDI can be directly supported by the operating system, and then the operating system calls them as a pretty ordinary function call or the interaction of the object. For example, the following things provide a wonderful way to use the application to call Altavista's translation services. Avtrans = New Avtranslation ("Here Is A Sample Line of Text", "English"); strRRRESULT = Avtrans.TranslateTo ("French"); this is one of the benefits that .NET gives us. It not only allows applications to directly access and utilize remote web-based services, but also allow web servers to provide this service to the outside. This does not mean providing a web server to serve services, and the client is not necessary to use the web service. Net is not available, but it is more convenient to use the .NET platform for these development. Attributes, methods, and events. Oh, my god! .NET design, of course, is not only stopped on this level at the Internet interface. This programming model that accesss the remote service is also logically logically logically using the internal transaction using this programming model to access the remote service. In other words, this programming mode will be spread all over the general program. Its objective is to provide a unified, component-oriented programming model. Whether you want to display a remote translation service or a file system or a dialog box, all support will be a generalized component-based interface: properties, methods, and events. Supported .NET programming languages ​​can be easily and harmonized, regardless of the language development of these components, all of these languages ​​are equal citizens, one VB application can call components written with C The method, while capturing an event triggered by COBOL development. And collaborators will never be aware of their partners in another programming language. Affirmative, the application will also be divided into many levels in the advantage of using these services and architectures. You can imagine that you have been using a large-scale electrical typewriter terminal, what is the app to explain the graphics interface, how fast you can master the scroll bar, combination Box, what about the essence of its palette management? .NET is like a thoughts of a new development application. If you only see part of it, maybe you can't find it, and when you get this indivisible overall knowledge and find how each part of how to work together, you will I found that the huge excitement of buried, at least for me. I have never planned to let this rough discussion of .NET deep into any details. I will peek into the characteristics and ability of .NET in the later article.

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

New Post(0)