官术网_书友最值得收藏!

Understanding a portal

By now, you have probably heard that "Liferay is a Portal Server"! Now the question is, "What do we really mean when we use the term Portal Server?"

Well, to get the answer we should first understand what a portal is. A portal is a web-based application or gateway which hosts and runs different applications required by the user. All these applications are integrated to achieve different benefits, such as availability of information at a central location, collaboration, reducing costs, and streamlining your business processes.

To make sure all of the above-mentioned benefits are achieved, Liferay Portal adds one or more applications on a portal page. This application is known as a portlet .

A portlet is a web application which runs in a fragment of a page. These portlets are used by portals as pluggable user-interface components which provide a presentation layer to the Information System. One or more portlets get combined and generate a complete web page or document, which is displayed to a user. This is known as aggregation. Liferay Portlet Container plays a vital role in achieving this. In the following screenshot, three portlets have been aggregated by the Portlet Container to form the welcome page:

Understanding a portal

The Portlet Container is a logical component in Liferay (and in any standard Portal Server) which runs the portlets and provides them with the required runtime environment. It is also responsible for managing the lifecycle of a portlet. To understand the role of the portlet container, let's look at what happens when you request to access a page in a portal:

  1. You send an HTTP request via a web browser to the portal.
  2. The portal receives the request.
  3. The portal determines if your request contains any action targeted to any of the portlets which are associated with the page.
  4. If there is any action involved, the portal requests Portlet Container to invoke that particular portlet to process the action. Rest of the portlet will only get re-rendered once the action phase of the portlet is completed.
  5. The Portlet Container provides the fragment of the individual portlet back to the portal. The fragment can be any markup (HTML/XHTML/WML).
  6. The portal aggregates the output of the portlets on the portal page and sends it back to the browser for you to access.

The lifecycle is explained in the following diagram:

Understanding a portal

Liferay Portal supports portlet standards JSR-168 and JSR-286, which are also known as Portlet 1.0 and Portlet 2.0 specifications, respectively.

主站蜘蛛池模板: 沂南县| 南乐县| 射洪县| 临城县| 尚志市| 治多县| 苗栗县| 韩城市| 屯昌县| 长泰县| 永清县| 白水县| 当涂县| 本溪市| 富川| 昭觉县| 云梦县| 大庆市| 宜兰市| 渝中区| 泉州市| 凤山县| 青浦区| 迭部县| 靖江市| 蒙山县| 法库县| 新邵县| 略阳县| 龙胜| 通化县| 河源市| 稻城县| 石嘴山市| 沙雅县| 临夏市| 海城市| 军事| 新绛县| 遂平县| 炉霍县|