Personal pair portal and portlet development awareness-Alibaba Cloud Developer Community

Although it is a previous article, knowledge is not outdated, especially the recent hot development of html5. I 'd like to share it with you, I hope it will be helpful to those who are studying Portal and doing Web development.

Pass this period of time learning, himself from the portal and portlet know nothing, become it gradually have known. The summary is as follows for your reference.

1. About Portal

     what is it portal? The word Portal is put forward in the development of Internet, which originally means "Portal website" is the first website that people want to visit after surfing the Internet, such as Yahoo and Sohu. At this stage, Portal is also an information platform for a wide range of groups, which aggregates all kinds of information (or access to such information) that people need together and is a centralized information platform. Soon, the concept of Portal was also adopted in enterprise applications. According to the different functions of Portal in enterprise applications, the industry has different definitions of Portal, such as enterprise information Portal, Knowledge Portal, professional Portal, application portals and so on. Over time, the definition of Portal in the industry tends to be the same, that is, the definition of Portal in JSR168 .

    Portal as web one applications that provide personalized, single logon, and aggregation information sources and as the information system presentation layer host . Aggregation refers to an activity that integrates content from various information sources into a web page.

1. Portal functions can be divided into three main aspects:

A. Portlet container: Portlet container and servlet container very similar, all the portlet are deployed in the portlet container in portlet container control portlet lifecycle and provide them with necessary resources and environment Information . Portlet container initializes and destroys portlets, sends user requests to portlets, and generates responses.

B. Content Aggregation: Portlet in the specification provisions portal one of the main jobs is gathered by various portlet application generated content, we will in the "how to create a Portal page section this do further discussion.

C. Public service: portlet server a strength is what it offers a set of public services. These services and not portlet required by the spec, but portal business implementation version provides rich public services to different from their competitors .

2. Several public services are expected to be found in most implementations:

A. Single logon: you only need to log on to the portal server once to access all other applications, which means you do not need to log on to each application separately. For example, once I log on to my intranet website, I can access mail applications, IM messaging applications, and other intranet applications, without having to log on to these applications separately.

B. The Portal server assigns you a pass Library. You only need to set the user name and password in the mail application once, and the information will be stored in the pass library in an encrypted manner. When you have logged on to the intranet website and want to access the mail application, the portal Server will read your pass from the pass library and log on to the mail server for you. Your access to other applications will also be handled as follows.

C. Personalized: personalized service the basic realization of enables users to personalize her pages from two aspects: first, users can decide the color and control icon of the title bar according to her own preferences. Second, the user can decide which portlets are on her page. For example, if I'm a sports fan, I may have used a can provide I love team latest information portlet to replace stock and news portlets.

3. Three features of Portal

A. Personalization (personalized): users customize their own pages

B. Single sign on (Single sign-on)

C. Content aggregation (Content aggregation): information from different sources is integrated into one page. Medium    

as shown in the figure, it is a general portal application.

    

 

The main function of our portal (referring to the project where I was at that time) is to realize integration. It mainly integrates ten subsystems and five application systems into the portal homepage of XX project. In the portal, click different system menus (as shown in the following figure),

 

enter different subsystems. The implementation can be based on LADP. We use LDAP, which is independent of the Portal system, to verify the validity of users in the Portal system. Once the authentication is passed, users log on to the Portal system. The user information stored in each business system in the Portlet of each business system with the given permission is then managed by the Portal system, and then automatically verified in the user information base of each business system, once through the calibration, the portlet can display business system authorization information.

II. About portlet

what is portlet? Generally speaking, Portlet is a sub-window on a Portal Portal. From the user's point of view, Portlet is a window that provides specific services or information (such as calendar and news) in portal sites, while from the application developer's point of view, portlet are pluggable modules designed to run in the Portlet container of the Portal Server.

As follows, is a simple portlet:

 

            

             

in our project, mainly several subsystems and its related application encapsulation into the portlet, and then add to portal, unified layout management. The main problem now is, how different subsystem package into the portlet, this need to first give different subsystem definition must Interface Specification, and then only use after the transformation of the package.

The development of Portlet mainly uses Rational Application Developer. In this tool used on developed portlet after can be published to Webspher Portal Server.

 

III. About Portal topics and skin development

            after all, the theme and skin development of the Portal are still the development of common jsp, but a large number of tag libraries provided by ibm are used, which makes it more troublesome to develop. However, if you have a deep understanding of the call relationship between these files related to the theme and skin, you can use them easily. IBM WebSphere Portal use different Java Server Page(JSP) and Cascading Style sheets (Cascading Style Sheet,CSS) and images to display the portal page. It uses JSP in the themes, skins, and screens directories of the X:\WebSphere\AppServer\installedApps\YourComputerName \wps.ear\wps.war directory to construct a Portal page. Each of these directories contains html, wml, and chtml subdirectories. WebSphere Portal use them to serve different clients, such as desktop browsers and mobile devices.

1. Default.jsp:

all screen aggregation starts with Default.jsp. The Default.jsp used for the Default theme is located in wp_root\app\wps.ear\wps.war\themes\html. This JSP contains other JSP for displaying titles, company logos, toolbars, and JSP for implanting content into available locations and pages. At the end of Default.jsp, screenRender JSP the tag to select the requested screen (such as login or forgotpassword). The following jsp is called in this order.

2. Head.jsp

Head.jsp generates a title and inserts a link to a style table file. It also defines variables required to support BIDI (bi-directional) text. The content of this JSP will be described here. You can also use the title of the portal website is fixed here, which is easier and easier to use than the label method published by IBM. If you develop multi-cover theme, and these sets of theme page title if you also same (except virtual portal, general is like this), you can put these files in the root directory of themes/html. default.jsp calls this file.

3. AdminLinkBarInclude.jsp

        AdminLinkBarInclude.jsp is mainly used to display the three tags of "new page", "edit page" and "assign page permission"

4. ToolBarInclude.jsp

ToolBarInclude.jsp displays welcome messages and the link toolbar provided for users. The link toolbar displayed on the portal site depends on the user context. For example, the logged-in user sees links such as "my portal website", "management" (visible to the administrator), "edit my 'Profile '", "cancel", etc; the logged-out users see links such as "forgot password", "login" and "help.

5. PlaceBarInclude.jsp

PlaceBarInclude.jsp is used to display the first-level menu, namely "home page", "Document Manager", "company profile", "business profile" and so on, which belongs to the highest-level Directory, you can create a level -2 menu by using "new page" on any level -1 menu. The content you create will be stored in the database (cloundscape was used originally), you can also pour it into databases supported by any portal such as db2 and oracle. This content will be discussed in detail in my next article and will not be mentioned here.

6. PageBarInclude.js P

it is used to display the level -2 menu. When you click any label in the level -1 menu, the system will call the file and retrieve all submenus of the menu, which are displayed under the PlaceBar by default.

The above skin development. Based on Websphere Portal6  . 0 version, and Portal7.0 provided by IBM is still being learned. In general, the skin development of Portal7 is mainly implemented through configuration and deployment on several pages. However, the implementation of some specific modules may get twice the result with half the effort if instructed by professionals. After all, groping forward in the dark, the pace of progress is very slow.

This article is transferred from Fengbo Haihai 51CTO blog, original link: http://blog.51cto.com/fengbohaishang/989144

Selected, One-Stop Store for Enterprise Applications
Support various scenarios to meet companies' needs at different stages of development

Start Building Today with a Free Trial to 50+ Products

Learn and experience the power of Alibaba Cloud.

Sign Up Now