Application Reuse Through Portal Frameworks - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

Application Reuse Through Portal Frameworks

Description:

YW Guest Book - PHP guest book application, FhImage - A simple image gallery. ... Guest Book Admin Portlet. 11/10/09. 23. Image Gallery Portlet. 11/10/09. 24 ... – PowerPoint PPT presentation

Number of Views:1213
Avg rating:3.0/5.0
Slides: 29
Provided by: Nes66
Category:

less

Transcript and Presenter's Notes

Title: Application Reuse Through Portal Frameworks


1
Application Reuse Through Portal Frameworks
  • Mark Baker and Rahim Lakhoo

2
Outline
  • Introduction.
  • Motivation.
  • Technologies
  • JSR-223,
  • PHP-JavaBridge,
  • PortletBridge-Portlet,
  • Other Bridging Technologies.
  • System Architecture.
  • Demonstration Applications.
  • Issue.
  • Conclusions.

3
Introduction
  • Portsmouth and Readings role in the Sakai VRE
    project is to develop and deploy a number of
    portlet-based tools and services.
  • In particular we are looking at
  • Collaborative tools based on NaradaBrokering,
  • Semantic Web tools based on RDF,
  • Bridging technologies to enable legacy
    applications,
  • Peer-to-Peer technologies.
  • We will make these tools available, either via a
    native JSR-168 capability, or via the WSRP
    consumer developed within the Sakai project.
  • In this talk we will recount our experiences
    investigating, deploying and testing a range of
    emerging portal bridging technologies.

4
Legacy Applications
  • Motivation
  • Investigate whether script-based Web
    applications, such as PHP can be reused in
    Java-based environment,
  • Investigate if PHP applications can be reused as
    a portlets,
  • Test by deploying a number of PHP applications as
    portlets,
  • Add useful tools/utilities to the Sakai
    Demonstrator.

5
Bridging Technologies
  • JSR-223
  • Reference implementation available,
  • Allows Java to communicate objects with
    script-based languages and vice versa,
  • To be included with the next release of Sun JDK
    Mustang (JDK 1.6).
  • PHP-JavaBridge
  • Described as an XML-based network protocol,
  • Allows communications between Java and PHP,
  • Provides a suitable environment to execute PHP
    scripts under Apache Tomcat.
  • PortletBridge-Portlet
  • Renders Web pages into a JSR-168 portlet,
  • Proxies links and other external resources
    contained in a Web page,
  • Can load multiple instances, with different
    configurations.

6
Bridges - JSR-223 (1)
  • JSR-223 specification is lead by Zend
    Technologies and Sun, amongst others.
  • Allows script-based languages to be used in Java
    server-side applications and vice versa.
  • Defines a new API, javax.script..
  • New API includes scripting-engines for different
    languages.
  • Reference implementation includes support for
    Rhino, PHP and Groovy.

7
Bridges - JSR-223 (2)
  • Reference Implementation

8
Bridges - JSR-223 (3)
  • Reference implementation of JSR-223 includes a
    pre-compiled skeleton installation of PHP5.
  • JSR-223 API includes some scripting engines for
    PHP, Groovy and Rhino.
  • Also includes a script to invoke Java classes,
    which contain script-based calls, from the
    command-line.
  • Samples scripts/programs are available for PHP,
    Groovy amongst others
  • Command-line and Web capabilities.

9
Bridges - PHP-JavaBridge (1)
  • Described as an XML-based network protocol.
  • Designed to communicate with native scripting
    engines, which have a Java or ECMA 335 virtual
    machine.
  • Provides a suitable environment for PHP
    applications to run under Apache Tomcat.
  • Allows Java and PHP to share sessions, in a J2EE
    environment.
  • Has a number of configurations for installation
    and connections to existing Web servers.

10
Bridges - PHP-JavaBridge (2)
11
Bridges - PHP-JavaBridge (3)
  • Includes PHP5-CGI binaries and configurations
    files.
  • Although the PHP-JavaBridge is not limited to the
    included CGI environment, it can use the PHP
    environment of the hosting server.
  • The PHP-JavaBridge can connect to an existing
    Apache Web Server, executing PHP applications.
  • Has a number of different modes
  • Request - Created/destroyed on every
    request/response,
  • Dynamic - Starts/stops synchronously with a HTTP
    server,
  • System - Installed from a RPM as a system
    service,
  • J2EE - Installed into a J2EE server, such as
    Apache Tomcat.
  • If the PHP instance crashes with the
    PHP-JavaBridge the backend Java server/servlet is
    unaffected.

