Java Portlet Specification

From Wikipedia, the free encyclopedia
(Redirected from Portlets)

A Java Portlet Specification (JSR) defines a contract between portlets and their containers; they provides a convenient programming model for Java portlet developers.

Portlets are pluggable user interface software components that are managed and displayed in a web portal. A portlet responds to requests from a web client with and generates dynamic content. A portlet is managed by a portlet container.

Background[edit]

A portlet is a pluggable user interface software component that is managed and displayed in a web portal,[1][2][3] for example an enterprise portal or a web CMS. A portlet can aggregate (integrate) and personalize content from different sources within a web page. A portlet responds to requests from a web client with and generates dynamic content.[4]

Portlets produce fragments of markup[5][6] (HTML, XHTML, WML) that are aggregated into a portal.[7] Hence, a portlet (or collection of portlets) resembles a web-based application that is hosted in a portal.[8] Some examples of portlet applications are e-mail, weather reports,[7] discussion forums, and news.

Portlet containers[edit]

A portlet is managed by a portlet container.[5] A portlet container runs portlets, provides them with the required runtime environment, manages their life cycles.[4] A container also provides persistent storage mechanisms for the portlet preferences.

A portlet container receives requests from the portal to execute requests on the portlets hosted by it. A portlet container sends data to the portal for aggregation, but is not responsible for aggregating the content produced by the portlets; the portal itself handles aggregation.[4] A portal and a portlet container can be built together as a single component of an application suite or as two separate components of a portal application.

Specifications[edit]

Portlet standards are platform independent application programming interfaces that are intended to enable software developers to create portlets that can be plugged into any portal supporting the standards. An example is the Java Portlet Specification. A Java portlet resembles a Java Servlet, but produces fragments rather than complete documents, and is not bound by a URL. A Java Portlet Specification (JSR) defines a contract between portlets and the portlet container. JSRs provides a convenient programming model for Java portlet developers.

JSR 168[edit]

The Java Portlet Specification V1.0 was developed under the Java Community Process as Java Specification Request JSR 168, and released in its final form in October 2003.[9]

The Java Portlet Specification V1.0 introduces the basic portlet programming model with:

  • two phases of action processing and rendering in order to support the Model–View–Controller pattern.
  • portlet modes, enabling the portal to advise the portlet what task it should perform and what content it should generate
  • window states, indicating the amount of portal page space that will be assigned to the content generated by the portlet
  • portlet data model, allowing the portlet to store view information in the render parameters, session related information in the portlet session and per user persistent data in the portlet preferences
  • a packaging format in order to group different portlets and other Java EE artifacts needed by these portlets into one portlet application which can be deployed on the portal server.
  • Portal development as a way to integrate the different web-based applications for supporting deliveries of information and services.

Portlet Catalog[edit]

  • Initially Java portal vendors had their own portlet development framework thus those portlets were confined to specific portal servers and couldn't be deployed to the rest of the Java portals. After JSR 168 inception, Java portlets may be deployed on any Java portal servers adhering to JSR 168 specifications.
  • A Portlets Catalog is a set of portlets that are ready-to-use components for enterprise portals. For those who want to adopt portals certainly need many and variety of portlets to deploy and run. Here Portlets catalog are of use.
  • A JSR 168 portlets catalog makes sure that portlets under this catalog may run on any standards–compliant Java portal server. Types of portlet solution (vertical domains and technology) like collaboration, social networking, community, content management, utility, calendaring, HRM all are available in these catalogs.
  • There are many open source and commercial Portlets Catalog available but JSR 168 based solutions are rare.
  • JSR 168 specifications offer suitability to the developers to reuse the code to maintain a set of JSR 168 compliant portlets. For deployers, it's easy to keep a single set of solution and deploy it on many.

JSR 286[edit]

JSR-286 is the Java Portlet specification v2.0 as developed under the JCP and created in alignment with the updated version 2.0 of WSRP. It was released in June 2008.[10] It was developed to improve on the short-comings of the version 1.0 specification, JSR-168. Some of its major features include:[11]

  • Inter-Portlet Communication through events and public render parameters
  • Serving dynamically generated resources directly through portlets
  • Serving AJAX or JSON data directly through portlets
  • Introduction of portlet filters and listeners

JSR 362[edit]

JSR-362 is the Java Portlet specification v3.0 and was released in April 2017.[12] Some of its major features include:[13]

  • Resource Dependencies
  • Explicit Render State
  • CDI 1.2 Integration
  • Servlet 3.1 Alignment
  • Portlet Hub & XHR IPC
  • FacesBridge Integration via JSR 378[14]

See also[edit]

References[edit]

  1. ^ "PORTLET | definition in the Cambridge English Dictionary".
  2. ^ "Portlet Definition | GIS Dictionary". support.esri.com.
  3. ^ "Definition of portlet". PCMAG.
  4. ^ a b c Sarin, Ashish (2011-09-15). Portlets in Action. Simon and Schuster. 1.5.1 The portlet container. ISBN 978-1-63835-236-5.
  5. ^ a b Guo, Yuanbo; Jun, Woochun; Kaschek, Roland; Krishnaswamy, Shonati; Pan, Zhengxiang; Sheng, Quan Z. (2005-10-24). Web Information Systems Engineering - WISE 2005 Workshops: WISE 2005 International Workshops, New York, NY, USA, November 20-22, 2005, Proceedings. Springer. p. 22. ISBN 978-3-540-32287-0.
  6. ^ "Markup languages". www.ibm.com. 2019-01-04. Retrieved 2024-02-13.
  7. ^ a b Sarin, Ashish (2011-09-15). Portlets in Action. Simon and Schuster. 1.3 What is a portlet?. ISBN 978-1-63835-236-5.
  8. ^ "Portlets". gateway.maine.gov. 2014-10-01. Retrieved 2024-02-13.
  9. ^ "JSR 168". JCP.
  10. ^ "JSR 286: Portlet Specification 2.0".
  11. ^ Hepper, Stefan (18 March 2008). "What's new in the Java Portlet Specification V2.0 (JSR 286)?". IBM.
  12. ^ "JSR 362: Portlet Specification 3.0".
  13. ^ Nicklous, Martin (Scott) (September 2016). "Portlet Specification 3.0 is Here!" (PDF). IBM.
  14. ^ "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 378". www.jcp.org.

External links[edit]