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

  • Liferay Beginner’s Guide
  • Robert Chen Sandeep Nair Samir Bhatt
  • 411字
  • 2021-08-27 12:04:36

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.

主站蜘蛛池模板: 巴彦县| 沛县| 苍梧县| 佳木斯市| 从化市| 沁水县| 休宁县| 柳林县| 南阳市| 达州市| 绥中县| 双城市| 化州市| 辽中县| 阿城市| 手游| 资阳市| 修武县| 乌拉特中旗| 中江县| 炉霍县| 海原县| 崇阳县| 都安| 尚志市| 古交市| 安达市| 镇宁| 蓝山县| 武清区| 盐亭县| 当阳市| 休宁县| 比如县| 安岳县| 司法| 平原县| 汝阳县| 赤壁市| 米林县| 团风县|