12
Bridges - PortletBridge-Portlet (1)
  • Generic method of rendering Web sites into a
    JSR-168 portlet, developed by Jamie McCrindle.
  • Tested in various portlet containers, including
    GridSphere, JetSpeed and JBoss.
  • Proxies a Web sites content, so that a user may
    use the application from within a portlet.
  • Uses XSLT to rewrite downstream content from Web
    sites.
  • Includes remote proxy server settings for complex
    network set-ups.
  • Allows for multiple instances with different
    configurations.

13
Bridges - PortletBridge-Portlet (2)
14
Bridges - PortletBridge-Portlet (3)
  • PorltetBridge-portlet, uses Apaches httpclient
    to GET/POST from/to Web pages.
  • Uses the CyberNeko HTML Parser.
  • Web pages are transformed using XSLT, which
    rewrites links and other content, such as
  • CSS,
  • JavaScript,
  • Images,
  • Forms,
  • Headers,
  • etc
  • Uses Regex for defining the proxy scope.
  • PortletBridge defines a Memento for storing users
    state, such as cookies.

15
Bridges - Others
  • Apache Portals Bridges project aims to use common
    Web frameworks via portlets.
  • Currently support is being developed for
  • Struts,
  • JSF,
  • Perl CGI Scripts,
  • PHP,
  • Velocity Templates.
  • GridSphere 2.1.x portal includes the Struts
    Portals Bridge.

16
System Architecture (1)
  • The PHP-JavaBridge provides the runtime
    environment for the PHP application.
  • A PHP application is packaged and configured as a
    Web archive (WAR).
  • Included in the WAR is a configured CGI
    environment, complete with PHP configuration
    files and extensions, per application.
  • The PHP application can communicate with Java if
    extra functionality or a hybrid application is
    desired.

17
System Architecture (2)
18
System Architecture (3)
  • The PortletBridge-Portlet is installed as a
    JSR-168 portlet under GridSphere.
  • PortletBridge-Portlet instances are created and
    configured for each PHP application installed
    under the PHP-JavaBridge.
  • If desired, XSL Style Sheets can be configured
    per PHP application.
  • Once configured, the PHP applications are
    presented as individual portlets, which can be
    subscribed to by users.

19
Demonstration Applications
  • Using a combination of the PHP-JavaBridge and the
    PortletBridge-Portlet, we configured some PHP
    applications as portlets.
  • These are the applications configured
  • BibAdmin - Bibtex database,
  • YW Guest Book - PHP guest book application,
  • FhImage - A simple image gallery.
  • Deployment procedure
  • Applications are first deployed as WARs under
    Tomcat.
  • Then an instance of the PortletBridge-Portlet is
    created and configured for each PHP application.

20
BibAdmin Portlet
21
Guest Book Portlet
22
Guest Book Admin Portlet
23
Image Gallery Portlet
24
Demonstrated Applications
  • The PHP applications tested with this technique
    have no real difference in terms of functionality
    when compared to native installations.
  • Some PHP applications are easier to port to a
    portlet than others.
  • Other PHP applications have a poor
    implementation/design, which can lead to issues
    within a portal environment.

25
Issues
  • Login mechanisms can cause problems simple PHP
    and PHP with JS logins were tested successfully
  • However, it is also feasible to disable logins of
    PHP applications in favor of utilising the
    portals security framework.
  • Some applications need to have pre-defined PHP
    variables changed to reflect the J2EE
    environment, i.e. port number.
  • PHP applications which load new windows have
    issues with the constraints imposed by a portal.
  • Frames are not supported by the
    PortletBridge-Portlet.
  • XHTML or mixed XHTML/HTML documents currently
    cause the proxy facility of the
    PortletBridge-Portlet to fail
  • The developers are working on this.
  • There are some CSS leaks into the portal,
    currently this issue has been seen with
    GridSphere
  • Also, background colours cannot always be seen in
    the portlet versions.

26
Conclusions
  • Although this technique is not without issues, it
    does present a viable solution for reusing
    existing PHP applications.
  • The PortletBridge-Portlet is still a young
    project, which is being actively developed.
  • Other bridging technologies, such as the Apache
    Portals Bridges project will be of interest, as
    they are starting to be included in portals, such
    as GridSphere.
  • JSR-223 should see an increase in developers
    using the new API, as the release of Sun JDK 1.6
    approaches.
  • Bridging technologies should be an interesting
    alternative/addition for developing portlets and
    could be useful when combined with WSRP.

27
References
  • http//portals.rdg.ac.uk
  • http//www.jcp.org/aboutJava/communityprocess/edr/
    jsr223/index.html
  • http//PHP-Java-Bridge.sourceforge.net
  • http//www.portletbridge.org
  • http//www.gridpshere.org
  • http//portals.apache.org/bridges/

28
  • Questions?

http//dsg.port.ac.uk http//acet.rdg.ac.uk
QuickTime and a
Write a Comment
User Comments (0)
About PowerShow.com