CH1 preamble
The website of many large enterprises has gradually adopted Portal Server as the basis for development. As for what is Portal, Chinese translation as "Portal". Some people may think .. The killing .. The portal is not like yahoo, pchome, yam, etc. However, the Portal Server we discussed now is not so simple, basically Yahoo, PCHOME, Yam those who can only call the search engine.
If you have never used Portal Server or it seems to understand. You can join mynetscape or myyahoo to register an account. Because MyNetscape's style is better, so I will follow the example of mynetscape.
If you first come in touch to Portal, you will be surprised to find ... Wow .. Why is it full of so many small windows in a website. We call these small windows called "portlet", and each small window is independent Information and content, you can maximize, reduce, restore, close, and more. When you log in, you can choose and adjust your portlet, you can also set your favorite style and style, and you can set the data configuration of each portlet. This system is the system of God, is the portal we will introduce.
Composition of CH2 Portal
Portal's composition can be divided into three parts (1) Portal Server (2) Portlet Container (3) portlet
1) The definition of Portal Server is
A Portal is a web-based system, usually providing personalization settings, single landing, and a variety of different sources or different websites, and put this information on webpage The rendering platform in combination, the portal will have a delicate personalization to provide a customized web page, which will give different information content when different levels of users browse this page.
2) The definition of Portlet Container is
Portlet Container is a environment that provides portlets, containing many portlets and manages their life cycle, and he will always save portlets. After receiving the request from Portal, then pass this request to the existing container Portlet execution. Portlet Container is not obligated to combine the information generated by portlets, which must be processed by portal. Portal and Portlet Container can be placed together as components of the same system, or separate into two separate components.
3) The definition of portlet is
A portlet is a Web component that is technologically technically technically, managed by Portlet Container, dedicated to the customer's request and the information content that produces various dynamic. Portlets are a pluggable client interface component that provides a presentation layer to become an information system. These are also referred to as fragments, while fragments are Fragment, and the fragment is Markup (HTML, XHTML, WML), and can be combined with other fragments into a complex file. The content in the portlet is normal to become a portal web page with the content polymerization of other portlets. The lifecycle of the portlet is controlled by the portlet container. The interaction of client and portlets is implemented by Portal through a typical request / response method. It is normal for the content of the customer and portlets, for example, according to the next connection or a confirmed form, result portal The action of the portlet will be received to turn this processing to the target portlet. The generation of these portlets may vary from different users, which is completely based on the customer's setting for this portlet. CH3 portlet relationship with servlet
Portlets and servlets are like a brother, but there is a little bit of a little bit, because servlet and portlets are not as good, so the research team decides to define portlets to become a new component, so define a new and clear interface of portlets. behavior. In order to achieve reused purposes as much as possible, the Portlet's specifications use the servlet specification, many concepts are very similar, combined with portlets, servlets, and JSP in the same website system, we call the portlet application. In the same portlet application, they will share the same ClassLoader, Context, and Session.
1) The similarity of portlets and servlets
@ portlets is also a Web component of Java technology @ portlets is also a specific Container in administering @ portlets to dynamically generate various content @ portlets' lifecycle managed by Container @ portlets and client interaction with the REQUEST / RESPONSE
2) Portlets and servlets have some differences
@ portlets only generates a Markup information fragment, not a full web file. Portal will put all the portlet markup information cards into a complete portal page. @ portlets will not have direct relationships with the URL @ client must interact with Portal system and portlets @ portlets has some definition request processing, Action Request, and Render Request. @ Portlets Default Definition Portlet Modes and Window Status You can point out which function of this portlet is executing and now. @ portlets can exist multiple in the same portal web page.
3) Portlet has some additional features that are not available in servlets.
@ Portlets can access and store permanent profiles and customization information. @ portlets You can access user data @ portlets with URL rewrite features to dynamically establish links in the file, allowing Portal Server to do not know how to establish links and actions in the web page segment. @ portlets You can store temporary data in Portlet Session with two different ranges: Application-Wide Scope and Portlet Private Scope. 4) Portlet does not have some functions, but servlets are available
@ servlet has a character set encoding mode @ servlet to set the HTTP output header @ servlet to receive the URL request from Portal.
CH4 ri - Pluto Pluto Plan
JSR is a specification defined by JCP (www.jcp.org) Java organizations. Almost every JSR will output TCK * and RI **
* TCK (Technology Compatibility Kit) Compatibility Test Components * Ri (Reference Implementation) Implementation Reference
2003/10/27 JSR # 168 Portlet SPEC 1.0 has been officially announced. In the future, everyone can start developing compatibility products based on this specification. The RI of this standard specification is the use of Apache Jakarta Pluto Pluto Plan. As for why it is called Pluto, I guess is Sun wants to shoot the light to Pluto.
At present, Pluto has not yet been released, and interested people can be downloaded from the Jakarta website. However, I am now working by CVS. It is already possible to run. The installed method is very simple. . 1.27 is OK.
Then http: // localhost: 8080 / pluto / portal can see a very beautiful portal interface, as for the operation mode and method, please slowly understand the control method of the portlet.
Controls defined in Portlet SPECs are divided into 1) Basic portlet modesview - You didn't do any action only to display Edit - Edit Related Setup Help - Search Help
2) Basic Window StateSnormal - Restore Portlet window Maximized - Maximize portlet window Minmized - Minimize Portlet window
In fact, these actions have been implemented by Portal, and Portlet Container will receive a response related action. I don't think about these details in program development unless you have to be a portlet container. What people who have to do what people can do. For example, those who have not yet logged in should only be able to do DOVIEW / DOHELP, instead of doing the development of this permission control mechanism.
CH5 CSS definition
Each through an authentication user can use the relevant portlet look, and these settings are edited by CSS. Before there is no portlet spec, all vendors have ruled that they are completed by ISV, causing many portlets that cannot share the same CSS, and there will be many problems in transplantation.
Therefore, the definition of CSS is quite important for Portal with custom functions.
0) ANCHOR This is not defined: P
1) Fonts (font) portlet-font portlet-font-dim2) Message (paragraph ..) portlet-msg-statusportlet-msg-infoportlet-msg-errorportlet-msg-alertportlet-msg-surcess
3) Sections (Table, Div, Span ...) portlet-section-headerportlet-section-bodyportlet-section-alternateportlet-section-selectedportlet-section-subheaderportlet-section-footerportlet-section-fixt
4) Forms (form) portlet-form-labelportlet-form-input-fieldportlet-form-buttonportlet-icon-labelportlet-dlg-icon-labelportlet-form-field-labelportlet-Form-Field-Labelportlet-form-field
5) menus (popup menu) portlet-menuportlet-menu-itemportlet-menu-item-selectedportlet-menu-item-hoverportlet-menu-item-hover-selectedportlet-menu-cascade-itemportlet-menu-cascade-item-selectedportlet-menu -DescriptionPortlet-menu-CAPTION
Basically, what do you want to know, what CSS should be used, these CSS names are used in the portlet you develop, you can port to other systems that support JSR # 168, do not need to change time to become their Look & FEEL.
Limitations of CH6 Information Fragment (Fragment Markup)
Each portlet output is a piece of information, which is mentioned before these Markup is a bit limited.
If you are a message fragment that generates an HTML format, * cannot * Has the following Tag: Base, Body, IFRAME, FRAME, FRAMESET, HEAD, HTML, and TITLE
If you generate information segments in XHTML or XHTML-Basic format, * cannot * Has the following Tag: Base, Body, IFRAME, HEAD, HTML, and Title
CH7 other details
Finally, portlets need to consider SECURITY, CACHING, TAGLIB, etc...
Portal is the information integration platform for the backend EAI, provides a complete solution, providing a single landing mechanism, intimate personalized page setting, more providing a wide range of platforms such as PDAs, mobile phones, etc. window. Therefore, the government and large enterprises should * should * adopt this solution, achieve information flow / stream / logistics effect through WebService ....