of 35
8/2/2019 Web 20 AJAX and REST in WebSphere
1/35
8/2/2019 Web 20 AJAX and REST in WebSphere
2/35
ID506: Web 2.0, AJAX, and REST in IBM WebSphere Portal
Thomas Schaeck, STSM
Lead Architect Quickr and WebSphere Portal Web 2.0
Stephan Hesmer
WebSphere Portal Web 2.0 Architect and Lead Developer
8/2/2019 Web 20 AJAX and REST in WebSphere
3/35
What is Web 2.0, AJAX and REST ?
8/2/2019 Web 20 AJAX and REST in WebSphere
4/35
What is Web 2.0 ?
A term coined by Tim OReilly(seehttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html )
Increasingly used for next generationWorld Wide Web Applications and Services
Web 2.0 has many aspects:
Business Models that survived and have promise for the future
Approaches such as services instead of products, the Web as a platform, ...
Concepts such as folksonomies, syndication, participation, reputation, ....
Technologies such as AJAX, REST, Tags, Microformats, ...And many others ...
http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.htmlhttp://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html8/2/2019 Web 20 AJAX and REST in WebSphere
5/35
How do Web 2.0 Sites differ from Web 1.0 Sites ?
Strict Web 1.0 site
Web Master runs web site, usersconsume
Few content editors
Web site provides content andapplications for users
View-only markup
Only human usersAccumulates relatively small amounts
of information and content
Fixed categories / Taxonomy
Unidirectional
Modern Web 2.0 site
Users collectively contribute to the web site,they dont just consume
Every user is a content editor and rater
Web site provides content, applications, andcollective contributions of all users
Semantically tagged markup
Humans and applications as usersAccumulates huge amounts of information
and content
FlexibleTagging / Folksonomy
Bi-directional
WebSite
WebSite
DataData
App
App
App
App
8/2/2019 Web 20 AJAX and REST in WebSphere
6/35
Observations
Web 2.0 consists of social and technical aspects
The social aspects of Web 2.0 are much more fundamentalthan the technologies
Web 2.0 Sites can derive huge value from their usercommunity if they achieve critical mass Some Web 2.0 companies have achieved extremely highmarket captialization (Google ($109,66 bn) bought YouTube
for $1,65 bn)
The Web 2.0 Site itself often only provides the infrastructureand guidelines for user participation
The community then adds value to the site, e.g. by writingarticles, posting videos, sharing bookmarks, etc
Typically, these Web 2.0 sites have APIs for use bydevelopers of mashup applications acting as multipliers
Web 2.0 user interfaces typically apply the AJAX technologyin order to achieve more responsive UIs
8/2/2019 Web 20 AJAX and REST in WebSphere
7/35
What is AJAX ?
AJAX is the acronym forAsynchronous JavaScript andXML
The purpose is to create more dynamic and responsive web pages
It is also about building web clients in a Service Oriented Architecturethat can connect to any kind of server: J2EE, PHP, ASP.Net, Ruby on Rails, etc.
AJAX involves existing technology & standards: JavaScript and XML
Pattern: Page view displayed in a web browser retrieves data or markup fragmentsfrom a service and refreshes just a part of the page
AJAX is non-trivial, it requires deep and broad skills in web development ...... but the benefits to be gained can be huge compared to classic web applications
AJAX enables major improvements in responsiveness and performance of web applications,e.g. used at Yahoo! Mail, Google Maps, live.com, and others
AJAX is NOThype it is very real and very useful for highly interactive applications
8/2/2019 Web 20 AJAX and REST in WebSphere
8/35
AJAX compared to classic Web UIs
Browser Server Browser Server
service
In the typical web application,each request causes a completerefresh of the browser page
An Ajax application begins the same way.
After the initial page loads, Javascript coderetrieves additional data in the background
and updates only specific sections of thepage
Ajax forces you to think about discrete services.
It may drive requirements for new services from your IT department
8/2/2019 Web 20 AJAX and REST in WebSphere
9/35
What is REST ?
REST is the acronym for Representational State Transfer
It is the architectural model on which the World Wide Web is based
Principles of REST
Resource centric approach
All relevant resources are addressable via URIs
Uniform access via HTTP GET, POST, PUT, DELETE
Content type negotiation allows retrieving alternative representations from same URI
REST style services
are easy to access from code running in web browsers, any other client or servers very popular in the context of AJAX
can take full advantage of the WWW caching infrastructure can serve multiple representations of the same resource
More info: http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
8/2/2019 Web 20 AJAX and REST in WebSphere
10/35
Web 2.0 Concepts that are interesting for enterprise use
Self-establishing Communitiescollaborating around topics of common business interest
Support User Contribution, treat users as co-authors and leverages their skills better
Accumulation of user knowledge to make apps smarter the more people use them
Enable users to add value by adding meta data, e.g. rate, tag, bookmark, comment
Allow users toTake Control and let them make applications most useful to them
Separate User Interface from Servicesto make services re-usable
Fine grained access to data supporting mashups
Mashupscombining existing services into new, useful applications joining information
Situational Development of applications through line of business can help makebusinesses more agile
AJAXto enable rich, interactive, highly responsive Web UI
Use ofSemantic Tags and Microformats to enable dynamic augmentation withcontextual menus or information
8/2/2019 Web 20 AJAX and REST in WebSphere
11/35
8/2/2019 Web 20 AJAX and REST in WebSphere
12/35
8/2/2019 Web 20 AJAX and REST in WebSphere
13/35
8/2/2019 Web 20 AJAX and REST in WebSphere
14/35
WebSphere Portal An Example
w3 portal for all IBM employees
> 300,000 users
Portlets provide essential information
Highly personalized - displays the rightinfo to the right users at the right time
End-user customizable - users cancreate custom pages
Has become a key tool for every IBMer
Major productivity gainTargeted info delivery to users
Users can easily find the apps they need
8/2/2019 Web 20 AJAX and REST in WebSphere
15/35
Openness
Portals are the way to provide governed business mashupscombining public information, enterprise apps and data
Critical enabler:
Standards based access to integration and innovation
Thin Clients
Mobile Clients
Rich Clients
role-based
composite applications
in context
process-driven
Security-Rich Composite applicationor view, that assembles and delivers
services in the form of portletsin the context of a business process
8/2/2019 Web 20 AJAX and REST in WebSphere
16/35
Web 2.0 / AJAX / REST in WP and related Products - Today
WP 6 allows User Contribution to portal sites through both WCM and PDM
WP 6 enables Situational Development through Composite ApplicationTemplates and through Lotus Designer / Portlet Factory / Forms Designer
WP 6 allows users Taking Control of their pages and choose content (if allowedby admin)
Custom AJAX Portlets can be written today to run on WebSphere Portal,e.g. using the Dojo framework and widgets or the AJAX support in RAD
WP 6.0 exploits AJAXfor context menus, search menu, and some admin portlets
WebSphere Portlet Factory can generate AJAX Portlets with incremental update
and autocomplete
IBM is strongly engaged in Dojo (see http://dojotoolkit.org/ ) as majorcontributor
http://dojotoolkit.org/http://dojotoolkit.org/8/2/2019 Web 20 AJAX and REST in WebSphere
17/35
8/2/2019 Web 20 AJAX and REST in WebSphere
18/35
New Web 2.0 Work under development for WebSphere Portal
REST Servicesto open up portal for mashup applications services for server persistence,
portlet settings and user profile access to simplify Web 2.0 application development
AJAX Portlet Programming Model Extensionsbased on Dojo+IBM Extensions
Client Side Aggregation and Customization using REST Servicesfor better UX andimproved performance
AJAX Client Side Feed Consumption to enable highly efficient integration of information
through feeds (Atom and RSS)
Semantic Tagsto allow smart markup to enable value add by portal, e.g. dynamic menus
Client Side C2A/Property Broker and Drag & Dropbased on Semantic Tags integratedwith server side property broker and C2A support to enable cross-portlet interaction locally inthe browser as well as with server side code
Sample AJAX Portlets with source showcasing the new capabilities to demonstrate and givesamples to customers for how to exploit all the above
Integration, Aggregation and Customization ofGoogle Gadgets
8/2/2019 Web 20 AJAX and REST in WebSphere
19/35
8/2/2019 Web 20 AJAX and REST in WebSphere
20/35
8/2/2019 Web 20 AJAX and REST in WebSphere
21/35
8/2/2019 Web 20 AJAX and REST in WebSphere
22/35
Web 2.0 Fragment Programming Model
Web 2.0 Fragment
Semantic Tags
Dojo Widget Markup
JavaScript Functions
REST Calls to Portal ServicesUser Profile AccessSettings AccessPersistence Service Access
REST Calls to other Services,e.g. other WPLC servicesWeather Info, News, Sports, CRM, HR, Servicesetc
8/2/2019 Web 20 AJAX and REST in WebSphere
23/35
8/2/2019 Web 20 AJAX and REST in WebSphere
24/35
8/2/2019 Web 20 AJAX and REST in WebSphere
25/35
Semantic Tags, Context Menus and Drag&Drop
Conference Participants
...IBMST Thomas SchaeckST 5 Technology Park Dr 555-5555ST
Westford, MAST
GroupST LocationsST
Click to dial
Extensible set of tag types such as person, address, phone number, document, ... is
used to mark content elements with types (semantic tagging)
Behaviours like e.g. context menus, annotations, highlighting, drag & drop, etc can beapplied to everything that is semantically tagged
D&D D&D
8/2/2019 Web 20 AJAX and REST in WebSphere
26/35
8/2/2019 Web 20 AJAX and REST in WebSphere
27/35
8/2/2019 Web 20 AJAX and REST in WebSphere
28/35
AJAX RSS/Atom Feed Consumption directly from Origin
8/2/2019 Web 20 AJAX and REST in WebSphere
29/35
Google Gadget Integration A Gadget integrated in
8/2/2019 Web 20 AJAX and REST in WebSphere
30/35
Google Gadget Integration A Gadget integrated inWebSphere Portal as a portlet
Google Gadget Integration Selecting a Gadget to
8/2/2019 Web 20 AJAX and REST in WebSphere
31/35
Google Gadget Integration Selecting a Gadget tointegrate into WebSphere Portal as a portlet
8/2/2019 Web 20 AJAX and REST in WebSphere
32/35
8/2/2019 Web 20 AJAX and REST in WebSphere
33/35
AJAX Portlets using Dojo
8/2/2019 Web 20 AJAX and REST in WebSphere
34/35
Web 2.0 Portal Architecture
WebSphere Portal Foundation
AJAX Feed
Consumer
Connections(Activities,Blue Pages,
Social Bookmarks,Blogs)
AJAX Fragment
Consumer
AJAX Programming Model Extensions(Dojo Framework & Widgets + AJAX.0 + REST accessor JS functions + Semantic Tags + Client Side Click-2-Action)
REST style Portal Services(Persistence, User Profiles, Portlet Settings, Navigation, Pages, etc)
Quickr(Wikis, Blogs,
Lists, Doc Libs,Discussions)
Connections
Portlets
MyPlaces
Portlet
FeedService
HTML+Dojo+JSFragments
(from J2EE,.NET,PHP,
HTTP or other Server)
WebSphere Application Server
Classic
JSR 168Portlets
AJAX enabled
JSR 168Portlets
WSRP
Consumer
WSRPService
8/2/2019 Web 20 AJAX and REST in WebSphere
35/35
Conclusion
Web 2.0 is important for the enterprise
AJAX and REST are important technologies related to Web 2.0
IBM uses Web 2.0 concepts and technologies sucessfully in its intranet
WebSphere Portal already today in WP 6 provides Web 2.0 capabilitiesand leverages Web 2.0 technologies such as AJAX
Future releases of WebSphere Portal will add more Web 2.0 featuresand expand use of AJAX and REST
WebSphere Portal will integrate with Lotus Connections and
Lotus Quickr