1 / 26

Simplifying the Development of Custom Channels

Simplifying the Development of Custom Channels. Dr. Pete Boysen Iowa State University. Problem: Need Portfolios Now!. Campus-wide initiative to develop e-Portfolios starting 2003 Four departments needed very different interfaces and data Attended OSPI v2.0 Duluth design meeting

heaton
Télécharger la présentation

Simplifying the Development of Custom Channels

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simplifying the Development of Custom Channels Dr. Pete Boysen Iowa State University

  2. Problem: Need Portfolios Now! • Campus-wide initiative to develop e-Portfolios starting 2003 • Four departments needed very different interfaces and data • Attended OSPI v2.0 Duluth design meeting • Needed uPortal channels by Jan 2004 JA-SIG Conference -Denver 2004

  3. Requirements • Multiple Personal and Class Portfolios • Close integration with uPortal (Authorization, LDAP etc.) • Integration with Open AFS for file storage • Non-portal user access (employers) • Rapid prototyping and deployment • Eventual CD Delivery JA-SIG Conference -Denver 2004

  4. Result: Themes • Not uPortal themes! • Definition: a collection of resources (xslt, Java, images, documents etc.) to implement an application in channel • Single channel class (CThemes) supports multiple channel instances • Main Themes provide primary interface • Sub-themes support other themes • Distributed as cars JA-SIG Conference -Denver 2004

  5. Structure of Talk • Demonstrationpersonal portfolios, class portfolios, departmental portfolios, forum, briefcase • HellouP example • Theme Development Process • Features JA-SIG Conference -Denver 2004

  6. Demonstration • uPortal 2.1.4 example • Nested-Divs theme • Unadorned Focus mode Go! JA-SIG Conference -Denver 2004

  7. Theme Design • Four major components – • View - visual layout of the channel • Rendering – specific view output for particular set of data • Datasource – Java class that converts raw data to XML document for view • Action – Java Class that implements functions requested by user JA-SIG Conference -Denver 2004

  8. HellouP View Rendering 1 – view mode Rendering 2 – edit mode JA-SIG Conference -Denver 2004

  9. Caching Strategies • Each view maintains renderings unless data change • XSLT stylesheets are cached at system level • Input documents are cached for each user unless changed during session • User cache flushes LRU documents JA-SIG Conference -Denver 2004

  10. File System Configurations single multiple username helloup forums pboysen root 123 Pete’s Forum greeting.xml topic1 forum .users.xml categories.xml repository .access.xml forum.xml biography.xml JA-SIG Conference -Denver 2004 shared.xml

  11. HellouP Datasource • greeting.xml<greeting> Welcome to <strong>uPortal</strong>! This is the default greeting. </greeting> • Uses FileDataSource • Caches document unless file modification date changes JA-SIG Conference -Denver 2004

  12. HellouP Rendering greetings.xml parameters.xml <parameters> <entry name=“” value=“”/> </parameters> (from last rendering) home.xsl XHTML JA-SIG Conference -Denver 2004

  13. home.xsl - heading <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:theme="http://www.iastate.edu/edu.iastate.ait.theme.Theme" xmlns:usercontext="http://www.iastate.edu/edu.iastate.ait.theme.UserContext" version="1.0"> <xsl:output method="html"/> <xsl:variable name="action" select="$parameters/entry[@name = 'action']/."/> <xsl:template match="/"> <theme:form base="/"> <theme:toolbar> <theme:tool icon="ShareFolder16.gif" condition="$authorization.grant" title="Share"> <theme:urlarg name="action" value="call"/> <theme:urlarg name="view" value="home"/> <theme:urlarg name="theme" value="authorization"/> </theme:tool> </theme:toolbar> <theme:space height="5"/> JA-SIG Conference -Denver 2004

  14. home.xsl - body <table align="center" width="50%" border="0"> <xsl:if test="$helloup.edit and not($action = 'edit')"> <tr> <td align="right"> <theme:button action="edit" value="Edit"/> </td> </tr> </xsl:if> <tr> <td class="uportal-background-highlight" style="border:1px solid black"> <xsl:choose> <xsl:when test="$helloup.edit and $action = 'edit'"> <theme:textarea name="greeting" rows="10" format="html"> <xsl:copy-of select="$greeting/greeting/node()"/> </theme:textarea> <theme:space height="10"/> <theme:button action="save" value="Save"/> <theme:space/> <theme:button action="cancel" value="Cancel"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="$greeting/greeting/node()"/> </xsl:otherwise> </xsl:choose> </td> </tr> </table> </theme:form> JA-SIG Conference -Denver 2004

  15. HellouP - action User clicks on save… Sends parameter action=“save” (and other parameters) to action definition:<action name="save"> <write path="{$path}greeting.xml"> <transform xsl="xsl/savegreeting.xsl"> <file name="greeting" path="{$path}greeting.xml"/> </transform> </write> </action> JA-SIG Conference -Denver 2004

  16. savegreeting.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="time" select="usercontext:getTime($userContext)" xmlns:usercontext="http://www.iastate.edu/edu.iastate.ait.theme.UserContext"/> <xsl:variable name="text" select="$parameters/entry[@name = 'greeting']/."/> <xsl:template match="/"> <xsl:apply-templates select="$greeting/greeting"/> </xsl:template> <xsl:template match="greeting"> <greeting modified="{$time}" name="{$userName}"> <xsl:value-of select="tidy:parseString(string($text))" disable-output-escaping="yes" xmlns:tidy="http://www.iastate.edu/edu.iastate.ait.theme.TidyHelper"/> </greeting> </xsl:template> </xsl:stylesheet> JA-SIG Conference -Denver 2004

  17. The Glue – theme.xml <?xml version="1.0"?> <theme name="helloup" debug="stylesheets,parameters"> <description>A demonstration of a theme allowing selected users to change greeting. </description> <home> <render> <transform xsl="xsl/home.xsl"> <file name="greeting" path="{$path}greeting.xml"/> </transform> </render> <action name="save"> <write path="{$path}greeting.xml"> <transform xsl="xsl/savegreeting.xsl"> <file name="greeting" path="{$path}greeting.xml"/> </transform> </write> </action> </home> </theme> JA-SIG Conference -Denver 2004

  18. Authorization • Authorization theme – views to manage authorization for a project • Stores authorizations in .users.xml of project • Each theme defines its own activities and roles (activity groups) • Permits access by both uPortal users and external users JA-SIG Conference -Denver 2004

  19. authorization.xml <?xml version="1.0"?> <authorization name="helloup"> <activities> <activity name="helloup.edit">Let's the user edit the greeting</activity> <include theme="authorization"/> </activities> <roles> <owner> <grant activity="helloup.edit"/> <grant activity="authorization.grant"/> </owner> <role name="collaborator"> <grant activity="helloup.edit"/> </role> </roles> </authorization> JA-SIG Conference -Denver 2004

  20. Datasources JA-SIG Conference -Denver 2004

  21. Actions JA-SIG Conference -Denver 2004

  22. <theme:taglib> • Common components to generate standard XHTML • Supports mail, HTML editor, upload and download of files • Runtime translation • Examples – theme:form, theme:toolbar, theme:radiolist, theme:mail JA-SIG Conference -Denver 2004

  23. Debugging Options • Selectively log stylesheets, parameters and documents by theme • Error interface to capture browser and system information of user, stack trace and current state • Property locations for bugs and debugging • Global switch to turn off for production JA-SIG Conference -Denver 2004

  24. Features - 1 • File management based on HyperContext1.3 • Provides authenticated access for non-uPortal users • Provides automated bug reporting • Permits themes built from themes • Many themes require no Java Programming • Supports custom Java Datasources and Actions JA-SIG Conference -Denver 2004

  25. Features - 2 • Aggressive caching of stylesheets, documents and output • Java CD viewer planned • Built-in uploading/downloading of files • Integrated with JavaMail • Icon Library (Sun) • HTML Editing JA-SIG Conference -Denver 2004

  26. Availability • Available by August, 2004 • Contact: pboysen@iastate.edu JA-SIG Conference -Denver 2004

More Related