Apr 28, 2009 2
Remoting
The slides are partially based on the Working with Data in Flex talk Branimir Angelov gave at the 2008 FlexCamp.
We got to admit that this is one of the toughest topics to discuss, because remoting is part of a quite bigger topic – distributed systems. And distributed systems encompass tones of knowledge, e.g.:
- different data paradigms (weakly-typed data, strongly-typed data, persistence and Flex specifically – data binding and data management)
- different network and web architecture principles and paradigms (REST, RPC, Data Management)
- middle-ware paradigms (transactions, messages, remote method invocation)
- different server technologies concepts and details (servlets, non-blocking I/O, stateless and stateful objects)
The Structure of the Talk
The structure of the talk reflects the typical mindset of an Obecto developer. In the beginning of a project our thoughts are mostly concentrated on acquiring a correct vision for the product to be developed. In this early phase of the project we focus our efforts on developing a working client application. We refer to such applications as prototypes – a piece of software we can give to our client, so he can use it to test the market and reassure his understanding of the product and the interactions which encompass it. This is an approach known as Front-to-Back development.
The talk is structured in a similar way – we start with the remoting components available in the Flex Framework and we approach them as if we won’t ever need to know anything about the next layer in the architecture. This approach faces a lot of arguments since students often require to see the complete picture first. To defend this approach, we usually bring the argument that layering is an engineering technique that help us study independently different parts of a big and complex system. If we can’t study a system layer by layer, than there is no benefit of creating a multi-tier architecture. So this is how we start:
Client-Side Remoting Components
Here we discuss the service components:
- HTTPService
- WebService
- RemoteObject
- DataService
As we investigate separately each of the components, we’ll try to fill in the whole picture of the remoting architecture implemented in the Flex Framework. Click on the following UML diagram to get a 100% view on it:
The samples we show are part of the LiveCycle DataServices ES installation. We’ll provide the source code for the samples we’ve slightly modified.
Different ways to process the results
We’ll take a look at the various ways to process the results of a service:
- data binding to the lastResult property
- listening for ResultEvent and FaultEvent
- using IResponder
- using the AsyncToken
DOWNLOAD SAMPLE WITH THE PROXY GENERATED FROM THE WEB SERVICES WIZARD
DOWNLOAD SAMPLE WITH REAL TIME UPDATE OF A CHARTING COMPONENT
The Static Service Proxy
When I was preparing the talk I was trying to recall in my memories what were the reasons for us to develop and start using the StaticServiceProxy in our projects. It took me several days to recollect my memories. The idea is basically related to the concept of the BusinessDelegate in the Cairngorm micro-architecture, but with several advantages:
- MXML declarative support
- smooth transition between WebService and RemoteObject
- easy way to create mock proxies
- a way to differentiate between different invocations
Todor Kolev had prepared a pretty illustrative example on how we use it.
DOWNLOAD TODOR KOLEV’S SAMPLE
Server-Side Components
In the final part of the talk we’ll get acquainted with the LiveCycle Data Services components and the architecture of the LiveCycle DS server.
- end-points
- the MessageBroker
- destinations
- adapters
- assemblers
Useful Resources
How to hack LiveCycle ES Data Services to run natively on a Mac
Capacity Planning Guide for Adobe ® LiveCycle ® Data Services 2.6

