Use ASP, VB and XML to build Internet applications (1)
The era of using stand-alone applications on PCs is about to pass, and most applications now develop web versions or most need to share rich data resources on the Web. We have been writing for a long time based on the client/ServerApplications, but most of these programs are just running inside a small LAN. However, there are many objective reasons that require us to modify these programs so that they can run on an intranet or even the Internet.
What is the reason that compels us to do it? First of all, as the size of an enterprise gradually expands, the company may cross regional or even multinational operations, the number of employees in each branch will increase every year, these staff in the field certainly need to visit the company's database resources frequently; second, centralize the application's data resources, Enables you to better monitor the access and use of your database. Third, you can maintain and update the global application settings by getting them from a centralized location, ultimately reducing application updates. Four, try to access the database from the Web server rather than accessing the database from the client, so that you can avoid the security risks by sending the login information and the client password over the network, and by using the browser to get the data from the background, you can avoid refreshing the entire page.
This requires us to create an application that runs on the Internet, and if you want to create a running HTTPProtocolVB program on, then the key is to use XML and XMLHttpRequest objects. This object is Microsoft Part of the XML parser (Msxml.dll), XMLHttpRequest object allows you to send a GET and POST request to a remote server via HTTP, and a program running on a remote server receives the request, translates its contents, returns the data or an error page to the application that invoked it. Some of the research on network programming friends will see that this idea is very much like soap, but I don't want to use soap here, because if that makes the program very complicated.
It is not realistic to want to change a fully independent client-side program, but even so, downloading application settings from a centralized server is more independent and flexible than using a local INI file or a Windows registration label. For example, suppose you have a mobile phone sales force, they need to access centralized information to more efficient sales of mobile phones, each day, the head office collection of data, and then sent to the sales staff in the form of e-mail. However, market pressures and rapidly changing forms of sales are bound to enable salespeople to access the latest data information. However, network administrators insist that salespeople at remote clients are denied access to the corporate database server because they do not want to send their username and logon password over a public network. Therefore, it is bound to use a new technology to replace the client/server based technology, do not worry, I want to read this article you will solve the problem.
|