Best Practices for Applying AJAX to JSR 168 Portlets
January 12, 2007 | Leave a Comment
At Plymouth State University we are just beginning to look into JSR 168 portlets for our institution’s portal. This technology for creating channels is just becoming available with the impending release of Luminis IV in Q1 of this year. In doing my initial research on JSR 168, I turned up this interesting article from Greg Ziebold and Marina Sum written in September of 2006.
From the summary/overview:
A year ago, the article Asynchronous Rendering of Portlet Content With AJAX Technology demonstrated how to apply Asynchronous JavaScript and XML (AJAX) to portlets. Since then, AJAX has become increasingly popular in the software arena and many new AJAX technologies have emerged. Examples are JavaScript libraries and toolkits, such as the Dojo Toolkit, the Yahoo! UI Library, the Google Web Toolkit, Script.aculo.us, and DHTML Goodies. In addition, new standards bodies like Open AJAX and the Dojo Foundation are key players.
In light of the many developments in the past year and the host of feedback on how to use AJAX in portlets, this article describes several helpful tips and practices on how best to exploit AJAX in portlets that comply with the Java Specification Request (JSR) 168: Portlet Specification.
The article refers to an updated version of the sample, AJAX Portlet Invoice Viewer, from the original article. You can download the binary Web archive (WAR) file. In the near future, this sample will reside in the Open Source Portlet Repository on java.net.
As we are new to JSR 168 and definitely interested in incorporating Ajax with most any channel we create, this seems like a useful guide.
Tags: AJAX, channel, dojo, greg ziebold, jsr 168, jsr168, luminis, luminis IV, Marina Sum, portal, portlet, xml, yahoo ui
New Improved Bsuite! Or Not…
July 24, 2006 | 5 Comments
Casey released bsuite b2v6 today. This is a fantastic plugin for WordPress which does a lot of heavy lifting and can help to better leverage the long tail of your content. Frankly I wouldn’t run WordPress without it. This bug fix release clears up a lot of little nagging problems, including some substantial performance improvements. Best of all is the “Top Movers” section that will show you stories that are performing better than they usually do. This is an indicator of stories that have somehow become hot.
OK, now for the downside, at least from my perspective… Over the last pile of months running Bsuite I had rolled a few of my own modifications and enhancements. I’ve started rolling these back in, it’s a work in progress. You can grab my slightly modified version with this functionality added back in, I’m affectionately calling it bsuite b2v6z. The ‘z’ on the end indicates you are running my tweaked version. As Casey rolls out new versions I’ll try to stay on top of things and release this derivative work out to the happy masses! With each release, hopefully I can continue to get Casey to roll in some of my changes.
For anyone wondering why I’d bother doing this, well…
1) I’m not the kind of guy who runs anything “baseline”
2) Casey can be slow about new releases so I might as well do it then worry about convincing him later
3) It is GPL’d so I can!
Tags: bsuite, casey bisson, plugin, wordpress
Debugging/Fixing Sun Calendar Permissions
July 5, 2006 | 2 Comments
As part of the Luminis Platform, we run the Sun Java Enterprise System Calendar Server, previously called SunOne Calendar Server, previously known as iPlanet Calendar Server. As expected, this calendar server has a fairly robust (read complicated) permission system. Invariably, users make setting changes that cause undesirable behavior with their calendar. A common symptom would be that suddenly no other users can find their calendar when searching for them and in turn can't subscribe to the calendar, even if they have the privileges to do that.
So, over the years I've developed a semi-effective process for debugging the calendar permissions from the backend.
- SSH to your calendar server
cdto the calendar server/bindirectory (for Luminis this is$CP_ROOT/products/SUNWics5/cal/bin)- use the cscal utility to query the trouble user. ex
./cscal -v list jpseudo - in the out put you get you'll see a line called 'aces' it will look something like:
CODE:
-
aces=@@o^c^WDEIC^g;@@o^a^RSF^g;someuser^a^rsf^g;someuser^c^^g;anotheruser^a^rsf^g;anotheruser^c^wd^g;someoneelse^a^rsf^g;someoneelse^c^^g;@^a^^g;@^c^^g;someuser^p^r^g;anotheruser^p^r^g;someoneelse^p^r^g
-
- This is the access control list or ACL, it is obviously very hard to read. I use EditPlus to do a regular expression find (;) and replace (;\n) on the permissions to clean it up a bit.
- Now it reads:
@@o^c^WDEIC^g;
@@o^a^RSF^g;
someuser^a^rsf^g;
someuser^c^^g;
anotheruser^a^rsf^g;
anotheruser^c^wd^g;
someoneelse^a^rsf^g;
someoneelse^c^^g;
@^a^^g;
@^c^^g;
someuser^p^r^g;
anotheruser^p^r^g;
someoneelse^p^r^g - Now for a brief aside explaining these individual permissions called access control entries or ACEs...
The ACE consists of four distinct elements separated by a caret (^):- Who - the user or type of user the permission applies to. Valid entries are:
- username
- @@o - all owners
- @@p - primary owner
- @@n - not an owner
- @ - anyone
- What - the thing being accessed. Valid entries here are:
- c - calendar component, events or tasks
- p - calendar properties such as name description owners and so forth
- a - entire calendar including components and properties
- How - what actions are permitted. Valid entries are:
- r - read
- w - write
- d - delete
- s - schedule or invite
- f - free/busy or availability
- e - accept or decline invitations
- i - send invites for events on the calendar
- c - cancel
- Grant - this determines whether or not the ACE is a grant (g) or deny (d)
Now that we have a clue what these ACEs actually represent, how do we go about finding a problem?
- Who - the user or type of user the permission applies to. Valid entries are:
- If the issue is about a single user experiencing trouble with the jpseudo's calendar, then extract only the ACEs that apply to that user or apply globally. If instead it is a generalized issue, eliminate all user specific ACEs and only look at global ones. Either way you should be able to drastically reduce the number of rules you are looking at.
- If this issue is the example originally given where the user's calendar cannot be seen by any users, then we are looking for a permission like @^p^r^g; or something similar. If the problem is not readily apparent, it is often useful to compare another user who you know works against this problem user.
- Now it is time to modify the permissions. More specific entries should be ordered first, this allows them to override entries that come later.
- Once you have the entries ordered properly, the command you need to execute will look something like this:
CODE:
-
./cscal -a "@@o^c^WDEIC^g;@@o^a^RSF^g;someuser^a^rsf^g;someuser^c^^g;anotheruser^a^rsf^g;anotheruser^c^wd^g;someoneelse^a^rsf^g;someoneelse^c^^g;@^a^^g;@^c^^g;someuser^p^r^g;anotheruser^p^r^g;someoneelse^p^r^g;@^p^r^g" modify jpseudo
-
- Hopefully the change you made succeeds and life is good, if not, rinse and repeat!
Tags: ACE, aces, ACL, acls, application administration, calendar, iPlanet Calendar Server, java, luminis, luminis platform, Sun, Sun Java Enterprise System Calendar Server, sungard, sungard higher education, SunOne Calendar Server, system administration
Google Spreadsheets Sneak Peek
June 6, 2006 | 3 Comments

