vendredi 26 mars 2010

Injecting Web Content with Oracle Ensemble

Oracle Ensemble is a product which allows to build composite application from existing content. It falls into the category of mashup softwares, ans it’s included in the Oracle WebCenter Suite package.
In the following exemple, we use it for injecting some web content from a blog site (realized with Wordpress) into a Content System home page (provided by Typolight).
The goal, in our exemple, is to catch the list of categories (surrounded by the red line) and inject this fragment in the target application which is a site dedicated to a music academy
image
This is the page generated by the CMS for a sample site. We want to amend this page, without modifying the original code
image
First, it’s important to understand that Oracle Ensemble acts as a reverse proxy, and we need to call the target application through the proxy.
We defined a new resource in the Ensemble Console, by mapping the internal URL with a new external one. ie:
image
Next, we setup a so-called pagelet by designating what we need to extract in the Blog page:
image
A wizard allows to display all the part of the HTML page, and pick the desired portion of page (webclipping).
This pagelet must be injected by defining before an injector. The setup is very simple: We choose the pagelet and we indicate the place where the pagelet has to be injected.
image
altough it’s not mandatory, we can use a tool for Mozilla: Web Developer, to show the different tags in tage page.
image
As show in the following screenshot, we tell to Ensemble to inject the fragment before the text: <H1>Breaking news<H1>
  image
Finaly, we choose the new injector previously defined, to be used for each call to the target application.
image
This is the final result: We can see that the categories list has been gracefully merged with the final HTML page, with no additionnal code, but by a purely declarative work. Of course, the page has been called through the proxy, and not directly.
image   For info, this is the HTML detail in the final page:
image

1 commentaires:

John Sim a dit…

Great article! :)