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

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.

主站蜘蛛池模板: 兰坪| 廉江市| 江门市| 胶州市| 苏州市| 元氏县| 灵武市| 清涧县| 南充市| 瑞金市| 教育| 枣阳市| 大田县| 怀仁县| 东乡县| 隆回县| 雷州市| 留坝县| 顺昌县| 古蔺县| 文安县| 潍坊市| 水城县| 贵南县| 龙游县| 偃师市| 吉安县| 金乡县| 隆子县| 江川县| 寿宁县| 甘孜县| 定安县| 辉县市| 南陵县| 正定县| 黄冈市| 樟树市| 临猗县| 河北区| 图木舒克市|