Portal implementation principle

xiaoxiao2021-03-06  47

PORTAL implementation principle -

Related summary

(One Ren Ren Ping Student) Portal Server mechanisms are independent, Portal Server has its own container or engine to process the portlet, each portlet is similar to the servlet. Portlet has two standards, one is the old version of JetSpeed, IBM's WebSphere Portal Server original core API also uses JetSpeed ​​API, and the other is the JSR 168 standard, BEA and IBM, which is currently developed by JCP organization. This standard is achieved in your own product, but it is not yet mature. IBM's WSAD development tool has two project types for Portal, supporting both standards. Portal can be integrated into a type of performance layer into your web framework. (One Your Ren Ren Ping Student) JetSpeed ​​is a portal application management system, the application is built on the Web Framework above, which can be considered to be an application developed with Turbine Framework. (WHITEHHORSE) Portal includes Portal Server and Portlet Container; JSR-168 defines the portlet General API, Portlet Container needs to follow this API, which developed the portlet to smoothly transplant in any portlet container that implements JSR-168 specification. . Portal Server is provided by various developers, used to accept the user's request to forward the corresponding portlet, adjust the portal page layout, single sign-on, etc.; Portlet Container is packaged on the Servlet Container, Portlet is similar to servlet The implementation of Portal Server generally uses Web Framework technology; such as Liferay uses Struts Tiles; EXO PORAL uses JSF, etc. Portlets can use Web Framework. (Kingkii) FREE Portal Server: JetSpeed, Liferay, Jportal, ETC (Flyisland) on the basis of compliance with specifications

BAICHENHONG wrote: I don't think of all the integration, you have Oa, ERP, CRM, you don't feel it's very inconvenient to use OA, ERP, CRM, but you feel that you can use them. Integrate together, as long as you land once, you can use all the systems. This should be a very useful thing. You are more than a short sentence. The so-called integration is a lot of levels, Portal is concerned about user integration, including access interfaces, access methods, and more. The integration of the access interface does not require the application to be deployed together. As for "All systems can be used as long as you log in once," generally referred to as single-point landing "Single Sign-ON". The Portal server basically provides an authentication framework, and the new application developed under this framework is very simple; but if the heterogeneous system is SSO, this is another complex and huge topic. (Tommy_kin) Drag and drop layout is not the core technology of Portal, just a Personalize function, Portal features are integrated with applications. The so-called one-stop access.

Original link:

http://forum.javaeye.com/viewtopic.php?t=7005

PORTAL implementation principle 1. Portal use case readers can register their own users on the following three websites, experience Portal's functionality. Http://my.msn.com http://my.yahoo.com http://my.liferay.com My MSN's function is the most flexible, users can arbitrarily drag and drop the operation section (Column) and Content Section (Content The location and number of positions. My Liferay can only select a fixed column (Column) layout, but can move the contents of the content block (CONTENT) in this column. My Yahoo can only select a fixed column (Column) layout, and cannot move the content of the content. The structure of Portal is divided into three layers. (1) Page (2) Column, or PANE (3) Content, or We want to look at the entire operation process of Portal. (1) There is an [Add Content] button below each column to allow users to choose to join your favorite content. From here, we know that there is a public common portlet repository in the Portal system for users. The portlet deployment discriptor is defined in the JSR168 Portlet specification. Common portlet repository is stored in the format of this portlet deployment discriptor. The XREG file for open source project JetSpeed ​​is used to store the definition of Common portlet repository. (2) After adding Content, the user's Page and Column will have more Content. When the next user logs in, I will see my own Portal layout. From here, it can be seen that the Portal system records users' personal portal configuration information - User Portal Config. The PSML file of the open source project JetSpeed ​​is used to store the definition of the USER Portal Config. ------- Find. The entire process of Add Content is: Common portlet repository -> Add Content -> Personal Portal Config Display Portal's entire process for reading users from Personal Portal Config -> According to Portlet ID, from Common Portlet Repository Find detailed portlet definitions -> Display this portlet based on this detailed portlet definition. 2. Portal implementation we consider how to use Java to implement Portal. 2.1 Dynamic Include First, we use the simplest idea, we use 100 JSP files (1.jsp, 2.jsp, 3.jsp, ... 100.jsp, etc.) represent 100 portlets. User page mypage.jsp contains multiple portlets selected by the user. Now, suppose the portlets selected for the portlets of 1.jsp, 3.jsp, 7.jsp, etc. How do we display these portlets in MyPage.JSP? The most intuitive practice is to use JSP: include.

For example:

Due to can only specify fixed The JSP file name cannot dynamically specify the JSP file name. We need to translate as Java Code - RequestDispatcher.InClude (); let's replace this way of writing. Java code:

1

2

3

4 <% Request.

GetRequestDispatcher

("

1.

JSP "

).

Include

(Request, Response

); />

5

6

7% REQUEST.

GetRequestDispatcher

("

3.

JSP "

).

Include

(Request, Response

); />

8

9

10 <% Request.

GetRequestDispatcher

("

7.

JSP "

).

Include

(Request, Response

); />

11

12

13

Further improve myPage.jsp.

Java code:

1

2 <%

String

[

] Filenames =

{"

1.

JSP ","

3.

JSP ","

7.

JSP "

};%>

3

4 <%

for

(

INT i =

0; i

Length; i

)

{

...}

5

String filename = filename s

[i

];%>

6

7% REQUEST.

GetRequestDispatcher

(filename

).

Include

(Request, Response

); />

8

9 <%

}

