Fundamentals of Liferay Portlets - part 1
What is Liferay Portal?
What are JSR 168 and JSR 286?
You can have a quick overview of Liferay here
- Liferay Portal is the world's leading open source enterprise portal solution using the latest in Java and Web 2.0 technologies.
- Runs on all major application servers & servlet containers,databases, and operating systems with over 700 deployment combinations.
- JSR 168 and JSR 286 compliant
- Out-of-the-box usability with over 60 portlets pre-bundled
- Built-in Content Management System (CMS)
- Built-in Collaboration suite
- Personalized pages for all user
What are JSR 168 and JSR 286?
- JSR 168 and JSR 286 are Portlet Specifications
- They were created out of a need to have a specification for displaying multiple applications on the same page.
- The specs define the lifecycle of a portlet as well as its characteristics/look and feel.
- They standardize the way portlets are developed
- A portlet is a web component that processes requests and generates dynamic content.
- The content generated by a portlet is also called a fragment (e.g. HTML, XHTML, WML) and can be aggregated with other fragments to form a complete document.
- Portlets are different from servlets in that they have a 2 phase commit.
- With servlets, the service() method processes all requests.
- With portlets, the processAction() method processes the requests and the render() method draws the contents of the portlet on the page
- init() - Initializes the Portlet
- processAction() - process input from a user action.
- render() - Renders the content output.
- destroy() - Cleans up the portlet
- serveResource() - Allows a portlet to serve a resource. The serveResource() method can be used to implement AJAX use cases.
- processEvent() - Perform events triggered by other portlets. (IPC)
- Portlets have additional characteristics that make them different from Servlets
- Portlet Modes
- Window States
- Portlet Preferences
- Each portlet has a current mode, which indicates the function the portlet is performing.
- All JSR 168 compliant portals should support the View, Edit and Help modes.
- Window states indicate the amount of portal page space that will be assigned to a portlet.
- All spec compliant portals should support the minimized, maximized and normal window states.
- Portlets can be configured to provide a custom view or behavior for different users.
- For example, a weather portlet can show the temperature in Chicago for one user and the temperature in LA for another user.
- These configurations are represented as a persistent set of name-value pairs and are referred to as portlet preferences.
You can have a quick overview of Liferay here
Thanks for dropping by Ava.
ReplyDeleteShort and sweet
ReplyDeleteThanks DIN, I hope it was helpful.
ReplyDelete