Portal Server
This article mainly focuses on Portal server basics and why Liferay portal server was chosen for implementation.
1. What is a portal?
A portal is nothing but a web application that provides Personalization, single sign on and content aggregation from different sources, and provides the presentation layer to users.
Personalization is nothing but a manual action initiated by the use to configure and re arrange the interface based on his own personal preference and interest.
Single Sign-On allows a user to login into multiple applications by a single login.
Content aggregation is nothing but web content gathered from different sources for reuse on a single page. In portal server content aggregation is a process of combining information from various portal applications.
A Portal page,
In This page, we can see there is couple of portlets. All these portlets are combined in one page which allows user to change , re arrange according to his preferences.
2. What is a Portlet?
A Portlet are web components that are deployed inside a container and generate dynamic content. The Container we use here is much similar to the Server container and is called as Portlet container.
A Portlet is a class that implements javax.portlet.Portlet interface and portlets are packed in war file and deployed.
3. What is a Portal Container?
A portal container is much like a servlet container .Every Portlet is deployed inside a portal container that controls the lifecycle of a Portlet and provides the necessary resources and environment to the portlet.This is also responsible for initializing .destroying the portlets.
4. What are Fragments?
The content generated by a Portlet is known as its fragment or fragment code. This is the HTML code generated from the portlets rendering code.
5. Portlet vs. servlet
Portlets are similar to servlets in,
- Portlets are managed by a container.
- Portlets generate dynamic content and as well as static.
- Life cycle is managed by Portlet container.
- Portlets interact with application in a request/response model.
- Packaging and deployment are initially the same.
- Life cycle management is almost same
- The manner in which classes are loaded is also same.
Portlets are not similar to servlets in,
- Portlets only generate markup fragments not the complete documents.
- Portlets are not url addressable. The Users are not allowed to access pages directly using url as we do in servlets.
- Portlets are not allowed to generate certain HTML code that contains tags such as base, body, iframe, frame, frameset, head, HTML, or title. Let’s say that if a Portlet uses a body tag, the container will be confused to use which body tag.
- On the client side, the users are not allowed to contact directly with the Portlets, it should be done through portal server.
- Portlets contain ways to manipulate their interface like window size, color e.t.c.
- Multiple instances of single Portlet are allowed on a page.
- Portlets have two scopes within session; application scope for communication across portlets and portlet scope for intra portlet communication.
- Portlet aren’t allowed to set the character set encoding of the response.
- Portlet also aren’t allowed to set the HTTP headers on the response. Portlet cannot manipulate the URL of the client request to the portal
- Typical methods of Portlet API are doView(), doEdit(), doHelp() and processAction() while those of servlet are doService(), doPost(), doGet().
And lastly
Portlets are different from servlets in that they have a 2 phase commit.
- With servlets, the service() method processes all requests.
6. What are JSR 168 and JSR 286?
JSR 168 and JSR 286 are Portlet Specifications that are created 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
7. Life Cycle of Portlet
A portlet is managed by a portlet container and portlet is managed by a well defined life cycle that says from loading a portlet to destroying that.
This life cycle of a portlet is expressed through the following phases,
- Init()
- processAction()
- render()
- destoy()
init : The loading and initialization of a portlet is handled in the init() phase.The loading and initialization can occur when a portal container starts a protlet application or when a request is to be processed by a protlet.
After the portlet is loaded, the portlet must be initialized ( such as initializing backend resources ).These are done in the init() phase.
ProcessAction():request handling is performed in this phase.This obtinas input from the user actions.
Render():In this phase ,it renders the content output.
Destroy():Cleans the portlet.
8. Portlet Characteristics
Portlets have some additional features that makes them different from servlets like
- Portlet Modes
- Window States
- Portlet Preferences
Portlet Modes
A portlet mode is nothing but the function the portlet is performing
- All JSR 168 compliant portals should support 3 modes view , Edit and help.
- A portlet mode says what function it should perform and what response it should display.
- The portlet mode is available based on users.A guest user may have a View and Help mode but not the Edit mode.
- View mode : the functionality of the view mode is that it generates response that changes the current state of the portlet.
- Edit mode: the functionality of the Edit mode is that it allows the user to customize the behavior of the portlet.
- Help mode: In help mode, basic help information is provided.
Window States
- A window state is nothing but amount of space that will be assigned to the content generated by the Portlet.
- All spec compliant portals should support the minimized, maximized and normal window states.
Portlet Preferences
- Portlets can be configured to provide a custom view or behavior for different users.
- For example, a stock portlet can show stocks related to particular user.
- These configurations are represented as a persistent set of name-value pairs and are referred to as portlet preferences.
- Portlet preferences are intended to store basic configuration data for portlets.
- The portlet container is responsible for getting the values related to the Portlet.
7. Why LifeRay?
Liferay is a jsr286 compliant portal server
Liferay provides out-of-box complete portal server with rich features with build in content management system and collaboration suite.
Liferay works on anything from a light weight servlet containers such as jetty and tomcat to full j2ee server including Weblogic and websphere.
Liferay Portals have a smart web 2.0 look and supplied portlets operate consistently.
For users, they can create public and private spaces with one click and then added portlets by just dragging and dropping them anywhere on a page. The supplied portlets cover an excellent range
Adding a language portlet is very easy and can localize portlets,CMS content and page layouts.
The enterprise version uses OSCache ( a open source , high performance j2ee caching framework) for clustering and cachecing.
Liferay bundles with several portlets including Blogs portlet,Wiki portlet e.t.c
Built in Content Management System (CMS) and Collaboration Suite
Out-of-the-box usablility—choose from over 60 portlets and over 20 themes
Out-of-the-box development tools
Out-of-the-box support for 22 languages
Service Oriented Architecture (SOA) with web services support
LDAP support and integration
Secure enterprise application integration framework
Ready integration: Pentaho , ,Intalio ,Terracotta ,ICEfaces ,jQuery , Business Intelligence ,Business Process Management
Scalability and high availability
8. Distributions
Liferay Portal is a JSR-286 enterprise portal which includes a suite of applications (e.g., Content Management System, blogs, instant messaging, message boards, etc.). It is distributed in two different editions:
- Liferay Portal Community Edition - a version with the latest features and support through the active community.
- Liferay Portal Enterprise Edition - a commercial offering that includes services including updates and full support. This release goes through additional quality assurance cycles and is usually available around 1 or 2 months after the Community Edition.
Liferay also provides a collaboration suite based on the Liferay platform:
- Liferay Social Office - a social collaboration suite for enterprises
More Articles To Come.............
No comments :
Post a Comment