Best Practice of Portal Architecture

Discussions

Web tier: servlets, JSP, Web frameworks: Best Practice of Portal Architecture

  1. Best Practice of Portal Architecture (1 messages)

    Hi,

    I want to get some best practices advice on a pretty common UI architecture scenario when designing a portal site ...
    "A web browser visit website X which generate a dynamic page that contains some contents from another website Y".

    I can think of two different strategies to tackle this ....

    STRATEGY ONE : Website-X fetch HTML content from website-Y and compose the utimate HTML page before sending back to browser

    Challenges
    ========
    1) <jsp:include> only works within a server engine, so this is not a solution for including content from another site.
    2) Website-Y expose its content via a SOAP interface for website-X. I dislike this approach because the code in website-X become tightly coupled with the content structure of website-Y, also code in website-X needs to take on the burden to develop the presentation logic of the content it extract from website-Y.
    3) Website-X simulates a web browser and make a HTTP request to fetch content from website-Y. I dislike this because in order for website-X to impersonate the user, it needs to know the password information of the user, this leads to security concerns. On the other hand, code in website-X needs to take the burden to handle cookies that it obtains from website-Y


    STRATEGY TWO: Website-X generates a result HTML page which contains instructions for the browser to fetch additional content from website-Y

    Challenges
    ========
    1) Conceptually this is similarly to how the HTML <image> tag works, but I'm not aware of an equivalent HTML tag for fetching HTML content.
    2) Use HTML frame is not satisfactory because I think you have to define the whole page in frameset instead of just a portion of your HTML page. Also this cause many roundtrips to the server which slow down performance.
    3) Make use of client-side Javascript but then the javascript code on the page will get complex and messy.


    Any better ideas ??


    Best regards,
    Ricky
  2. Best Practice of Portal Architecture[ Go to top ]

    If all you need is "flat" inclusion that does not change the content/design of Y in any way, I think you will get the best performance with strategy two. I think you can use layers (supported by most significant browsers) to make the client fetch the page from Y. This is maybe what I'd use to show a banner from another site.
    In most portals this is not satisfactory. I.e, you need to give the user only specific content, or atleast modify the look-and-feel so it matches the portal's. In this case:
    - If you have control over Y, I would let X get the content in XML form from Y and format it for it's client (possibly XSL). This is actually one of the reasons XML was invented - delivering content-oriented documents rather than design-oriented ones.
    - If you don't have control over Y, things get pretty complicated. You might want to check out Project Brazil from Sun for this kind of thing. However, this option is very complicated (analyzing HTML in a content-oriented manner) and I would avoid it any way I could :)

    Just my 2 cents
    Gal