Introducing Server-side Objects


When discussing any communication with the server, it makes sense to discuss the origins a bit to better understand the two primary ways in which you access the server. The way you access the server determines the manner in which events are handled by Flex on these remote calls and the difference between push/pull server communications.

The need for clients to make calls to a server for business processing came the first time multiple users could access the same system at the same time. The original calls were done over custom defined protocols dubbed remote procedure calls (RPCs). The first RPCs were primarily designed to work within a specific vendor's platform and product. They typically had a specific format for the data being passed (binary, encryption, what bit position referred to what piece of data, and so on). Today, the term RPC describes the most basic call between a client and a server instead of a specific protocol or message format.

The need for an enterprise to share the business logic written in one application with another quickly drove the need to standardize the way one application talks with another one. The emergence of Common Object Request Broker Architecture (CORBA) as an industry-maintained standard for exposing the middle-tier server objects was a big step forward in the capability to share logic between applications. The big drawback was the difference in each vendor's implementation of CORBA and the mapping of data between different systems.

Java introduced Remote Method Invocation (RMI) as a more refined way of calling remote objects and the passing of data between the client and server tier. However, because of its complexity to implement, RMI was not heavily used by developers outside the Java world.

The latest way to interface between the client and the server, Web Services, leverages XML (text-based) to describe how the server objects are used as well as the format in which the communication is done. This results in a human readable description of an object and the call to the server. However, this strength is also a weakness because it is a departure from binary communication between the client and the server and hence not as efficient.

In Flash MX, Flash Remoting was introduced as a way to provide binary communication between the Flash client and the server. Flash Remoting is based on an open protocol called Action Message Format (AMF) that enables you to communicate with a variety of server technologies including Java, PHP, and ColdFusion.




Adobe Flex 2.Training from the Source
Adobe Flex 2: Training from the Source
ISBN: 032142316X
EAN: 2147483647
Year: 2006
Pages: 225

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net