A
while ago I worked on an Oracle Portal project, that was based
around a menu calling a number of Discoverer workbooks and other
reports. The menu was a portlet that was located on the left-hand
side and took up around a quarter of the page. The right-hand side
was a portlet that contained whatever workbook or report had been
selected using the menu.
The design approach we took was to use something called the
'model-view-controller' design pattern as the basis for our
application. Model-View-Controller, or 'MVC', is a way of building
an application so that the data store, the business logic and the
presentation logic are kept separate, with the aim being that it's
easy to upgrade, extend or swap parts out without affecting the rest
of the application. MVC is usually talked about in the context of
Java development, but it's more of a concept than a Java-specific
technology and in our case we actually built the application using
PL/SQL portlets.
For this application, the model was the Oracle database, with a
schema containing menu entries and of course the underlying database
on which reports were run. The controller was the menu portlet, and
the view was the main portlet that displayed the reports. The menu
portlet contained menu items and hyperlinks which, when clicked on,
reloaded the page and passed a parameter to the view portlet, which
then decided which report to retrieve and display it in an IFRAME.
Each menu item in the controller portlet had the same format (the
portal page URL, with a 'report_id' parameter) and the view portlet
just used a CASE statement to display a report from a list of
possible reports.
Anyway, where this is all going is that Oracle have recently
announced (link via
Tim Burns' weblog) support for MVC portlets, and
Apache Struts, through the
OracleAS Portal Developer Kit. Apache Struts is a java framework
for building model-view-controller applications, which in this case
would be built using Java Server Pages and deployed as OracleAS
Portlets. It's java rather than PL/SQL, but it's a pretty
comprehensive framework and not all that difficult to set up,
especially seeing as much of the portlet element of a JSP can be
generated automatically by JDeveloper's portlet wizards. If you're
building a portal application using JSPs it's worth checking out the
struts support as it's an easy way to use the MVC design pattern,
and it's a relatively low-cost exercise to add one or more portlets
to an existing JSP and servlet application by defining the portlets
as additional views.
For more information, take a look at: