Discussions

News: Java.net article: Almost Portlets

  1. Java.net article: Almost Portlets (3 messages)

    In "Almost Portlets," Michael Jouravlev demonstrates how one can develop independent portlet-like JSP components with a tag library called JSP Controls Tag Library.

    The components handle their own input and render themselves, while the library manages the request/response cycle. The suggested approach allows creating embeddable login forms, checkout wizards, tabbed notebooks, or image sliders without using a separate portal engine.

    According to author, the major differentiator of JSP Controls Tag Library from similar projects is the dual-mode nature of the components:
    If XMLHTTPRequest is supported by browser, the Ajax engine updates page fragments in place, without full page reload.

    If anything goes wrong during a call to an Javascript function, if JavaScript is not supported or is turned off, or if the XMLHttpObject is not available, then the browser sends a traditional synchronous request.

    The fallback mechanism ensures graceful degradation without noticeable effect on user experience besides a longer page update due to reloading the full page.
    The article shows that creating componentized event-driven applications with a sensible approach to AJAX is totally possible with standard JSP technology. The same codebase supports Ajax in-place update for modern user agents, as well as full page reload for older browsers like Netscape 4.

    The only concern is whether Mr. Jouravlev has reinvented JSF without some of the features. :)
  2. The only concern is whether Mr. Jouravlev has reinvented JSF without some of the features. :)
    To say that this is the "only" concern is perhaps a wee bit optimistic. Apart from the usual accessibility concerns with AJAX in general, what is the point of reinventing JSF and/or portlets? Why reinvent the wheel?... (he said rhethorically, indifferently, and not entirely without a certain sense of deja vu)
  3. Apart from the usual accessibility concerns with AJAX in general, what is the point of reinventing JSF and/or portlets? Why reinvent the wheel?... (he said rhethorically, indifferently, and not entirely without a certain sense of deja vu)
    JSP Controls Tag Library does not reinvent portlets or JSF. All it does it allows building independent stateful page components using pure JSP and four custom tags. Javascript is not required, but if Javascript is available then the library makes use of it.

    The library may be useful for those who do not want to rewrite application pages or to learn and install a new framework just to embed couple of independent components into a JSP page.

    Since "portlet" is not a live trademark, the components can be legally called portlets, but I usually call them "JSP components" or "JSP fragments" for less ambiguity.
  4. Java.net article: Almost Portlets[ Go to top ]

    what is the point of reinventing JSF and/or portlets? Why reinvent the wheel?.

    There are some of us who are not quite ready to use JSF yet. Struts does pretty much what we need and these JSP controls could makes life easier for Struts users.