10.5. Service Orientation

Service-Oriented Architecture (SOA) could very well be the most popular buzzword of the last couple of years. While universal definitions of SOA are still being debated in forums small and large, I will see how it could apply to RIA. In this section, I choose five patterns that belong to the realm of service orientation and illustrate them. These patterns are worthy of consideration as they can positively impact RIA architectures and make them more maintainable and better in terms of desired output.

The five patterns are:

  • Concurrent contracts

  • Cross-domain utility layer

  • Functional decomposition

  • Rules centralization

  • State repository

Let's take each in turn and discuss it briefly.

10.5.1. Concurrent Contracts

Multiple contracts should be created for a single service, each targeted at a particular type of consumer. It is highly likely the enterprise data and systems will be shared by consumption points besides the RIA and so it makes sense to create multiple contracts.

Sometimes it makes sense to create a service façade to act as the front end for the requests to the service. The façade can then choose the correct contract to service the client.

Further to different use cases, multiple contracts and endpoints can also simultaneously support consumption using multiple protocols and data formats. So, one could define an HTTPService, a WebService, a RemoteObject. or a JSON-based endpoint for a single service. That way the same service can allow multiple types of ...

Get Professional BlazeDS: Creating Rich Internet Applications with Flex® and Java® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.