Date post: | 03-Jan-2016 |
Category: |
Documents |
Upload: | priscilla-roman |
View: | 30 times |
Download: | 3 times |
RESTful Portal Content: Delivering Content for uPortal without
writing Portlets or IChannels
Susan Bramhall Yale University
JA-SIG Winter 2006
JA-SIG Winter 2006
How this presentation came to be
Why are other uPortal sites writing so many Portlets?
What is wrong with the approach we take at Yale?
http://www.ja-sig.org/wiki/display/JCON/06winter+Compelling+uses+of+CWebProxy+and+CGenericXSLT
JA-SIG Winter 2006
Our Goal: Channels and Portlets should
be… Easy to provide Managed by application or data
owner not portal team Technology independent Easily ported to new environments Re-usable for many uses
JA-SIG Winter 2006
Essentially More RESTful
Simple HTTPS and XML where possible simplifies component implementation reduces the complexity of connector semantics
Layered improves the effectiveness of performance tuning
Cacheable Improved performance
Improved scalability of portal Less complexity in the portal
JA-SIG Winter 2006
90% of Content via XML or XHTML
CGenericXSLT RSS Sakai Site Summary Upcoming Events Recent E-mail Computing Clusters Library Books Out
Uses parameters to focus the channel
CAbstractXslt Could return, for
example, user layout or channel registry
CWebProxy Directory Search Network Registration
JA-SIG Winter 2006
Example:Dynamic Information From Sakai
JA-SIG Winter 2006
How did that happen?
1. XML retrieved from http request via Proxy CAS returns…
JA-SIG Winter 2006
How did that happen?
2. Simple XSL formats for channel to display
JA-SIG Winter 2006
Who did that?
Jen did. Java programmer on Yale’s Sakai Project Familiar with Sakai internals She reused existing Sakai logic and APIs She did it in less than a day No new Portlet
JA-SIG Winter 2006
“That was easy!”
All the work is on the Sakai side All the understanding is on the Sakai side The channel is part of our Sakai Project
JA-SIG Winter 2006
OK, Authentication can be a challenge More Info on the CAS wiki
For portlets see… http://www.ja-sig.org/wiki/display/PLT/Portlets+using+Proxy+CAS
YaleInfoClasses*V2
Sakai summary channel
CAS
https requestwith PST
XML result
Validate TicketProxy Service Ticket
JA-SIG Winter 2006
RESTful Benefits
Layering Separation of
responsibilities Easier to tune
performance Allows more scalable
portal
YaleInfo
Classes*V2Sakai
summary channel
JA-SIG Winter 2006
Recent E-Mails
Uses Proxy CAS * 2 Links to message in IMP Not a full e-mail client in uPortal
portal
Recent E-mail
Channelservlet
IMAPServer
IMAPProtocol
HTTPSRequest
XMLresponse
JA-SIG Winter 2006
Computing Cluster Status
JA-SIG Winter 2006
ITS Systems Messages
Simple RSS feed from existing system “more…” links to full information
JA-SIG Winter 2006
Upcoming Events
Upcoming Eventschannel
HomegrownCalendar
API
Yale Public Event CalendarSunCalendarServer
YaleInfo Portal
Native
http
Xml
Request -
response
JA-SIG Winter 2006
Speaking of caching
We did modify the CGenericXSLT to cache XML documents
The cache layer refreshes the cache on configurable intervals in the background
User request never waits on xml retrieval after the first time
JA-SIG Winter 2006
YaleInfo looks like this…
Cache ofXML
Documents
Channels are rendered from cached documents
DocumentCacherthread Top Links
1/day
Clusters6/hr
Recent emailNot cached
Events 1/hr
JA-SIG Winter 2006
Caching Package
edu.yale.its.portal.utils.cache Retrieves XML using commons httpclient Saves DOM in memory One (yes, one) thread runs in background
refreshing documents on scheduled intervals
CGenericXSLT modified to get XML from caching package
Channel Publishing Document modified to get cache parameters
JA-SIG Winter 2006
Channel Publishing Document?
Defines the steps for publishing a channel based on a channel type. See…
webpages/
media/
org/
jasig/
portal
channels/
CGenericXSLT/
CGenericXSLT.cpd
Channel Types Drive Channel Manager
JA-SIG Winter 2006
Channel Type includes CPD
CPD is the XML configuration file
See more about creating a new channel type on the JA-SIG wiki under the name “Register Channel Type”
http://www.ja-sig.org/wiki/x/lzQ
JA-SIG Winter 2006
More Tips and Tricks
Focus A channel can focus itself using parameter
uP_root=me Or "unfocus“ by using uP_root=root
Modification to pass IP address
Summary of library books out
[baseActionUrl]?uP_root=me
Detail of library books out
[baseActionUrl]?uP_root=root
JA-SIG Winter 2006
Return from focus to normal
JA-SIG Winter 2006
CSqlQuery vs. sql2xml service
CSqlQuery Nifty new IChannel Executes a SQL query Returns results in XML uPortal dependent
sql2xml Servlet runs in a
separate JVM Configured with data
source and SQL query Accepts parameters on
request Executes SQL query
and returns XML Portal and application
agnostic
JA-SIG Winter 2006
Incorporated Applications
CWebProxy – 2 more Yale examples Network Registration Directory Lookup
Web Proxy Portlet
http://www.ja-sig.org/wiki/display/PLT/WebProxy
Network Registration
User perspective = a captive application Technical view = Completely independent
JA-SIG Winter 2006
Network Registration
STRUTS application Written for Portal but also runs stand alone Entirely separate web server environment We modified uPortal to allow IP address to be
passed Person attribute passing is built in
PortalNetwork
RegistrationWeb Proxy
JA-SIG Winter 2006
Yale Directory Lookup
JA-SIG Winter 2006
Yale Directory Look Up
Separate JSP application Uses LDAP interface and
produces xhtml Separately hosted Captive to Portal from user
perspective
JA-SIG Winter 2006
CWebProxy has neat features Passing person attributes Changing source XHTML
and or XSL on the fly
See tutorial on CWebProxy home page http://www.mun.ca/portal/software/cw/
JA-SIG Winter 2006
I am still wondering
Is this the best way to provide content?
What do you think?