Blog

Posted 2007/10/01

An IFrame Bridge portlet

After looking through the source code for the IADB I decided that the best route for embedding the IADB application into GS would be via an Iframe.

The original plan was to use a project called the ‘Portlet Bridge’ which uses screen scraping to consume applications and render them from within GS. The major problems with this approach are that the Portlet Bridge does not work with GS 3 and it breaks iframes and frames are used extensively with the IADB.

I have knocked up a proof of concept for my IFrame Bridge. Below is a screen shot of it running an externally hosted copy of the IADB from within the GS container.


IFrame Bridge proof of concept
Click for big version

As you can see there is still some work to do on the GS CSS to fully integrate it with the site.

The goal with the IFrame Bridge is to create a generic JSR-168 portlet which other people can use to integrate existing applications into portals. So I will make it fully configurable and not hardcode it from the IADB. The features that spring to mind are:

  • Create a way for the GS to share the authenticated user with the hosted application. This means that the user can log into GS and have their credentials passed onto the hosted application. The hosted application will need some extra code to receive these credentials. I will write a PHP class to do this for the IADB which could then be used in any other PHP application.
  • The portlet edit mode will need to be able configure:
    • The URL of the application being hosted.
    • The IFrame properties such as dimensions and if it has scroll bars.
    • Any of the details needed to support the authentication sharing between GS and the application. At this stage using a MySQL database seems like an option, so the edit mode would have to let you enter the details for the database.