tailieunhanh - programming XML by Example phần 8

Các số liệu cấu trúc mới 9,7 và 9,8 cho thấy sự khác biệt khi lựa chọn một hoặc đầu ra định dạng khác trong trình khác biệt lớn giữa các ứng dụng này và trước đó là exportProduct () chức năng. exportProduct () cuộc gọi makeXML () để tạo ra các tài liệu XML. | 356 Chapter 11 N-Tiered Architecture and XML How XML Helps As soon as there are two or more parties they need to communicate. Currently two approaches are particularly popular for client server applications middleware such as CORBA Common Object Request Broker Architecture DCOM Distributed Component Object Model or RPC Remote Procedure Call exchange formats such as HTML or XML Middleware I won t cover middleware in great detail this is an XML book not a middleware book but I want to provide you with enough information for a comparison. The basic idea behind middleware is to reduce the effort required to write distributed applications. Networks are not always safe reliable and dependable. In fact one could argue that they are exactly the opposite. To work around these limitations programmers have to implement specific protocols. It is not uncommon for network-specific code to amount to more than 10 times the business code. This process takes time and is not very productive. Indeed the time spent wrestling with the network and its security is not spent solving actual business problems. Middleware includes tools that deal with the network. For example a network might fail but middleware has logic to gracefully recover from these failures. Also on a network several computers need to collaborate. Middleware offers tools to manage the interaction between these computers. Middleware is based on specific protocols but instead of overwhelming programmers with details it hides them. Programmers are free to concentrate on business issues and therefore be more productive. o I Listing illustrates this. This is a simple CORBA client that appends sir 0F one line to an order and confirms it. A server maintains the order. Listing Small CORBA Example EXAMPLE import . public class StockExchangeClient static public void main String args How XML Helps 357 String order args 0 product args 1 int quantity args 2 ORB orb args null Order .

TỪ KHÓA LIÊN QUAN