Wednesday, May 4, 2011

Web Services

Web Services for is released by the enterprise to finish its specific business needs online application service, other companies or application software can through Internet access to and use the online Services.
introduction
It is a common model building applications, can be in any support network communication operation in the operating system; It is a kind of new web applications, branch, is a self-contained, since the application of description, module, can be released, positioning, through the web calls. Web Service is an application components, it logical for other applications provide data and services. Each application through the network protocols and rules of some of the standard data format (Http, XML, Soap) access to Web Service, through the Web Service internal executive to obtain the required results. Web Service can carry out a simple request to the complex business processing of any function. Once deployed later, other Web Service application can be found and call it deployed Service.
Technology and rules
In constructing and use Web Service, mainly use the following several key technology and rules:
1. XML: describe data standard method.
2. SOAP: says the agreement to exchange information.
3. WSDL: Web services description language.
4. The UDDI (Universal Description, Discovery and with) : general Description, Discovery and Integration, it is a kind of platform-independent based on XML language, used to describe in the Internet business agreement.
related
In fact, WebService's main goal is to cross-platform can interoperability. In order to achieve this goal, WebService completely based on XML (extensible markup language), XMLSchema XSD () platform-independent software suppliers, independent of the standard, is to create interoperable, distributed applications of new platform. Thus it can be seen in the following three cases, use WebService will bring great benefits.
A: comparisons across firewalls communications
If application has thousands of users, and distribution around the world, so the client and server communication between will be a thorny problem. Because the client and server usually has a firewall between or proxy server. In this case, use DCOM is not so simple, usually don't facilitate the client program released to such a vast number of each user hand. The traditional way is, choose to use the browser as the client, write down a lot of ASP page, the application layer exposure to end users. The result is that the development is difficult, and program difficult to maintain.
For example, in applications to join a new page, you must set up good user interface (Web page), and, on this page containing corresponding business logic behind the interlayers component, but also establish at least an ASP page again, used to accept user input information, call the middle components, formatted as HTML forms, the last turn "results page" back to the browser. If the client code is no longer so dependent on HTML forms, client programming is much more simple.
If interlayers components into WebService words, can directly calls from the user interface, which saves.diamond components that establish ASP page step. To call WebService, can use directly MicrosoftSOAPToolkit or.net such SOAP client, also can use their own development SOAP client, then put it and applications joined up. Not only shorten the development cycle, can reduce the code complexity, and can enhance the maintainability of the application. Meanwhile, the application will no longer need to call in each component, intermediate jump to the corresponding "results page".
From experience, in a user interface and interlayers have more interactive applications, use this structure, can save a WebService spent on user interface programming 20% development time. In addition, such a WebService composition by the layer, can completely in application integration or other occasions reuse. Finally, through the application of WebService logic and data "exposure" come out, still can let other platforms customer reuse these applications.
Comparisons 2: application integration
Enterprise-level application developers know, enterprise to often written in different languages, on different platforms all kinds of programs run on integrated, and this integration will spend a great development strength. Applications often need from running in the IBM mainframe programs get the data; Or put the data sent to host or UNIX applications. Even in the same platform, the different software manufacturers in the various software also often need to integrate. Through WebService application can use standard, the function and the method of data "exposure" out for other applications.
For example, have a login procedures, used to login orders from customers to new orders, including customer information, shipping address, quantity, price and payment terms, etc content; Another order execution procedures, used to actually shipments of management. The two programs from different software vendors. A new order in order after login procedure to need to notice, orders program sends goods. Through the above order execution procedures, add a layer WebService orders AddOrder program can be "out" exposing "function. So, whenever there is a new order comes, order login program can call this function to send the goods.
Three: B2B integration comparisons
Use WebService integrated applications, can make the company's internal business processing more automation. But when trading across suppliers and customers, breakthrough when the boundaries of the company? Across the company business integration is often called B2B integration.
WebService B2B integration is the key to success. Through WebService, companies can put the key business applications "exposure" to designated suppliers and customers. For example, the electronic order systems and electronic invoice system "exposure" come out, customers can send orders the way in electronic, suppliers may send the way electronic raw materials purchasing invoice. Of course, this is not a new concept, EDI electronic document exchange) is already so. However, the realization of WebService than EDI WebService much more simple, and running in Internet, anywhere in the world can be easily realized, its operation cost is relatively low. However, that doesn't like EDI WebService document exchange or B2B integration is the complete solutions. B2B integration WebService just a key part, still need many other parts can realize the integration.
B2B integration with WebService to realize the biggest advantage can easily realize interoperability. As long as the business logic "exposure" come out, become WebService, can let any of the given partners call these business logic, regardless of their system in running on what platform, use what development language. This greatly reduces the flowers in the B2B integration on time and cost, allowing many originally cannot afford EDI of small and medium-sized enterprises also can realize B2B integration.
Comparisons 4: software and data reuse
Software reuse is a big theme, reusable form the extent of many, reuse is big is small. The most basic form is the source code modules, or the class level of reuse, another form of component reuse is binary form.
At present, like a form control or user interface controls the reusable software components that are in the market, holds a large share. But this kind of software reuse has a big limitation, is reuse code, data can't reuse only. Because, release component even were easy, but the source code to release data is not so easy, unless it is often won't change static data.
WebService in enabling reuse code at the same time, can reuse code behind the data. Use WebService, no longer have to like before, first from third-party purchase, installation software components, and again from application of calls to these component; Only need direct call distal WebService can. For example, in applications to confirm the address of user input, just put this address directly send it to the corresponding WebService, this WebService will help you refer to the street address, cities, provinces and postal code and other information, confirming this address is in the corresponding post code area. WebService providers can use on to The Times or service charge. Such services to the component reuse to achieve is impossible, then you must download and install good contains the street address, cities, provinces and post code of the information such as the database, and the database or cannot real-time update.
Another kind of software reuse, put several applications of integrated function. For example, we should establish a LAN website application, let the user can inquires the fedex package, view of the stock market, and can manage their own agenda, still can purchase movie tickets online. Now there are many Web application vendors, are in its application to realization of these functions. Once they put these functions through WebService "exposure" come out, it is very easy to get all of these functions are integrated into your portal sites, to provide users with a unified, friendly interface.
In the future, many applications will use the current WebService, component-based application structure for the component/WebService extended hybrid structure, can be in applications use third-party WebService provide function, also can put their application function through WebService provide to others. Two kinds of circumstances, can reuse code and code behind the data.
From the above discussion can see, WebService in through the Web for interoperability or remote calls is the most useful when. However, there are some situation, WebService can't bring any good.
Weaknesses one: desktop applications
At present, enterprise and individual still use a lot of desktop applications. Some of them only need and other procedures notesdbdirectory communication. In this case, had better not use WebService just using local API. COM is very suitable for in this case work, because it is smaller and faster. On the same server running on the server software likewise. Had better use directly COM or other local API to call between applications. Of course WebService can also be used in these situations, but that is not just consuming too big, and will not bring any good.
Shortcomings 2: LAN isomorphism applications
In many applications, all of the program is developed by VB or VC in Windows the workbench use COM, are running in the same local area network. For example, two server application needs mutual communication, or have a WinForm Win32 or client to connect the LAN another server program. In these procedures, the use of the DCOM than SOAP/HTTP is more effective. And this is similar, if a.net program be connected to another LAN.net program, should use. NETremoting. Interestingly, in. NETremoting, can also specify use SOAP/HTTP to undertake WebService calls. But the best or directly through TCP for RPC call, that would be much more effective.
In short, as long as the application structure from the Angle, is there another way than WebService more effective and more feasible, then don't use WebService 

No comments:

Post a Comment