Skip navigation
All Places > Alfresco Content Services (ECM) > Blog > 2012 > July

Share Extras moving to GitHub

Posted by wabson Employee Jul 20, 2012
Cross-posted to the Share Extras Development Group today.

Share Extras will be moving to a new platform in the next few weeks. The new platform will be GitHub, with the version control obviously provided by Git instead of Subversion, which is used at present.

There are many reasons for moving to Git from Subversion. I've spent a while reviewing the project issue list this week and it's clear to me that there are many enhancement requests which may not be appropriate to make in the main Extras code base, or are simply not achievable within the project due to people's time constraints.

Git will enable the wider community to fork individual any add-on as they feel the need to. I hope this will lead to more contributions back to the main project and foster greater collaboration (and perhaps a bit of competition?) with others.

Specifically, there is also the need to improve on the localisation of add-ons in a consistent manner, and there are some great tools available for doing that based on Git.

Whilst I had originally intended to simply migrate to a new Git VCS within Google Code, the frequent downtime and increasingly poor feature set and user interface when compared to other providers has led me to conclude that it is not a viable platform for future development.

In contrast, GitHub supports the notion of projects within an overall organisation much better (I have already registered Share Extras as an organisation) and has some great options for improving our documentation using cool standards such as Markdown.

I propose to migrate the current trunk codeline (and perhaps the 1.0 branch should time allow) at the end of August. There are several things that committers need to do before then, in order to help make it a success, such as ensuring that they have a file in all their projects (this will become the main source of documentation, rather than the wiki), and helping to close down any issues that remain open on Google Code (issues will not be migrated over).

As always, if you have any feedback, please let me know. Otherwise I will be in touch with the main committers separately in the coming week or so.
A while ago I wrote about the newly-extensible Document Preview component in Alfresco Share and how you can use it to customize the out-of-the-box viewers and add your own custom implementations.

I mentioned at the end of that post that there were some new examples of custom viewers coming in Share Extras and I'm excited that we're now ready to release them on the site.

Peter Löfgren had the great idea of using the pdf.js project to perform direct rendering of document content in the web browser using HTML5. I'd already started work on some simpler examples of custom viewers, and on refining the Flash audio/video players that Share Extras previously provided for Alfresco 3.3/3.4.

The result is what we're calling the Media Viewers add-on. This bundles up a total of six viewer implementations designed to show different ways of implementing custom document views, both with and without Flash.

  • PdfJs displays documents, presentations and any other file capable of being  transformed to PDF in-line in the web browser using the excellent pdf.js viewer, which uses the power of HTML5 to remove Share's Flash dependency for  document viewing.

    The viewer supports a number of features not directly supported by the Flash document previewer, such as a sidebar with thumbnail, outline and search views,  bookmarking of individual pages of a document, and will remember the page  number and zoom level of previous documents that you have viewed.

    PdfJs Viewer

  • FLVPlayer and MP3Player display compatible audio and video files respectively, within the web-browser using the  open source FLV Player and MP3 Player media players by neolao. Based on the  content's MIME type, the updated component automatically chooses the appropriate  previewer to use.

    While similar to the Flash players provided by Share out-of-the-box, these  implementations allow advanced customization of the player via configuration and if FFmpeg is installed, will fire up a transformation to allow viewing  of non-H264/FLV video and non-MP3 audio. The user is informed when conversion is in progress and the screen automatically updates when the content can be viewed.

  • Embed uses an in-line iFrame to embed the content itself directly inside the web page. It is suitable for use with content types that can be viewed  directly within the web browser such as plain text and PDF, with the Chrome or Acrobat plugins installed. Again, this can be used to avoid the use of  the Flash previewer for some clients.

  • Prettify allows formatted code, mark-up and other supported text formats to be displayed in directly in the document and uses the google-code-prettify project to provide an in-line browser-based view with syntax highlighting.

    Prettify Viewer

  • WebODF is an EXPERIMENTAL viewer which uses the AGPL-licensed WebODF project to display ODF content directly in the web browser.

    WebODF cannot be distributed with the add-in itself, so in order to use it you must also download the latest JAR file from the supporting share-webodf project and install it in the same way as the main media-viewers JAR file.

What's most exciting is that we're building on top of some great projects such as google-code-prettify, WebODF and pdf.js, that are evolving at a fast pace and changing the way that documents are viewed in a browser environment.

There is plenty more information including download links on the main Media Viewers project page on Share Extras. Please try it out, let us know what you think and help us to improve this collection.

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

In order to minimize the potential for XSS attacks the target server is specified via the 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.

Filter Blog

By date: By tag: