This pattern outlines a different kind of ‘Service Oriented Architecture’ (SoA), which facilitates coupling of ‘loosely coupled’ components (e.g. mashups or widgets) in the webpage (or in RIA – Rich Internet Application). Where the mashups could be large GUI components, which may be fetched from disparate web-servers and incorporated into the RIA.
As we already know, Ajax facilitates the communication between the components (e.g. mashups or widgets) in the webpage and the web-server, for example to exchange data between them.
However, many times it is also desirable for the components in the webpage to couple with other components in the same webpage, so that they could collaborate or exchange data with each other.
This capability to couple the ‘loosely coupled’ components or mashups (obtained from disparate sources/web-servers and included in the webpage), would increasingly become desirable, because of the emerging trends such as:
(i). Websites such as Facebook or Google’s OpenSocial planning to emerge as platforms and publishing APIs for third party software vendors to deploy widgets/services.
(iii). A large traditional desktop application (e.g. MS-Word or Excel) contains hundreds or perhaps thousands of GUI components. Many of them must collaborate with other GUI components in the application. Likewise future larger RIA contain many GUI components. Many of those GUI components need to collaborate with each other.
(ii) The following interesting Java lobby’s newsletter talks about increasing popularity of the mashups (http://www.javalobby.org/nl/archive/jlnews_20071016.html
). It says that a long list of companies that are jumping head first into the Mashup Hype Pool. This newsletter says: Google, Yahoo, Intel, Microsoft and IBM to name a few companies, have released at least a preview of a project, to make it easier for end-users to assemble their own Mashups. (It included the URLs for respective mashup efforts).
Assembling mashups today means, just only incorporating them into webpage (or RIA). But, if they need to collaborate or exchange data with each other, the developers must create necessary coupling code. How could the developers couple such mashups?
The following webpage outlines a very simple and useful pattern for coupling mashups/components included in the webpage/RIA from disparate sources.
The pattern could be used in many other situations. For example, in a large RIA, a separate team member may independently implement each large GUI component. It would be easier for each individual to implement his component as a ‘loosely coupled’ component, which can also be designed to satisfy a pre-defined simple interface. Then all the components could be quickly assembled and coupled using their respective interfaces.
There is a misconception among many software researchers that, large software applications cannot be build by hierarchically assembling ‘loosely coupled’ components (i.e. here loosely coupled means, they must be easy to include and replace).
The later part of the webpage outlines a pattern to independently create loosely coupled components by employing ‘Component factory’ indirection. Then outlines an innovative process to assemble the loosely coupled components to build larger & larger replaceable components (i.e. they are easy to assemble and disassemble).