ddraper

Introducing the Alfresco Activities browser extensions

Blog Post created by ddraper on Jul 2, 2012

These extensions are no longer available for use with Alfresco

 

Several weeks ago there was some discussion within Alfresco about how often we fall back to e-mail for discussions rather than using our own Discussions feature available within Share. It seemed that the reason for this ultimately came down to the need to repeatedly check your dashboard for updates whereas participants of an e-mail are passively notified of new exchanges.

There have been discussions around adding the capability for Alfresco to be interacted with via e-mail but that is an issue for the Alfresco Project Management team and would be something for a future release.  It occurred to me that e-mail also requires constant checking for new data and that it is only background polling and notifications provided by our e-mail clients that make it appear otherwise.  I regularly use Googlemail in Chrome and use the “Google Mail Checker” extension to ensure that I don’t spend all day hitting the “Refresh” button in my browser.... it seemed that an equivalent approach could be used to receive updates on Alfresco activities.

I spent a few hours writing a Chrome extension that I have been using to keep abreast of new content on our internal Alfresco installation. I later ported this to Firefox and following a number of feature requests from other users at Alfresco have created a Google Code project for both extensions.

The extension provides the same data as the “Everyone else’s activities” feed from the “My Activities” user dashlet (in fact it uses the same WebScripts to obtain the data) and provide the following features:

    • Desktop notifications of unacknowledged activities
    • A badged toolbar button showing the number of unacknowledged activities
    • A pop-up activity stream to allow quick access to updated content (accessed via the toolbar button)


The extension means that I don’t need to keep checking Alfresco for updates to documents, sites, discussions, etc. that I’m interested in – this information is pushed directly to me.

 

Chrome extension

 

 

Implementation Details

The current code is completely functional and highly useful in its current state but it’s worth remembering that it’s only the result of a day’s effort.  There were many features that I considered adding but in the end stripped everything back to its core functionality which is notification and access.

 

Ideally it would allow custom filtering, configurable options for target servers and polling intervals, improved UI in the panel and on the button, etc… but these are all things for the future (should the extensions become popular).

 

It’s also necessary to be aware of the following requirements…

 

 

Target server specified via build.properties

In order to minimize the potential for XSS attacks the target server is specified via the build.properties file. This means that you need to checkout the project, set your own Alfresco server location and then build it if you want to use the extension (this is a fairly trivial exercise). The default server is the Alfresco Cloud so if you want to use the extensions against Alfresco Cloud then you can just download a pre-built version from the Google Code site.

 

 

Initial Sign-in to Share

The extension does not persist user credentials so it is always necessary to sign-in to Share the first time you open your browser. This has been done for security reasons as I wasn’t certain how safe it would be to store user credentials in browser local storage. This is the same approach as used by the Google Mail Checker extension so hopefully users will be comfortable with this.

 

 

Firefox needs the HTML Desktop Notifications add-on

Firefox doesn’t implement the desktop notification API out-of-the-box so it is necessary to install the HTML Desktop Notifications add-on if you want to receive notifications.

 

 

Try it out with the Cloud

The default target server is the Alfresco Cloud but at the moment the implementation is limited to only receive activity updates from your Home Network (so you won’t receive any notifications from other Networks into which you’ve been invited).

 

 

Contributions Wanted

If this is a project that you’re interested in then I’d definitely welcome your involvement as there’s lots of features that need to be added (if anyone out there is interested in writing an IE port then that would also be good!) – I’d also value any feedback you have on this project so please leave comments and suggestions below.

Attachments

Outcomes