I just signed up for the trial version of Google Spreadsheets. At this point the screenshots look pretty cool, I'm sure the interface will be similarly sweet. With Writely purchased and calendar launched, I'm basically free of Microsoft Office all together these days.
Tags: calendar, google, google calendar, google spreadsheet, microsoft, spreadsheet, writely
Great Color Picker
June 6, 2006 | 33 Comments
When doing web development it is often helpful to use a color wheel or some sort of color picker when coming up with color schemes. In general I'm satisfied with the desktop application Pixie in my normal web development toolkit. However, that tool does not present a color wheel or allow you to pick multiple colors from out of nowhere.
Enter 4096 Color Wheel. As far as I can tell, this is the ultimate web based application for playing with colors. It gives you colors in hex, like you'd want, but also presents "web safe" and "web smart" alternatives for any color you may pick.
Tags: 4096 color wheel, color, color picker, color wheel, pixie, web, web application, web development, web safe, web smart
Zimbra
June 4, 2006 | 4 Comments
For a long time I've been touting Zimbra as the greatest available web-based mail client. I've never gotten around to mentioning it here, but I figure it's time. In fact, Zimbra is more than just a web-based mail client, they call it a collaboration suite. Basically this means it has email, calendar, and contact management. It's all Ajax based, open source, extendable, and provides a free version.
In addition to the fantastic interface, it is also a complete email server with industry level SPAM protection built-in. The email server supports IMAP and POP so users can continue using whatever desktop application they may prefer as an alternative to the web-based application.
With my general unhappiness with Outlook and most other web-based email solutions, I really wish I could use Zimbra. Go check out the hosted demo.
Tags: AJAX, collaboration, email, web 2.0, webmail, zimbra
A Useful Attribute, Clear Left
September 14, 2005 | 1 Comment
Often I write articles that I want an image on the left with text around it. This is as simple as putting align="left" in the img tag. However, sometimes you want a portion of the text to not be wrapped, or you have only a small amount of text and don't want your technorati tags or next story to get wrapped up next to the image.
In either of these cases, simply use: <br clear="left" />
Another quick tip for <div style="height:100px"></div> to make some empty space in a post. An exaple place where I needed this was in writing quizzes.
Update 5/8/2006: Jon tells me I'm a big jerk for not additionally mentioning you can use "right" or "both" in place of "left" to clear other things you may want to do.
Tags: clear left, html, wordpress, xhtml