// end for%>

10

11

The content of the filenames can be various, as long as RequestDispatcher is able to process.

Such as velocity, filenames = {"1.VM", "3.VM", "7.VM"}

Such as URL, Filenames = {"/portlet1.do", "/portlet3.do", "/portlet4.do"};

We can see that if we read the contents of FileNames from the user configuration, this is a simple portal implementation.

Java code:

1

2 <%

String

[

] Filenames =

(

String

[

]

Sense.

GetaTtribute ("Portlets.

Config "

%>%>

3

4 <%

for

(

INT i =

0; i

Length; i

)

{

...}

5

String filename = filenames

[i

];%>

6

7% REQUEST.

GetRequestDispatcher

(filename

).

Include

(Request, Response

); />

8

9 <%

}

// end for%>

10

11

2.2 Portlet Interface

Let's extend this example.

Suppose each portlet specifies a portlet interface.

Java code:

1 2 Interface portlet {...} 3 void render (Request, Response); 4}; 5 6 mypage.jsp as follows: 7 8 <% string [] portletClassNames = (String []) session.getattribute ("portlets. Config ");%> 9

10 <% for (int i = 0; i 13
14 <% portlet. Render (request, response); /> 15 16 <%} // end For%> 17 18 19 Portlet class sample code as follows: 20 public class portlet7 {...} 21 public void render (Request, Response) {...} 22 Request.getRequestDispatcher ("7. JSP "). Include (Request, Response); 23} 24}; 25

The above code is a simplified version of the core process of portal display portal.

The JSR168 portlet specification defines the true portlet interface definition.

2.3 Portlet Action

Portlet's operation includes maximizing / minimizing / recovery / shutdown / editing / help / up and down moves, and so on.

These operations have corresponding Action classes.

Open Source Project JetSpeed ​​Module / ActionS / Controls Directory The Action class including Maximize, Minimize, Close, and other Action class.

Open Source Project Liferay's Portal / Action Directory contains Maximize, Minimize, Close, etc. Action class.

The operation of Portal includes not only the operation of the above portlet, but also other higher levels of operations.

For example, Add / Move Page, Add / Move Column, change Layout, change SKIN, and the like.

2.4 Portlet Cache

When we operate portlet, only a particular portlet is only possible, or only the location of the portlet. At this time, most of the Porlets in the page are constant, only a small portlet change. We need to cache the contents of the portlet. The portlet interface has a render (Request, Response) method, we can customize the RESPONSE class, intercepting the portlet output, saving the contents of the Portal system Cache.

For example, the previously mentioned LifeRay open source project, and its StringServletResponse class saves the output of the portlet to a string.

Reference:

Javaeye Forum About Portal Discussion Http://forum.javaeye.com/viewtopic.php?t=5506&highlight=portal http://forum.javaeye.com/viewtopic.php?t=4413&highlight=portal http: // Forum.javaeye.com/viewtopic.php?t=5159&highlight=Portal Mainstream Enterprise Portal Application Performance Evaluation http://www2.ccw.com.cn/0430430d31_1.ASP Comparison and Review of Portal Technology Http://www.ccw.com.cn/cio/research/Info/HTM2004/20040813_13Ung.asp 4 EIP software evaluation is announced http://www.zdnet.com.cn/bizstrategy/eb/tech/story/0 , 3800029745, 39156 * 043, 00.htm how the portals scored http://www.infoworld.com/Article/04/04/30/18feportalbl_1.html Enterprise Portals Suites Portal Power http://www.networkcomputing.com/ Shared / Article / PrintFulLlarticle.jhtml? ArticleId = 18900467 Remote Portal Web Services (WSRP) http://www-900.ibm.com/developerWorks/WebServices/ws-wsrp/index.shtml portlet technology development Thinking HTTP : //www.blogbus.com/blogbus/blogbus.com/blogbus/blog/diary.php? Diaryid = 204304 WSRP Practice & Think Http://www.blogbus.com/blogbus/blog/diary.php?diaryid=117666 Portal Exhibition Mechanism Research HTTP : //www.blogbus.com/blogbus/blog/diary.php? DialessiD = 357938 Enterprise Portals Suites Po Rtal power http://www.networkcomputing.com/shared/Article/printfullarticle.jhtml?articleid=18900467

转载请注明原文地址:https://www.9cbs.com/read-74420.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.032, SQL: 9