Portals and Portlets - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

Portals and Portlets

Description:

Portlet contributes information to portal, but has no control of how/if ... Singleton model, one instance created to handle all requests. Portlet only fragment ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 20
Provided by: seanm62
Category:

less

Transcript and Presenter's Notes

Title: Portals and Portlets


1
Portals and Portlets
  • Overview for Phoenix Java User Group

2
What is a Portal?
  • Many Definitions

3
Google Definition
4
Is this a Portal?
5
Java Portals
  • Framework to run Portlets (portlet container)
  • May include
  • User Personalization
  • Control Look and Feel
  • Security
  • More
  • No Java Standard for Portal Framework

6
Portlets
  • Similar to Servlet Model
  • Standardized API, JSR 168
  • Additional Concepts
  • Window State
  • Mode
  • Preferences
  • Fragment of Screen

7
Portal Screen Shot
8
Window State
  • Similar to Windows Applications
  • States
  • Normal
  • Maximized
  • Minimized
  • Custom vendor extension point

9
Portlet Mode
  • View normal mode
  • Help standard way to get to help
  • Edit where user customizes portlet
  • Custom vendor extension point in 168 Spec
  • Results in different method call on Portlet

10
Portlet Control
11
Portlet vs. Servlet
  • Similar lifecycle create, initialize, handle
    requests, destroy.
  • Singleton model, one instance created to handle
    all requests.
  • Portlet only fragment
  • Cannot forward
  • Cannot change content type
  • PortletPreferences
  • Two phase response, Action and Render

12
Portlet vs. Servlet Objects
  • PortletContext
  • PortletConfig
  • PortletSession
  • PortletResponse
  • Action/Render
  • PortletRequest
  • Action/Render
  • ServletContext
  • ServletConfig
  • HttpSession
  • HttpServletResponse
  • HttpServletRequest

13
Action and Render Phases
  • Action
  • Used when portlet is changing its backend state
    (Updating database, changing session data, etc).
  • Only runs when an action url is clicked.
  • Action phase is processed first, allowing backend
    changes to complete before rendering begins.
  • Render
  • Always called on portlet.
  • Builds markup that will be returned by response.

14
Hidden Screen shot
15
Portlet Deployment
  • Deployed as a war file
  • Includes portlets, servlets, jsps, etc.
  • Still has a web.xml
  • Adds new portlet.xml
  • Portlet specific configuration

16
portlet.xml
17
GenericPortlet
  • Similar purpose as HttpServlet
  • Usually extend GenericPortlet when creating a
    portlet
  • Example methods

18
Examples
  • Time to look at real code and portlets

19
Pros and Cons
  • Pros
  • Portal container provided services
  • Consistent user interface
  • Build in user customization
  • Integrate different back end apps
  • Cons
  • Slight paradigm shift. Not a normal website
  • Big and heavy
  • Immature technology
  • URL encoding
Write a Comment
User Comments (0)
About PowerShow.com