Devoxx banner
Vuoi ricevere uno zainetto JavaPolis?

Java User Groups
Java.net Partner
Get Firefox!

Back to PortletJava1En.

Diff PortletJava1En

Line 1:
-article of '''MassimilianoDessi'''+article of '''MassimilianoDessi'''
-translated by Nelly Cannas ( nellycannas[#at*]yahoo[*dot#]it )+  
-[<html>]+translated by Nelly Cannas ( nellycannas[#at*]yahoo[*dot#]it )
-<p align="left"><br>+[<html>]
- <br>+<p align="left"><br>
- <strong>Portlet I</strong><br>+ <br>
- <br>+ <strong>Portlet I</strong><br>
- <strong>Introduction</strong><br>+ <br>
- The Jakarta-Jetspeed project permits the construction of enterprise portals + <strong>Introduction</strong><br>
- by means of portlets. <br>+ The Jakarta-Jetspeed project permits the construction of enterprise portals
- Portlets are web components that can be used as plug-in and managed by a container + by means of portlets. <br>
- (Jetspeed). <br>+ Portlets are web components that can be used as plug-in and managed by a container
- The pages are created assembling portlets, which are pieces of pages and their + (Jetspeed). <br>
- role is giving information from sources. <br>+ The pages are created assembling portlets, which are pieces of pages and their
- The use of this technology allows users to construct their own portal, simply + role is giving information from sources. <br>
- choosing where <br>+ The use of this technology allows users to construct their own portal, simply
- , how and in which page put the portlets with the different contents.<br>+ choosing where <br>
- Portlets can be java applications of several kinds, for example based on “actions” + , how and in which page put the portlets with the different contents.<br>
- ( of Turbine, Velocity or Struts), contents from other sites through RSS [1], + Portlets can be java applications of several kinds, for example based on “actions”
- xslt, or publications made with Cocoon [2]. <br>+ ( of Turbine, Velocity or Struts), contents from other sites through RSS [1],
- Another application allowed by portlets is the connection with content management + xslt, or publications made with Cocoon [2]. <br>
- systems , thanks to the fact that portlets are components. <br>+ Another application allowed by portlets is the connection with content management
- Jetspeed shows the content adapting the language to the userÂ’s browser + systems , thanks to the fact that portlets are components. <br>
- ; which can be an http client or a wap phone. <br>+ Jetspeed shows the content adapting the language to the userÂ’s browser
- In order to consent the portability between commercial portlet containers, the + ; which can be an http client or a wap phone. <br>
- java community process has been asked to create a standard for portlets (jsr + In order to consent the portability between commercial portlet containers, the
- 168*) .<br>+ java community process has been asked to create a standard for portlets (jsr
- The comitee is composed by ASF, Oracle, IBM, Sun, SAP, Borland, Novell, and + 168*) .<br>
- many others. </p>+ The comitee is composed by ASF, Oracle, IBM, Sun, SAP, Borland, Novell, and
-<p><strong>Framework and components used in Jetspeed</strong><br>+ many others. </p>
- LetÂ’s start to see in a logical-functional way how pages are assembled.<br>+<p><strong>Framework and components used in Jetspeed</strong><br>
- The assembling of portlets in a page is made by Turbine. <br>+ LetÂ’s start to see in a logical-functional way how pages are assembled.<br>
- Turbine is a Jakarta framework for the creation of web application according + The assembling of portlets in a page is made by Turbine. <br>
- to the paradigm MVC[3]. <br>+ Turbine is a Jakarta framework for the creation of web application according
- Turbine gives services and functionalities, particularly by means of the actions + to the paradigm MVC[3]. <br>
- , services in background and template. <br>+ Turbine gives services and functionalities, particularly by means of the actions
- For template Turbine uses Velocity[4] or the Jsp. <br>+ , services in background and template. <br>
- Velocity is a Jakarta template engine, with his template (.vm Velocity macro) + For template Turbine uses Velocity[4] or the Jsp. <br>
- it is possibile to have access to java objects in his context. <br>+ Velocity is a Jakarta template engine, with his template (.vm Velocity macro)
- Velocity represents the view of Turbine. </p>+ it is possibile to have access to java objects in his context. <br>
-<p><strong>Creation of the pages</strong></p>+ Velocity represents the view of Turbine. </p>
-<p>The calls to Jetspeed are like this: <br>+<p><strong>Creation of the pages</strong></p>
- http://wwwÂ…/portal/user/userName/page/default.psml?params<br>+<p>The calls to Jetspeed are like this: <br>
- The url contains the name of the user who is asking the page and refers to a + http://wwwÂ…/portal/user/userName/page/default.psml?params<br>
- psml file , even followed by possible params . <br>+ The url contains the name of the user who is asking the page and refers to a
- The psml file (Portal structure markup language) is an xml file which contains + psml file , even followed by possible params . <br>
- the site structure with the portlet entries for the different pages (but it + The psml file (Portal structure markup language) is an xml file which contains
- is also possible to have separated files, for each page, that refer to each + the site structure with the portlet entries for the different pages (but it
- other to compose a psml file). <br>+ is also possible to have separated files, for each page, that refer to each
- In the psml file it is shown what layout controller must be used to dispose + other to compose a psml file). <br>
- the components that form the page (es.tab-controller, card- controller) .<br>+ In the psml file it is shown what layout controller must be used to dispose
- At this point Jetspeed has all the information to compose the page. <br>+ the components that form the page (es.tab-controller, card- controller) .<br>
- Turbine, starting from the file default.vm of Velocity, that contains the general + At this point Jetspeed has all the information to compose the page. <br>
- layoutof pages, creates the portlets according to the scheme imposed by the + Turbine, starting from the file default.vm of Velocity, that contains the general
- controller written in the psml. </p>+ layoutof pages, creates the portlets according to the scheme imposed by the
-[</html>]+ controller written in the psml. </p>
- attach:portlet-1_fig1.jpg+  
-  +[</html>]
-[<html>]+  
-<p align="center"> <strong>Fig 1. JetspeedÂ’s architecture </strong></p>+ attach:portlet-1_fig1.jpg
-<p> </p>+  
-<p><strong>Velocity macro</strong><br>+[<html>]
- Velocity macro files (vm) are VelocityÂ’s templates, they are html files +  
- with variables that are substituted by Velocity </p>+<p align="center"> <strong>Fig 1. JetspeedÂ’s architecture </strong></p>
-<p>An example of the vm file is this default.vm :</p>+<p> </p>
-<p><font size="-1" face="Courier New, Courier, mono"><html> <br>+<p><strong>Velocity macro</strong><br>
- <head> <br>+ Velocity macro files (vm) are VelocityÂ’s templates, they are html files
- Â…$jnavigation.setTemplate("top.vm")<br>+ with variables that are substituted by Velocity </p>
- Â….. <br>+<p>An example of the vm file is this default.vm :</p>
- $jnavigation.setTemplate("left.vm") <br>+<p><font size="-1" face="Courier New, Courier, mono"><html> <br>
- Â… <br>+ <head> <br>
- $screen_placeholder <br>+ Â…$jnavigation.setTemplate("top.vm")<br>
- Â…. <br>+ Â….. <br>
- $jnavigation.setTemplate("bottom.vm") <br>+ $jnavigation.setTemplate("left.vm") <br>
- Â… <br>+ Â… <br>
- </body> <br>+ $screen_placeholder <br>
- </html> </font></p>+ Â…. <br>
-<p> </p>+ $jnavigation.setTemplate("bottom.vm") <br>
-<p>In this file Velocity is asked to compose the layout of the page with a top, + Â… <br>
- a left and a bottom and a piece that is called $screen placeholder and that + </body> <br>
- we will see later. <br>+ </html> </font></p>
- The result will be a page like fig 2</p>+<p> </p>
-  +<p>In this file Velocity is asked to compose the layout of the page with a top,
-[</html>]+ a left and a bottom and a piece that is called $screen placeholder and that
-  + we will see later. <br>
- attach:portlet-1_fig2.jpg+ The result will be a page like fig 2</p>
-[<html>]+  
-<br>+[</html>]
- <strong>Fig. 2 Jetspeed Layout</strong></p>+  
-<p><br>+ attach:portlet-1_fig2.jpg
- LetÂ’s see what is $screen placeholder. <br>+  
- As we have said, the psml file contains the portlets that must be visualized +[<html>]
- for the corresponding pages , and they are inserted for that page in the part +  
- called $screen placeholder, according to the modalities given by the controller. +<br>
- <br>+ <strong>Fig. 2 Jetspeed Layout</strong></p>
- So we will have the page like in fig3 and 4, that is the structure of the pages +<p><br>
- constructed by Turbine using VelocityÂ’s templates. </p>+ LetÂ’s see what is $screen placeholder. <br>
-  + As we have said, the psml file contains the portlets that must be visualized
-[</html>]+ for the corresponding pages , and they are inserted for that page in the part
- attach:portlet-1_fig3.jpg+ called $screen placeholder, according to the modalities given by the controller.
-[<html>]+ <br>
-<p align="left"> <strong>Fig 3 Turbine Layout</strong></p>+ So we will have the page like in fig3 and 4, that is the structure of the pages
-[</html>]+ constructed by Turbine using VelocityÂ’s templates. </p>
- attach:portlet-1_fig4.jpg+  
-[<html>]+[</html>]
-<p align="left"> <strong>Fig 4 Layout Screen</strong></p>+  
-<p><br>+ attach:portlet-1_fig3.jpg
- <strong>Other functionalities </strong><br>+  
- After the explanation of the most common use, with http calls, letÂ’s see +[<html>]
- other functionalities of Jetspeed. <br>+  
- In the folder WEB-INF\templates we have two subdirectories, Jsp and Velocity, +<p align="left"> <strong>Fig 3 Turbine Layout</strong></p>
- as Turbine can use both templates. <br>+[</html>]
- In the subdirectories we have the folder html and wml: in the first are contained +  
- the template for browser http, in the second that for wap device. </p>+ attach:portlet-1_fig4.jpg
-[</html>]+  
- attach:portlet-1_fig5.jpg+[<html>]
-[<html>]+<p align="left"> <strong>Fig 4 Layout Screen</strong></p>
-<p align="left"><strong>Fig 5 Jetspeed on http :http://www.anglonaweb.it</strong></p>+<p><br>
-[</html>]+ <strong>Other functionalities </strong><br>
- attach:portlet-1_fig6.jpg+ After the explanation of the most common use, with http calls, letÂ’s see
-[<html>]+ other functionalities of Jetspeed. <br>
-<p align="left"><strong>Fig 6 Jetspeed on wap</strong></p>+ In the folder WEB-INF\templates we have two subdirectories, Jsp and Velocity,
-<p>With these template is managed the supplying of the contents on several canals.<br>+ as Turbine can use both templates. <br>
- The localization is managed by a service from turbine that is used by Velocity + In the subdirectories we have the folder html and wml: in the first are contained
- (l10n). <br>+ the template for browser http, in the second that for wap device. </p>
- Jetspeed exposes even some web-services. <br>+[</html>]
- Configurating properly Velocity templates, it is possibile to have even different +  
- layouts for the portal pages, the only limit is the fantasy of the graphic who + attach:portlet-1_fig5.jpg
- will choose the layout of the site, that will be translated in the VelocityÂ’s +  
- template.</p>+[<html>]
-<p><br>+<p align="left"><strong>Fig 5 Jetspeed on http :http://www.anglonaweb.it</strong></p>
- <br>+[</html>]
- <strong>Structure and content of psml file (Portal structure markup language) +  
- </strong><br>+ attach:portlet-1_fig6.jpg
- It contains the structure of the userÂ’s portal, the portlets that will +  
- composed the pages and the controllers for the pages and even the portletsÂ’ +[<html>]
- skins. </p>+<p align="left"><strong>Fig 6 Jetspeed on wap</strong></p>
-[</html>]+<p>With these template is managed the supplying of the contents on several canals.<br>
-@@@@+ The localization is managed by a service from turbine that is used by Velocity
-<?xml version="1.0" encoding="iso-8859-1"?> + (l10n). <br>
- <portlets xmlns="http://xml.apache.org/jetspeed/2000/psml"> + Jetspeed exposes even some web-services. <br>
- <metainfo> + Configurating properly Velocity templates, it is possibile to have even different
- <title>Default Jetspeed Page</title>+ layouts for the portal pages, the only limit is the fantasy of the graphic who
- </metainfo> + will choose the layout of the site, that will be translated in the VelocityÂ’s
- <control name="TabControl"/> + template.</p>
- <controller name="CardPortletController"> +<p><br>
- <parameter name="parameter" value="pane"/>+ <br>
- </controller>+ <strong>Structure and content of psml file (Portal structure markup language)
- <skin name="orange-grey"/>+ </strong><br>
- Â… + It contains the structure of the userÂ’s portal, the portlets that will
- <portlets>+ composed the pages and the controllers for the pages and even the portletsÂ’
- <entry parent="HelloVelocity"/> <br>+ skins. </p>
- <layout> <br>+[</html>]
- <property name="row" value="0"/> <br>+@@@@
- <property name="column" value="1"/> <br>+<?xml version="1.0" encoding="iso-8859-1"?>
- </layout> <br>+ <portlets xmlns="http://xml.apache.org/jetspeed/2000/psml">
- </portlets> + <metainfo>
- <portlets> + <title>Default Jetspeed Page</title>
- <entry parent="HelloJSP"/> + </metainfo>
- <layout> + <control name="TabControl"/>
- <property name="row" value="1"/> + <controller name="CardPortletController">
- <property name="column" value="0"/> + <parameter name="parameter" value="pane"/>
- </layout> + </controller>
- </portlets> + <skin name="orange-grey"/>
- </portlets>+ Â…
-'''Conclusions'''+ <portlets>
-In this first artiche we have seen what Jetspeed and the portlets provide:+ <entry parent="HelloVelocity"/> <br>
- *The possibility for the users to create their own portals, according to the language and the device used+ <layout> <br>
- *The connection with Content Management System thanks to the fact that the portlets are components, an example of Jetspeed with a cms: http://www.anglonaweb.it/. + <property name="row" value="0"/> <br>
-The complete list of the sites created with Jetspeed are available on:+ <property name="column" value="1"/> <br>
-http://jakarta.apache.org/jetspeed/site/usejetspeed.html+ </layout> <br>
-For the developer, as Jetspeed is a portal framework that exposes information, applications and services, it is possibile to find in it the application of the lates innovations, of standards, trends and methodologies of java programming, and even the use of other projects that are not of common use from who isnÂ’t a mailing list open-source haunter, but are used in commercial projects.+ </portlets>
-In the next article we will see in a more technical and detailed way the portletsÂ’ hierarchies, how they really work , which and how many are the base kinds, and how to deploy in a container portlet.+ <portlets>
-'''Bibliography and references'''+ <entry parent="HelloJSP"/>
-Jetspeed : Enterprise Information Portal: http://jakarta.apache.org/jetspeed+ <layout>
-Turbine : Web Application framework: http://jakarta.apache.org/turbine+ <property name="row" value="1"/>
-Velocity: Java Template Engine: http://jakarta.apache.org/velocity+ <property name="column" value="0"/>
-Cocoon: http://xml.apache.org/cocoon+ </layout>
-jsr168: http://www.jcp.org/en/jsr/detail?id=168+ </portlets>
- #Rss (Rich Site Summary) McLaughlin, “Java e Xml“, ed. O’Reilly 2001+ </portlets>
- #Cocoon McLaughlin, “Java e Xml“, ed. OÂ’Reilly 2001+  
- #http://jakarta.apache.org/turbine/turbine-2.3/model2+1.html+'''Conclusions'''
- #Velocity e WebMacro Hunter-Crawford, “Java Servlet Programming II ed.“, ed. O’Reilly 2001+In this first artiche we have seen what Jetspeed and the portlets provide:
-----+ *The possibility for the users to create their own portals, according to the language and the device used
-'''MassimilianoDessì''' (desmax74[*](\)@(/)[*]yahoo[*](/).(\)[*]it)+ *The connection with Content Management System thanks to the fact that the portlets are components, an example of Jetspeed with a cms: http://www.anglonaweb.it/.
-He has started working at the Sistemi Informativi S.p.A (IBM) (http://www.sistinf.it) as a Java programmer. Since 2001 he has been working at the Atlantis S.p.A. (http://www.gruppoatlantis.com/), where he uses agile methodologies as the eXtreme programming (Xp), he develops enterprise Web-based applications with J2EE technology, like portals and content management system for territorial promotion.+  
-In his free time he co- operates to the open-source Jakarta –Jetspeed project, and he takes care of the Italian version of Jetspeed. He studies electronic engineering at the University of Cagliari.+The complete list of the sites created with Jetspeed are available on:
  +http://jakarta.apache.org/jetspeed/site/usejetspeed.html
  +  
  +For the developer, as Jetspeed is a portal framework that exposes information, applications and services, it is possibile to find in it the application of the lates innovations, of standards, trends and methodologies of java programming, and even the use of other projects that are not of common use from who isnÂ’t a mailing list open-source haunter, but are used in commercial projects.
  +  
  +In the next article we will see in a more technical and detailed way the portletsÂ’ hierarchies, how they really work , which and how many are the base kinds, and how to deploy in a container portlet.
  +  
  +'''Bibliography and references'''
  +Jetspeed : Enterprise Information Portal: http://jakarta.apache.org/jetspeed
  +Turbine : Web Application framework: http://jakarta.apache.org/turbine
  +Velocity: Java Template Engine: http://jakarta.apache.org/velocity
  +Cocoon: http://xml.apache.org/cocoon
  +jsr168: http://www.jcp.org/en/jsr/detail?id=168
  + #Rss (Rich Site Summary) McLaughlin, “Java e Xml“, ed. OÂ’Reilly 2001
  + #Cocoon McLaughlin, “Java e Xml“, ed. OÂ’Reilly 2001
  + #http://jakarta.apache.org/turbine/turbine-2.3/model2+1.html
  + #Velocity e WebMacro Hunter-Crawford, “Java Servlet Programming II ed.“, ed. OÂ’Reilly 2001
  +----
  +'''MassimilianoDessì''' (desmax74[*](\)@(/)[*]yahoo[*](/).(\)[*]it)
  +He has started working at the Sistemi Informativi S.p.A (IBM) (http://www.sistinf.it) as a Java programmer. Since 2001 he has been working at the Atlantis S.p.A. (http://www.gruppoatlantis.com/), where he uses agile methodologies as the eXtreme programming (Xp), he develops enterprise Web-based applications with J2EE technology, like portals and content management system for territorial promotion.
  +In his free time he co- operates to the open-source Jakarta –Jetspeed project, and he takes care of the Italian version of Jetspeed. He studies electronic engineering at the University of Cagliari.


VeryQuickWiki Version 2.7.8 | Admin
Copyright © 2003-2006 Java User Group Sardegna Onlus. - Java, the Java Coffee Cup Logo and the Duke Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.