ShortenedUrlService for Sakai

The Sakai 2 Technical Coordination Committee has discussed and voted, and the results are in. The ShortenedUrlService for Sakai is now in trunk and will appear in Sakai 2.8.

What is this, you ask? It’s a URL shortening service for Sakai!

Is this link too long for you?
http://sakai.edu.au/portal/site/~a8ad22cb-837b-44b8-bad1-f92c68d1f204/page/3bd7ba1b-50a6-4f02-bd86-350c3c06bcbe?toolstate-4a350307-2777-4deb-afe8-61fefe8fd440=%3Fwicket%3AbookmarkablePage%3D%3Aorg.sakaiproject.profile2.tool.pages.ViewProfile%26id%3Dbeeb7465-78bd-48ba-9316-60b7c5f3b2e5

How about this instead:
http://sakai.edu.au/x/LxjkTt

Mmm tiny.

But it’s more than just a URL shortening service: As an institution that uses Sakai, you can choose how the URLs are shortened via a setting in sakai.properties. So then when tools give you short URLs, they are the way you want them!

And it comes with both the URL shortening scheme you see above (RandomisedUrlService) and an implementation that uses bit.ly!

It’s also super easy to create a new URL shortening implementation: Just write a class that contains one simple method String shorten(String fullUrl), wire it up via Spring and set the name of your new implementation in sakai.properties.

And there’s more! There is also an entity provider that allows you to shorten URLs by making a GET request, so you can also use the URL shortener via Javascript:

/direct/url/shorten?path=URL

You can read more about the configuration, how to write your own implementation and how to leverage it in your app by checking out Confluence:
http://confluence.sakaiproject.org/display/SHRTURL/Home

Advertisements

2 thoughts on “ShortenedUrlService for Sakai

  1. It’s to do with the use of the UUIDs so that every piece of content is unique. This specific URL has a bunch of extra content (also containing UUIDs) encoded into the URL, so it’s extra long!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s