Java Portlet Specification: Difference between revisions

From HandWiki
imported>Scavis2
correction
 
S.Timg (talk | contribs)
linkage
 
Line 1: Line 1:
{{Short description|Technical standard}}
{{Short description|Technical standard}}
The '''Java Portlet Specification''' defines a [[Design by contract|contract]] between the portlet container and portlets and provides a convenient programming model for Java portlet developers.
The '''Java Portlet Specification''' defines a [[Design by contract|contract]] between a portlet and its container; it provides a convenient [[Programming model|programming model]] for [[Java (programming language)|Java]] portlet developers. Multiple versions of the specification, each a Java Specification Request (JSR) document, have been released with each intended to define an improved technology compared to the previous version.


'''Portlets''' are [[Pluggable look and feel|pluggable]] [[User interface|user interface]] software components that are managed and displayed in a web portal, for example an [[Enterprise portal|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.
A Java portlet resembles a Java servlet but produces fragments rather than complete documents, and is not bound by a [[URL]].  


Portlets produce fragments of [[Markup language|markup]] ([[HTML]], [[XHTML]], WML) that are aggregated into a portal. Typically, following the [[Desktop metaphor|desktop metaphor]], a portal page is displayed as a collection of non-overlapping portlet windows, where each portlet window displays a portlet. Hence a portlet (or collection of portlets) resembles a web-based application that is hosted in a portal.
== Versions ==


Some examples of portlet applications are e-mail, [[Earth:Weather forecasting|weather reports]], discussion forums, and [[Engineering:News|news]].
=== V1.0 ===
Version 1.0 was developed under the [[Java Community Process]] as '''JSR 168''' and released in its final form in October 2003.<ref>{{cite web|url=http://www.jcp.org/en/jsr/detail?id=168|title=JSR 168|publisher=JCP}}</ref> It introduced the portlet programming model with:
; Two phases of action processing and rendering: To support the [[Model–view–controller|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.
; Packaging format: 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: A set of ready-to-use components for a portal. Initially, Java portal vendors developed incompatible portlet frameworks and thus use of those portlets were confined to specific portal servers. With JSR 168, Java portlets could be developed for deployment on any conforming Java portal server. A 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 portlet catalogs available but JSR-168-based solutions are rare. JSR 168 offers suitability to the developers to reuse the code to maintain a set of JSR-168-compliant portlets.


A portlet is managed by a portlet container. Portlet standards platform independent [[Application programming interface|application programming interface]]s that are intended to enable [[Software developer|software developer]]s to create portlets that can be [[Plug-in (computing)|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.
=== V2.0 ===
 
'''JSR-286''' is version 2, developed under the [[Java Community Process|JCP]] and created in alignment with the updated version 2.0 of [[Web Services for Remote Portlets|WSRP]]. It was released in June 2008.<ref>{{cite web | url = http://www.jcp.org/en/jsr/detail?id=286 | title = JSR 286: Portlet Specification 2.0}}</ref>  It was developed to improve on the short-comings of the version 1.0 specification, JSR-168.  Some of its major features include:<ref>
A '''portlet container''' runs portlets and provides them with the required runtime environment. A portlet container contains portlets and manages their life cycles. It 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 is not responsible for aggregating the content produced by the portlets; the portal itself handles aggregation. 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.
 
== JSR 168 ==
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.<ref>{{cite web|url=http://www.jcp.org/en/jsr/detail?id=168|title=JSR 168|publisher=JCP}}</ref>
 
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|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===
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 ==
 
'''JSR-286''' is the Java Portlet specification v2.0 as developed under the [[Java Community Process|JCP]] and created in alignment with the updated version 2.0 of [[Web Services for Remote Portlets|WSRP]]. It was released in June 2008.<ref>{{cite web | url = http://www.jcp.org/en/jsr/detail?id=286 | title = JSR 286: Portlet Specification 2.0}}</ref>  It was developed to improve on the short-comings of the version 1.0 specification, JSR-168.  Some of its major features include:<ref>
{{cite web | last = Hepper | first = Stefan | title = What's new in the Java Portlet Specification V2.0 (JSR 286)? | publisher = IBM | date = 18 March 2008 | url =http://www.ibm.com/developerworks/websphere/library/techarticles/0803_hepper/0803_hepper.html }}</ref>
{{cite web | last = Hepper | first = Stefan | title = What's new in the Java Portlet Specification V2.0 (JSR 286)? | publisher = IBM | date = 18 March 2008 | url =http://www.ibm.com/developerworks/websphere/library/techarticles/0803_hepper/0803_hepper.html }}</ref>
:; Inter-portlet communication via events and public render parameters
:; Serving dynamically generated resources directly
:; Serving AJAX or [[JSON]] data directly
:; Filters and listeners


* Inter-Portlet Communication through events and public render parameters
=== V3.0 ===
* Serving dynamically generated resources directly through portlets
'''JSR-362''' is version 3, released in April 2017.<ref>{{cite web | title = JSR 362: Portlet Specification 3.0 | url = https://www.jcp.org/en/jsr/detail?id=362}}</ref> Some of its major features include:<ref>
* Serving AJAX or [[JSON]] data directly through portlets
* Introduction of portlet filters and listeners
 
== JSR 362 ==
 
'''JSR-362''' is the Java Portlet specification v3.0 and was released in April 2017.<ref>{{cite web | title = JSR 362: Portlet Specification 3.0 | url = https://www.jcp.org/en/jsr/detail?id=362}}</ref> Some of its major features include:<ref>
{{cite web | last = Nicklous | first = Martin (Scott) | title = Portlet Specification 3.0 is Here! | publisher = IBM | date = September 2016 | url = https://static.rainfocus.com/oracle/oow16/sess/1462801563632001pOv8/ppt/JSR362-JavaOne-2016a.pdf }}</ref>
{{cite web | last = Nicklous | first = Martin (Scott) | title = Portlet Specification 3.0 is Here! | publisher = IBM | date = September 2016 | url = https://static.rainfocus.com/oracle/oow16/sess/1462801563632001pOv8/ppt/JSR362-JavaOne-2016a.pdf }}</ref>
* Resource Dependencies
:; Resource Dependencies
* Explicit Render State
:; Explicit Render State
* CDI 1.2 Integration
:; CDI 1.2 Integration
* Servlet 3.1 Alignment
:; Servlet 3.1 Alignment
* Portlet Hub & XHR IPC
:; Portlet Hub & XHR IPC
* FacesBridge Integration via [http://www.jcp.org/en/jsr/detail?id=378 JSR 378]
:; FacesBridge Integration via JSR 378<ref>{{Cite web|url=https://www.jcp.org/en/jsr/detail?id=378|title=The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 378|website=www.jcp.org}}</ref>


==See also==
==See also==
* [[Software:List of enterprise portal vendors|List of enterprise portal vendors]]
* [[Software:List of enterprise portal vendors|List of enterprise portal vendors]]
* [[Web Services for Remote Portlets]] (WSRP)
* [[Web Services for Remote Portlets]] (WSRP)
* Java Portlet Specification
* JSR 168 (Java Portlet Definition Standard)


== References ==
== References ==
Line 65: Line 42:


== External links ==
== External links ==
 
* [http://www.jcp.org/en/jsr/detail?id=301 JSR 301] (Portlet 1.0 Bridge for JavaServer Faces 1.2 Specification)
* [http://www.jcp.org/en/jsr/detail?id=168 JSR 168] (Version 1.0 of the Java Portlet Specification)
* [http://www.jcp.org/en/jsr/detail?id=286 JSR 286] (Version 2.0 of the Java Portlet Specification)
* [http://www.jcp.org/en/jsr/detail?id=362 JSR 362] (Version 3.0 of the Java Portlet specification)
* [http://www.jcp.org/en/jsr/detail?id=301 JSR 301] (Portlet 2.0 Bridge for JSF 1.2 Specification)
* [http://www.jcp.org/en/jsr/detail?id=329 JSR 329] (Portlet 2.0 Bridge for JSF 1.2 Specification)
* [http://www.jcp.org/en/jsr/detail?id=329 JSR 329] (Portlet 2.0 Bridge for JSF 1.2 Specification)
* [http://www.jcp.org/en/jsr/detail?id=378 JSR 378] (Portlet 3.0 Bridge for JSF 2.2 Specification)
* [http://portals.apache.org/pluto/ JSR 168 Open Source Reference Implementation at Apache]
* [http://portals.apache.org/pluto/ JSR 168 Open Source Reference Implementation at Apache]
* [https://web.archive.org/web/20060110193512/http://community.java.net/portlet/ Open source JSR 168/WSRP community] at https://web.archive.org/web/20100613131851/http://www.java.net/
* [https://web.archive.org/web/20060110193512/http://community.java.net/portlet/ Open source JSR 168/WSRP community] at java.net
* [http://research.nesc.ac.uk/rapid/ Rapid Portlet Generator] for generating JSR 168-compliant portlets
* [http://soap-portlet.sourceforge.net/ Dynamic SOAP Portlet], for dynamic integration of [[SOAP]] services in JSR-168 portals


{{Web interfaces}}
{{Web interfaces}}

Latest revision as of 03:14, 20 May 2026

Short description: Technical standard

The Java Portlet Specification defines a contract between a portlet and its container; it provides a convenient programming model for Java portlet developers. Multiple versions of the specification, each a Java Specification Request (JSR) document, have been released with each intended to define an improved technology compared to the previous version.

A Java portlet resembles a Java servlet but produces fragments rather than complete documents, and is not bound by a URL.

Versions

V1.0

Version 1.0 was developed under the Java Community Process as JSR 168 and released in its final form in October 2003.[1] It introduced the portlet programming model with:

Two phases of action processing and rendering
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.
Packaging format
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
A set of ready-to-use components for a portal. Initially, Java portal vendors developed incompatible portlet frameworks and thus use of those portlets were confined to specific portal servers. With JSR 168, Java portlets could be developed for deployment on any conforming Java portal server. A 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 portlet catalogs available but JSR-168-based solutions are rare. JSR 168 offers suitability to the developers to reuse the code to maintain a set of JSR-168-compliant portlets.

V2.0

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

Inter-portlet communication via events and public render parameters
Serving dynamically generated resources directly
Serving AJAX or JSON data directly
Filters and listeners

V3.0

JSR-362 is version 3, released in April 2017.[4] Some of its major features include:[5]

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

See also

References