+ All Categories
Home > Documents > Building Portable Portlets that work in Sakai and uPortal

Building Portable Portlets that work in Sakai and uPortal

Date post: 14-Mar-2016
Category:
Upload: theodore-estes
View: 27 times
Download: 0 times
Share this document with a friend
Description:
Building Portable Portlets that work in Sakai and uPortal. Charles Severance JA-Sig Meeting Denver, CO - June 25, 2007. Sakai in one Slide. Collaboration, Teaching, and Learning FOSS - 100% free to use, modify and contribute Sakai is 3 years old Non-profit Sakai Foundation January 2006 - PowerPoint PPT Presentation
32
June 25, 2007 Building Portable Portlets that work in Sakai and uPortal Charles Severance JA-Sig Meeting Denver, CO - June 25, 2007
Transcript
Page 1: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Building Portable Portlets that work in Sakai and uPortal

Charles SeveranceJA-Sig Meeting

Denver, CO - June 25, 2007

Page 2: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai in one Slide....

• Collaboration, Teaching, and Learning• FOSS - 100% free to use, modify and contribute• Sakai is 3 years old• Non-profit Sakai Foundation January 2006• Financial support from 100+ Higher Education, 15

companies• Six paid staff members• 100+ people developing and testing Sakai releases

Overview Video: http://www.dr-chuck.com/media.php?id=64

Page 3: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Outline

• Sakai’s JSR-168 Implementation• Developing JSR-168 Portlets in Sakai• Current Sakai Portlets Under

Development• My ToDo list of Portlets• Dimensions of Portlet Portability• Open Issues / Discussion

Page 4: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai’s JSR-168 Implementation

Page 5: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai Implementation

• Preferences– Require Sakai site.upd permission to change– Uses Sakai’s preferences as persistence– Portlets can view Sakai preferences (sakai:)

• Edit button only appears for users with “site.upd”– In My Workspace - the person who owns the home

directory has site.upd• isUserInRole can access any Sakai

permission - site.upd, content.read, etc.

Page 6: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Developing Portlets in Sakai

Page 7: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Documentation

• https://source.sakaiproject.org/svn//reference/trunk/docs/architecture/sakai-168-portlet-tool.doc

• https://source.sakaiproject.org/svn//reference/trunk/docs/architecture/sakai-168-portlets.doc

Page 8: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

When to Use JSR-168 in Sakai

• When you don’t want an iFrame• When your persistence needs are easily

modeled by per-placement preferences• When your functionality may be reused

outside of Sakai

• It is OK to write a very Sakai-specific Portlet - just understand it is not portable

Page 9: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

JSR-168 Candidates

• iFrame• Web-Proxy• RSS Reader• WSRP Consumer• Thin Shim on top of Web Services• IMAP Client

• The portlet can be a lot of code and relatively complex - but it needs to be self-contained.

Page 10: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

portlet.xml and web.xml

• Exactly the same as Pluto 1.1 - allows binary war distribution and webapp drop-in

Page 11: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai Implementation

• Hot deploy of a war into webapps - just drop it in - auto registration

• Hot re-deploy of a war into running Sakai– Recompile– Watch re-registration - hit refresh

Page 12: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Tool Registration

• Sakai Tool registration is derived from the portlet.xml

• Sakai tool registration file in the war file– webapps/iframe-portlet/WEB-INF/sakai/

SakaiIFrame.xml• Sakai tool registration - in Sakai’s config area

– ${sakai.home}/portlets/iframe-portlet/SakaiIFrame.xml

– ${sakai.home}/portlets/SakaiIFrame.xml

Page 13: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

<?xml version="1.0"?><registration> <tool id="sakai.iframe.168" title="Web 168" description="For accessing an external

website within the site."> <configuration name="source" value="" /> <configuration name="height" value="600px" />

<category name="course" /> <category name="project" /> <category name="portfolio" /> <category name="myworkspace" />

<configuration name="functions.require" /> </tool></registration>

Page 14: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai.properties

You can control the behavior of portlet auto-registration by setting the following property in your sakai.properties. The key is whether tools are registered fully or stealthed.

# Configure Sakai's JSR-168 Portlet Support# Valid values are# all - Register all portlets, checking for tool registrations - all# portlets appear in Site Setup(i.e. none stealthed)# stealth - If there is no tool registration found register the tool # as stealth (i.e. does not show up in Site Setup)portlet.support=all

Page 15: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Summary of 168 in Sakai

