Date post: | 14-Dec-2015 |
Category: |
Documents |
Upload: | prosper-willis |
View: | 217 times |
Download: | 1 times |
© 2008 IBM
Session ID: D09Session Title: WebSphere Portal WebSphere Portal Programming Model: New Portal 6.1 Services Programming Model: New Portal 6.1 Services and Portal Frameworks Supportand Portal Frameworks Support
Speaker(s): Marshall Lamb, WebSphere Portal Development
WebSphere Portal Technical Conference U.S. 2008
STORY TITLE
WebSphere Portal Technical Conference U.S. 200822
Agenda Overview WebSphere Portal programming model
New APIs and SPIs in WebSphere Portal V6.0.1
New APIs and SPIs in WebSphere Portal V6.1
New portlet standards in WebSphere Portal V6.1
Portlet frameworks
Summary
© 2008 IBM
Overview WebSphere Portal Programming Model
STORY TITLE
WebSphere Portal Technical Conference U.S. 200844
Different programming model layers
Business users Goal: develop and customize applications at runtime without
programming knowledge Via graphical tools (WebSphere Portal, WebSphere Portlet Factory)
Power users Goal: develop applications without J2EE knowledge Via tools (WebSphere Portlet Factory, Rational Application
Developer) and scripting interfaces (Javascript, Dojo, REST services)
Application developers Goal: develop applications with programming knowledge Via Java and web service / REST APIs Tools: Rational Application Developer, WebSphere Portlet Factory
ISVs Goal: customize and enhance the current portal or workplace
product with new functionality and services using deep programming knowledge
Via Java SPIs (System Programming Interfaces)
STORY TITLE
WebSphere Portal Technical Conference U.S. 200855
Different programming model artifacts
Themes and Skins
JSP tag libraries Static HTML
Microformat tags WCM pages
WCM content components Composite applications
UI and business components Portlets
JSR 168 and JSR 286 Portlet API Portlet services
Giving portlets access to WebSphere Portal extensions Eclipse extension points
Customizing existing portal behavior (e.g. Theme extension points)
STORY TITLE
WebSphere Portal Technical Conference U.S. 200866
Programming model dimensions
Connection Fidelity
Interaction Fidelity
Desktop
Laptop
Appliances(e.g. PDA)
Adaptation Fidelity
Programming Model
Mostly NeverAlways
Sometimes
Request&
Response
None
“Reactive”
© 2008 IBM
New APIs / SPIs in WebSphere Portal V6.0.1
Lots of new stuff in 6.0.1!
STORY TITLE
WebSphere Portal Technical Conference U.S. 200888
Portlet Object Model (SPI) Allows you read-access all data around portlets
Portlet deployment descriptor information Different layers of portlet preferences Access to portlet definition, portlet entity, portlet window
• Unique name, object ID
Available for themes and skins and standard portlets
STORY TITLE
WebSphere Portal Technical Conference U.S. 200899
Portlet Object Model – Details
base settings defined by the portlet application developer
customization settings defined by the portal administrator
Shared setting defined by the administrator
personalization settings defined by the portal user
navigational state representing the current view state of the portlet
per portlet session state
CONFIG
aggregation of
portlet preferences
EDIT
EDIT_DEFAULTS
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081010
Portlet Object Model – Sample Get unique names of portlets on page from within a theme
// lookup service
Context ctx = new InitialContext();
PortletModelHome home = (PortletModelHome) ctx.lookup("portal:service/model/PortletModel");
if (home != null) {
PortletModel portletModel = home.getPortletModelProvider().getPortletModel(aPage, aRequest, aResponse);
}
// use service
for ( // all nodes of the current page ) {
if (node instanceof LayoutControl) {
PortletWindow portletWindow = portletModel.getPortletWindow((LayoutControl) node);
PortletDefinition portletDef = portletModel.getPortletDefinition(portletWindow);
String portletUniqueName = portletDef.getObjectID().getUniqueName();
}
}
Lookup the service home, can be done once
Get a service instance,needs to be done per request
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081111
Resource Addressability Framework (SPI) Allows you to address arbitrary content via the portal framework
using URIs Allows to keep current navigational state encoded in the portal
URL• Converts URIs to URLs
Allows custom code to define their own content schemes and participate in the „view“ resolution
Address pieces of content (PoCs) via URIs URI guarantees a unique ID for the content The URI that identifies the content is typically not the same as
the URL that displays this content• There may be many URLs that display the same URI• The URL can be used as the URI if there is only one possible content location
Follows the REST patterns Example
Create your own link format to documents in a custom content repository that you what to serve via portal
STORY TITLE
12WebSphere Portal Technical Conference U.S. 20081212
Resource Addressability Framework (SPI)
WebSphere Portal is a platform that provides an aggregated (HTML) view to pieces of content (POC)
Classically the POCs are only accessible through the aggregation layer
HTML
Piece of Content:WCM Item
Piece of Content:Document
Aggregation Layer:the „view“
Piece of Content:User Information
...Portal
STORY TITLE
13WebSphere Portal Technical Conference U.S. 20081313
Resource Addressability Framework (SPI)
The POC framework adds an entry point to WebSphere Portal that allows to access POCs in a variety of mime-types
HTML
Piece of Content:WCM Item
Piece of Content:Document
Aggregation Layer:the „view“
Piece of Content:User Information
Portal
POC Framework
ContentRepresentation
Customers can easily add their own POCs and leverage the POC Framework to serve them
ContentUpload
STORY TITLE
14WebSphere Portal Technical Conference U.S. 20081414
Demo
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081515
And many more ... Search menu tag lib (API)
Allows adding custom search scopes
Extension to the credential vault service (API) Support LTPA tokens
Puma profile now supports external users (SPI)
ATOM SAX API (SPI) Parser for ATOM feeds in Java
URL resource service (SPI) For managing URL resource definitions in the WAS config
repository
Login service (SPI) Enabling to write your own login portlet
© 2008 IBM
New APIs and SPIs in WebSphere Portal V6.1
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081717
Web 2.0 support Allow portlets to connect to external data sources
Issue: currently requests are restrict to the same domain because of security reasons
Solution: access via provided AJAX proxy
Client-side aggregation Re-render only changed
portlets
Client-side JavaScript library Convenience JavaScript APIs simplifying portlet development Client-side equivalent to the Java Portlet API Coordinates AJAX calls with the portal Consistent behavior after a full page refresh Navigational state changes Implemented using DOJO
Domain A
AJ AXProxy
Server
Brow ser
H TM L Page
H TTP G ETD om ain A
AJAXPortle t
H TTP G ETD om ain B
Trusted sites
Domain B
Server
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081818
Web 2.0 support For more information see sessions
D02Rapidly Construct Rich, Web 2.0 style applications for IBM WebSphere Portal using IBM WebSphere Portlet Factory 6.1
D03Web 2.0, AJAX and REST for WebSphere Portal Version 6.1
STORY TITLE
WebSphere Portal Technical Conference U.S. 20081919
Click to Action for everyone (API)
Enable the Click-to-Action paradigm for standards portlets JSR 168 and JSR 286 portlets
Based on Web 2.0 semantic tagging technology Thus can be used by any HTML markup (themes and WCM content
too) On the browser, scan markup looking for C2A source and target
tags, matching sources to targets. generate C2A menus “on-demand”, when the C2A source menu
icon is clicked.→ more efficient than old C2A
Integrated with server-side property broker programming model JSR 168 target actions and JSR 286 processing events will be
automatically available in C2A (only if they have a single input of type String)
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082020
Click to Action for everyone Current limitations
No complex data types in C2A sources, parameter value must be a string
C2A targets must be on the same page as the source • No cross-page communication
No broadcast functionality No support for automated actions without menu
Sample:
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082121
<div class="c2a:source someotherclass">
<span class="c2a:typename" style=“display:none“>http://www.ibm.com/xmlns/prod/datatype#email822</span>
<p>some content that is not relevant to C2A
<b class="c2a:value">[email protected]</b>
</p>
<p class="c2a:display" style="display:none;">
<b><c>This is a sample C2A source</c></b><br>
</p>
</div>
Click to Action for everyone – Example Source tagging:
Target tagging:<FORM class="c2a:target” action=“/myapp/do.something”>
<span class="c2a:typename"> http://www.ibm.com/xmlns/prod/datatype#email822</span>
<p class="c2a:action-label">Show inbox</p>
Email: <input type=“text” class="c2a:paramname“></input>
<input type=“submit”>
</FORM>
D efine a source C 2A m enu anchor
P rovide the eventtype nam e as Q N am e
Provide the event payload
Provide a header textfor the C 2A popup m enu
D efine a target C 2A
P rovide the eventtype nam e as Q N am e
Provide an entryfor the C 2A popup m enufor triggering th is action
Param eternam e usedfor transm itting the event payload
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082222
Portal Write Model (SPI) Complements the previously introduced Portal Models
Enables you to create your own administration portlets, e.g. Eclipse-based
In V 6.1 limited to: Content model + navigation model, Layout model, Portlet model
Available as Java SPIs and REST services Based on a workspace concept
Apply all your modifications and then do a final commit Supported operations
Page, label, and ContentURL administration • Creating/updating/deleting pages, labels, and ContentURLs • Modifying page, label, and ContentURL properties
Page layout modifications • Adding/deleting/moving portlets (e.g. drag'n'drop) and layout containers
Portlet model administration• Creating/updating/deleting portlet entities and definitions
Property modifications, e.g modifying unique names, meta data
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082323
Step-up Authentication (SPI) Support/recognize multiple levels of authentication strength
(‘proof of identity’), e.g. user claim → no proof, cookie username/password → default proof username/password + X.509 Certificate → strong proof
Progressive disclosure of portal resource Portal resources (pages / portlets) can be flagged to require a specific
authentication strength User gets challenged when (s)he actually accesses the resource
APIs com.ibm.portal.auth.stepup
• Allows you to define your own authentication levels com.ibm.portal.portletservice.rememberme.RememberMeCookieServ
ice • Allows standard portlets to check for the rememberMe cookie
STORY TITLE
24WebSphere Portal Technical Conference U.S. 20082424
Demo
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082727
Login/logout/session validation Filters
Allows you to plug into the login/logout/session validation flow of portal
Use the filter pattern Allows you to provide your own filters
Provided filters Explicit login by user name and password
(com.ibm.portal.auth.ExplicitLoginFilter) Implicit login (e.g. when being already authenticated by WAS)
(com.ibm.portal.auth.ImplicitLoginFilter) Explicit logout (com.ibm.portal.auth.ExplicitLogoutFilter) Implicit logout (e.g. after a session timeout)
(com.ibm.portal.auth.ImplicitLogoutFilter) Session Timeout (com.ibm.portal.auth.SessionTimeoutFilter) Session Validation (com.ibm.portal.auth.SessionValidationFilter)
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082828
Any many more ...
Property broker SPI Allows you to write your own wiring portlet
Extend current portlet and portal models to support JSR 286 (SPI)
SiteManagment command SPI Allows you to write your own Site Management application, e.g.
Eclipse-based
Encoding and decoding of friendly URLs (SPI) Allows you to create friendly URLs and decode friendly URLs Integrates into the resource addressability framework
Resource Addressability Data Source API (SPI) Allows you to serve your resource addressable data via the default
content handler servlet• E.g. just define a URI format and add your own handler for serving the
URI via the content handler servlet
STORY TITLE
WebSphere Portal Technical Conference U.S. 20082929
Any many more ... LocalizedContext API
Allows you to get the preferred locales and titles / descriptions of Localized resources
Enhanced PUMA SPI e.g. ability to do queries for anonymous users with
runUnrestricted
Multipart Stream Processing SPI Helper classes to easily process multipart Mime streams and
Form data
Enhanced portal resource serving SPI ResourceURLAccessor now allows you to address resources with
a relative path and theme specific Use case: package Javascript library (e.g. Dojo) in a specific
theme directory and allow the portlet to create links to this lib• Removes the need to package the lib with each portlet
© 2008 IBM
New portlet standards in WebSphere Portal V6.1
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083131
New Portlet Standards in WebSphere Portal V6.1
JSR 286 – Java Portlet Specification V2.0 IBM is leading this JSR, all major Java technology portal
(commercial and open source) vendors represented in the EG Reference implementation will be provided at Apache Pluto 2.0 TCK will be available for free
• Will extend the JSR 168 TCK
Final since June 2008 Web Services for Remote Portlets (WSRP) V2.0
Standard protocol for accessing portlets as web service Defined at OASIS, chaired by IBM Final since May 2008
Common goals Enable coordination between portlets and allow building
composite applications based on portlet components Serving resources Allow for a better user experience using AJAX patterns
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083232
New Portlet Standards in WebSphere Portal V6.1 Major new features
Events• Loosely coupled paradigm
− Portlet declares events it wants to receive and events it wants to emit• The portal / portlet container will act as broker and distribute the
events accordingly• Allows wiring of portlets at runtime• Works across specific portlet frameworks (e.g. JSF and Spring)• Maps to the JSR 168 Property Broker extension
available in WebSphere Portal• Works via WSRP 2.0, so now you can have
distributed events! Public render parameters
• Allow parameters to be shared across portlets• Not restricted to the portlet application• May be even across pages• Example
− The zip code of a selected city allowing different portlets (map, tourist information, weather) to display information for this city
• Works via WSRP 2.0, so now you can have distributed context sharing!
You can send events from JSR 168 to JSR 286 portlets and vice versa.
Can be scoped to a page and thus act like a page context
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083333
New Portlet Standards in WebSphere Portal V6.1
Major new features Resource serving
• JSR 168: direct serving via the portal / portlet container− Via using encodeURL(resourceURL)− No portlet runtime context available
• Additional in JSR 286: resource serving via the portlet− Portlet context available (render params, portlet mode, window state,
preferences, ...)− No state changes on render params, portlet mode, window state or shared
state− Protected via the portal access control− Enables more AJAX use cases with Portlets
More information: Session Number: D04
Leveraging new Portal Standards WSRP 2.0 and JSR 286 with WebSphere Portal 6.1
You can changePortletPreferences andPortlet-scoped sessiondata
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083434
Demo
© 2008 IBM
Portlet frameworks
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083636
Portlet frameworks supported by IBM Tooling Java Server Faces (JSF) 1.1
JavaEE standard Rational Application Developer (RAD) V7.0 / 7.5
Struts 1.1 IBM Struts Portlet Framework
• Supports JSR 168 property broker extension Rational Application Developer (RAD) V7.0 / 7.5
Struts 1.2 / 1.3 Rational Application Developer (RAD) V7.5
Portlet Factory Build portlets based on models and builders instead of fine-
grained UI components
STORY TITLE
WebSphere Portal Technical Conference U.S. 20083737
Portlet frameworks running on WebSphere Portal
JSF V 1.2
Apache JSF Portlet Bridge JSR 301 RI: Standard JSF-Portlet Bridge covering
• JSR 168 – JSF 1.2• JSR 286 – JSF 1.2• RI part of Apache JSF Bridge
Note: requires Java EE 5.0 which is part of WebSphere Application Server 7.0
Apache Struts Portlet Bridge
V 1.x & V 2.0 Spring MVC 2.0
Adobe Flex
Apache Wicket
And many more ...
The portlet bridge of the framework just needs to comply to either JSR 168 or 286
STORY TITLE
38WebSphere Portal Technical Conference U.S. 20083838
Demo
© 2008 IBM
Summary
STORY TITLE
WebSphere Portal Technical Conference U.S. 20084040
Summary With WebSphere Portal V6.0.1 and V6.1 many new and often
requested features have been added as public APIs
WebSphere Portal V6.1 supports the new portlet standards JSR 286 and WSRP 2.0
Many different portlet frameworks run on-top of WebSphere Portal Choose the one that fits best your problem or skill sets
Continue to provide us with feedback on what your are missing so that we can continue making WebSphere Portal the most powerful and extensible portal platform
STORY TITLE
41WebSphere Portal Technical Conference U.S. 20084141
Additional Information and Resources
WebSphere Portal – IBM Site
http://www-3.ibm.com/software/genservers/portal/
WebSphere Portal Business Solutions Catalog:
http://catalog.lotus.com/wps/portal/portal
Websphere Portal Developer’s Zone
http://www-106.ibm.com/developerworks/websphere/zones/portal/
Product Documentation and WebSphere Portal Wiki
http://www-3.ibm.com/software/genservers/portal/library/
http://www-10.lotus.com/ldd/portalwiki.nsf
Education
http://www-3.ibm.com/software/genservers/portal/education/
WebSphere Portal 6.0 DemoNet
http://docs.dfw.ibm.com/wp6/?DDSPageRequest=/
STORY TITLE
WebSphere Portal Technical Conference U.S. 20084242
Additional Information and Resources JSR 286 information
Specification: http://jcp.org/en/jsr/detail?id=286 Reference Implementation: http://portals.apache.org/pluto/ Article on Developerworks:
http://www.ibm.com/developerworks/websphere/library/techarticles/0803_hepper/0803_hepper.html
WSRP V2.0 http://docs.oasis-open.org/wsrp/v2/wsrp-2.0-spec.html
WAS 6.1 WSRP producer http://catalog.lotus.com/portal?NavCode=1WP1001BA
Resource Addressability Framework http://www.ibm.com/developerworks/websphere/library/
techarticles/0710_koeth/0710_koeth.html#download
STORY TITLE
43WebSphere Portal Technical Conference U.S. 20084343
Session ID: D09
Session: WebSphere Portal Programming Model: New Portal 6.1 Services and Portal Frameworks Support
Presenter(s): Marshall Lamb, WebSphere Portal Development
Please take a few minutes to fill out the session survey.
Thank you
WebSphere Portal Technical Conference U.S. 2008
STORY TITLE
44WebSphere Portal Technical Conference U.S. 20084444
© IBM Corporation 2008 All Rights Reserved.
The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.
References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.
All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer.
IBM, the IBM logo, WebSphere, Lotus, Lotus Notes, Domino, Quickplace, Sametime, Workplace and Quickr are trademarks of International Business Machines Corporation in the United States, other countries, or both.
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both.
Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
All references to Renovations Inc. refer to a fictitious company and are used for illustration purposes only.