Portlets

3,291 views

Published on

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,291
On SlideShare
0
From Embeds
0
Number of Embeds
973
Actions
Shares
0
Downloads
132
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide















  • Portlets

    1. 1. Portlets: An Introduction Part 1 of 2 Monday, March 16, 2009
    2. 2. Why Portlets? • Java standard • Highly pluggable • Portlet modes • Self-contained/decoupled Monday, March 16, 2009
    3. 3. What is a Portlet? • Self contained component on Page/Portal • Introduced to offer user oriented components • Email • Weather • Feeds • and more! Monday, March 16, 2009
    4. 4. Portlet Specifics • Servlet runs in a ServletContainer(tomcat/ jboss/websphere...) • Portlet runs in a PortletContainer(eXo, Pluto, Liferay...) • Portlet api build on top of the Servlet API • doGet, doPost are mapped to HTTP GET/ POST Monday, March 16, 2009
    5. 5. Portlet/Servlet differences • Servlet -> Page, Portlet -> HTML Fragment • Portlets are not URL addressable • web.xml describes webapplication • portlet.xml describes the portlets Monday, March 16, 2009
    6. 6. Portlet Functionality • Portlet Modes Portlet States • • Edit Normal • • View Maximised • • Help Minimised • Monday, March 16, 2009
    7. 7. Traditional portlet pattern • User oriented • Behave like mini windows within a portal/ web page • Can be created/positioned/destroyed by the front-end user • Think iGoogle Monday, March 16, 2009
    8. 8. Unify portlet pattern • Developer oriented • Used to deploy functionality • No concept of windows • Usually consist of the following modes • edit (configuration) • view (display) • xml (view data source) Monday, March 16, 2009
    9. 9. The standard portlet api lacks • Clear MVC framework • Data binding • Hence Spring portlets Monday, March 16, 2009
    10. 10. MVC (Model View Controller) • Architectural pattern Controller • • Separate concerns Respond to user events • • Model represents domain Delegates to business tier • • View renders the Passes model to the view • view, with help of ViewHelpers Monday, March 16, 2009
    11. 11. Spring es ic rv se eb W • Application Framework • Pojo Based with xml configuration Hibe rna • Promotes decoupling of components te • Reduces the amount of code to write ts • ru Offers plenty of 3rd party integration t S Monday, March 16, 2009
    12. 12. Spring Portlet MVC • Basically Spring MVC • Data Binding • Validation • Lots of plumbing/boilerplate code • JSF Portlets, Struts Portlets also offer MVC ontop of Portlet API Monday, March 16, 2009
    13. 13. Best Practices • Portlets are a VIEW ONLY TECHNOLOGY • Only user interaction/rendering logic • Decouple business logic and business services • Program to interfaces • Use spring dependency injection Monday, March 16, 2009
    14. 14. Architecting Portlets • N-Tiered approach • Presentation tier(Portlet) • Business tier (Services/Domain model) • Integration tier (hibernate/jdbc , SOAP/ rest) Monday, March 16, 2009
    15. 15. Deployment • Portlets are packaged in a Web application • Deploying to Tomcat • Copy to $vyre_home/webapps • Create context in $tomcat/conf/catalina/ localhost • web.xml needs webapprootkey Monday, March 16, 2009

    ×