• Designed to be trivial and simple out of the box - easier to configure than Pluto 1.1 itself

• Permissions and preferences - wired to be Sakai-like with no changes to portlet

• Drop in registration• Hot Deploy / Re-Deploy• Flexible and *optional* configuration to give

tool developer more control over Sakai tool registration - equivalent to Sakai TPP tools

Page 16: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Portlets In Development

Page 17: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Portable Portlets

• IMS Tool Interoperability 1.0• Sakai Launch Portlet• iFrame Portlet• JSR-168 Test Portlet

• https://source.sakaiproject.org/contrib/portlets

Page 18: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

TI Portlet

Page 19: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

LMS System

Sak

ai

Sakai APIs

Sam

igo,

Con

cept

Tuto

r, E

tc

SakaiIMS Proxy

SessionAnd Services

Bootstrap

IMS TI OutcomeRequest

ApplicationCode

1

2

34

5

6

7

Launch

Outcome

How IMS Tool Interoperability

Works

ExternalTool

SakaiBlackboard

WebCTAngel

Page 20: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sakai Launcher

Sakai Launch View

Page 21: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

How Tree/Gallery/Launch View Works

uPor

tal,

Plu

to, o

r Grid

Sph

ere

Sak

ai

Web

Svc

sC

haro

nP

orta

l

Sak

aiP

ortle

t

Login

ToolList

/portal/page/FF96

Page 22: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

SakaiSite.getToolsDom<sites> <portal>http://localhost:8080/portal</portal> <server>http://localhost:8080</server> <gallery>http://localhost:8080/gallery</gallery> <site> <title>My Workspace</title> <id>~csev</id> <url>http://localhost:8080/portal/worksite/~csev</url> <pages> <page> <id>af54f077-42d8-4922-80e3-59c158af2a9a</id> <title>Home</title> <url>http://localhost:8080/portal/page/af54f077-42d8-4922-80e3-59c158af2a9a</url> <tools> <tool> <id>b7b19ad1-9053-4826-00f0-3a964cd20f77</id> <title>Message of the Day</title> <toolid>sakai.motd</toolid> <url>http://localhost:8080/portal/tool/b7b19ad1-9053-4826-00f0-3a964cd20f77</url> </tool> <tool> <id>85971b6b-e74e-40eb-80cb-93058368813c</id> <title>My Workspace Information</title> <toolid>sakai.iframe.myworkspace</toolid> <url>http://localhost:8080/portal/tool/85971b6b-e74e-40eb-80cb-93058368813c</url> </tool> </tools> </page> </pages> </site></sites>

Page 23: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

iFrame Portlet

Page 24: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Page 25: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Portlets I Want to Write

Page 26: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Dream Portlets

• Portable Portlets– Proxy Portlet from uP3– Bridge Portlet– WSRP Consumer Portlet– Del.icio.us Portlet– Flikr Portlet

• Sakai Only Portlets– Site Hierarchy Tool– Complete iFrame Tool Replacement

Page 27: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

JSR-168 Portability Issues

Page 28: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Three levels of Portable

• Completely portable, self-contained war, runs in any compliant container

• Virtually unportable - war has significant framework dependencies - that are to be provided by the “portal”

• Sort-of portable - war has a set of clear pre-agreed dependencies to be provided by the portal

Page 29: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

“Perfect” Portability

• Differences with userinfo structures between portal implementations - Pluto 1.1 helps a little bit here (Gridsphere)

• Differences between isUserInRole– we need a convention here– portlet.xml and security mapping can help

• Preferences semantics and the edit button - we just have to write very clean code and check errors carefully

Page 30: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Sort-of Portable

• We create agreement between Sakai and uP3 that certain framework elements can be assumed between the systems.

• This makes a class of portlets that work in Sakai or uP3 but not other containers

• We should encourage other containers to join our “JSR-168” container consortium.

• The APIs should probably not be “Sakai” or uP3 branded APIs to enhance broad adoption.

Page 31: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Discussion Questions

Page 32: Building Portable Portlets that work in Sakai and uPortal

June 25, 2007

Questions• How can 168/286 CSS be improved? Can we speak

as one voice - can we add compatibility now?• Can we agree no a few isUserInRole strings between

uP3 and Sakai?• Do we want to create a zone of “Sort of Portablility”

between Sakai and uPortal where we agree that some bits of framework can be assumed between the systems?

• If so, how does that work? What API’s? How to solve shared/war issues? Who is interested in this?

• How do we develop/distribute shared portlets?


Recommended