Category: Alfresco

Alfresco open source content management

Ungrateful? Nah, just a publishing flub

I suppose it is inevitable that an author opens his book for the first time and immediately sees a problem. An obvious typo perhaps. Or maybe a sentence or topic that could have been made more clear. For me it was a little more jarring. Picture this scene: Wife and kids gathered around a box. Everybody doing a fake drumroll. Box opens, book opens, and…hey, wait a second. Where the hell is the acknowledgements page? You know, the one that thanks my wife and kids for putting up with me. Nowhere, that’s where! Maybe in some unorthodox location? Flip to the back. Nope. Nada.

So, if you own a copy of the book and it is missing the acknowledgements, consider it a collector’s item. Hopefully, Packt will fix this problem before too many more get shipped. To the reader it isn’t an issue, but to me it is a big deal because it is important to express my appreciation to the large group of folks that made this project come together. It certainly wasn’t a solo effort. So, until this gets fixed, here is the elusive acknowledgements section.

Acknowledgements

This book would not have been possible without Optaros. What an awesome place to work and what a stellar team to work with. Thanks to Bob Gett, Mavis Chin, and Marc Osofsky for providing an incredible level of senior leadership support. Dave Gynn, John Eckman, and Seth Gottlieb (we miss you, Seth!) also provided early inspiration and counsel. Noreen Vincent helped with marketing and promo. Optaros colleagues from around the world rolled up their sleeves and dug in with code and technical editing: Olivier Pépin, Brian Doyal, Xavier Naud, Jens Scheutter, Alan Fehr, and Michael Ruflin all gave incredible amounts of thorough and thoughtful feedback. The book is significantly better than it would have been because of your involvement.

Alfresco has been tremendously supportive of and excited about this project. Thanks to John Powell, John Newton, Matt Asay, Dr. Ian Howells, Paul Holmes-Higgin, Luis Sala, Phil Robinson, Michael Uzquiano, and Nancy Garrity for providing information and support and for building such a cool platform. Alfresco team members also pitched in with technical reviews: David Caruana, James Urquhart, Jean Barmash, and Peter Monks spent time reading chapters and providing feedback when they probably should have been cranking out 3.0 code.

David Barnes at Packt Publishing deserves thanks for suggesting the project and getting it on track. Rajashree Hamine and Nikhil Bangera have done a great job holding me to task and handling everything on the Packt side.

My ecmarchitect.com readers deserve a big thanks. Your helpful feedback and encouragement motivated me to keep posting. I look forward to continuing the conversation.

Finally, to Christy, Justin, and Caroline: Thank you for putting up with the late nights and lost weekends, providing so much encouragement, and being so understanding.

Alfresco 3.0 Enterprise is released

Open source CMS Alfresco has made its Enterprise 3.0 release available today. This is a significant release. It includes the new web application development framework, Surf, a new client for team collaboration called Share, support for multi-tenancy (separating the repository into multiple logical repositories for multiple “tenants”), and a draft CMIS implementation. I haven’t confirmed this personally yet, but at the recent community conference in Washington, D.C., CTO John Newton said that the release includes major performance improvements.

Alfresco Developer Guide released

I can finally answer the question, “When is the book coming out?”. The answer: Today. The Alfresco Developer Guide is now available for immediate shipping from Packt‘s web site.

There are a lot of people who made this thing happen including an awesome team of colleagues at Optaros, the entire Alfresco crew, the Packt team, and the support of my family. I’ve expressed my thanks individually in the acknowledgments and I hope I haven’t left anyone out.

I’m pretty excited how the book turned out. One of my roles as the Director of the ECM Practice is to get our consultants and our clients up to speed on open source CMS technology like Alfresco. I tried to organize the book in the same way I cover these topics in-person so the book flows just like it would if you and I were sitting in a room and you said, “I’ve been poking around with Alfresco on my own but now I’m ready to really start to do something with it.” I start with core fundamentals (content modeling, actions, behaviors, extractors) and gradually work “outward” through web client customizations, web scripts, advanced workflow, WCM, and security.

The book’s title has “developer guide” in it for a reason: It is more of a tutorial than it is an exhaustive reference. I figured with resources available like the wiki, the forums, and the source code, it was more important and helpful to step you through real-world examples.

My hope is that this book flattens the learning curve for everyone. And maybe in some way it will encourage companies that feel stuck in their currently legacy CMS to explore options.

Alfresco Surf 3.0 Code Camp: Catch a wave in NYC

Optaros and Alfresco are co-hosting a Surf 3.0 Code Camp in New York City on November 10th. The purpose of the camp is to get attendees up-and-running with Alfresco’s new web application development framework, Surf. The camp will run all day and into the evening.

I’ll be leading the camp by taking you through some prepared material and hands-on exercises. I’ll have a virtual machine prepared with everything on it so hopefully we won’t have to spend a lot of time getting everyone set up. The labs start with a simple Share dashlet and grow progressively more complex until you finally have a functioning Surf-based application that is making remote calls to the Alfresco repository.

After we work through the labs we’ll spend some time picking apart the Status and Bookmark components we recently built and then you’ll get a chance to talk about your own plans for Surf-based apps. This less formal “workshop” part of the day is your opportunity to start applying what you’ve learned and learn from and help others. Maybe you’ve got a great idea for a Surf component but you don’t know where to start. Or maybe you’ve got something already planned out but you’re looking for some help knocking out code.

My European friends will have to wait until the new year–I’ll be facilitating the Munich Code Camp in January. There are other partner-hosted Code Camps planned for Chicago, LA, and DC.  Exact dates for these camps are still being worked out–DC sounds like it may happen in December while the rest will be in January.

These events are free but you must sign up and space is extremely limited.

This just in: Nancy Garrity, Alfresco Community Czar, says she’ll give a Chumby to the best Surf component submitted from Camp attendees. We’ll have more details on that during Camp.

Importing ACP files with the UUID binding

A common way to get files and metadata into and out of the Alfresco repository is to use ACP (Alfresco Content Package) files. People that work with ACP files quickly find out that the out-of-the-box ACP import action will only import a given object once–it won’t update an object if it is already in the repository. By default, the import action tries to create a new object on every import. If a like-named object already exists the import will fail.

There’s a simple fix for this. The underlying API actually supports updating objects by matching on UUID. All you need to do is create your own version of the import action that uses the UUID_BINDING rather than the default.

Here are the steps:

  1. Find the org/alfresco/repo/action/executer/ImporterActionExecuter.java class in the source.
  2. Make a copy of the class. I called mine com.optaros.action.executer.UpdatingImportExecuter.java.
  3. Find the line of code that reads: this.importerService.importView(importHandler, new Location(importDest), null, null);
  4. Change it to: this.importerService.importView(importHandler, new Location(importDest), REPLACE_BINDING, null);
  5. Now add the definition for REPLACE_BINDING which is a private static inner class:
private static ImporterBinding REPLACE_BINDING = new ImporterBinding()
{

    public UUID_BINDING getUUIDBinding()
    {
        return UUID_BINDING.UPDATE_EXISTING;
    }

    public String getValue(String key)
    {
        return null;
    }

    public boolean allowReferenceWithinTransaction()
    {
        return false;
    }

    public QName[] getExcludedClasses()
    {
        return null;
    }

};

As with any action, the last step is to add the Spring configuration:

<bean id="updating-import" class="com.optaros.action.executer.UpdatingImportExecuter" parent="action-executer">
    <property name="importerService">
        <ref bean="ImporterService"/>
    </property>
    <property name="nodeService">
        <ref bean="NodeService"></ref>
    </property>
    <property name="contentService">
        <ref bean="ContentService" />
    </property>
    <property name="mimetypeService">
        <ref bean="mimetypeService"/>
    </property>
    <property name="fileFolderService">
        <ref bean="FileFolderService"/>
    </property>
</bean>

After deploying your changes and restarting the application server you can test the new action. In my case, I wrote a workflow that used JavaScript to execute the export action to export the documents in the workflow. I then simulated an external system operating on the ACP file by writing a quick Perl script to unzip the ACP, inject some metadata into the ACP’s XML manifest, and then zip it back up. At this point the ACP file contains the exported objects (with their associated UUID) and some new metadata. I then trigger the next step in the workflow which, again, uses JavaScript to execute the newly-written Updating Import Action. Unlike the OOTB import, when this one runs Alfresco finds the existing objects based on the incoming UUID’s and instead of trying to create new objects, it updates the old objects with the new metadata in the ACP file. Problem solved.

You can learn more about writing custom Actions on the Alfresco Wiki and in Chapter 4 of the Alfresco Developer Guide available at Packt Publishing or your favorite online book seller.

Empowering NGI Media with Alfresco: Webinar replay and slides

If you missed the webinar we did earlier this week with Alfresco and the leaders of our Media practice you can watch the re-play at WebEx. If you just want the slides you can get them from slideshare.

The presentation is about how you can increase revenue and operational efficiency by treating your content as assets that live in Alfresco and are served up through various channels and API’s. The repository is just one component of what we at Optaros refer to as the Next Generation Media Platform powered by Alfresco.

Surfing in D.C. with Alfresco’s new web application framework

If you are in Washington, D.C. today for Alfresco’s North American Community Conference please be sure to stop me and say hello. I’ll be in the sessions, in the Optaros booth, and presenting during the technical track. For my European friends, I’m sad to say that I will not be in Munich for the European version of the conference next week, but I will be in Europe at the end of this year or the first part of January so we can meet up then.

During the technical track (in both D.C and Munich) we will be showing some Surf 3.0 components we’ve built. One is called “Status”. It is kind of like a Facebook status or a Basecamp Journal entry. It allows you to say what you’re working on right now and what your mood is. A dashlet aggregates the status entries for all of your teammates across the site and another one shows status across all sites to which you are a member. When you mark it “Done” that status is archived. When status changes are made the new Activity Service is called so that if people are following site activity by subscribing to the activity feed, the status changes are included.

We’ve also got a simple “bookmark” component that lets you share URLs with other team members. As it exists right this second it allows a team to manage a set of shared bookmarks. Before it is GA we plan to make sure bookmarks are taggable and rateable and marked as shared or private.

I’ll follow up soon with a deconstruction of these components so you can learn more about how they work (and even contribute code to them if you want to make improvements).

Finally, we plan to leverage the Rating Service that was used as an example in the forthcoming Alfresco Developer Guide as the back-end for a five star rating component that would allow any Share or Surf site to enable users to rate any node.

These components will be available for you to add to your Share sites or any site built with Alfresco Surf. Our goal is to have them generally available by the time 3.0 Enterprise ships.

We’ll also be hosting code camps in North America and Europe so that you can learn to build your own Surf components. I’ll provide more details on those as they are available.

Alfresco plus Drupal thoughts

I’ve had several discussions with Optaros clients and internal team members lately around Drupal and Alfresco integration. Particularly around this topic, I usually try to listen more than I talk. I want to make sure I understand where the value is for this kind of integration rather than simply geeking out on yet another “stupid CMS trick”. I thought maybe I’d bounce a summary of these thoughts off of you.

The key is to leverage the strengths of each. If you don’t have a problem that requires this particular combination of strengths, assembling a solution from these two components isn’t going to be of any value at all. What are some of the key strengths relevant to this discussion?

Drupal has:

  • A front-end presentation framework. (I would add that it is written in PHP–a relatively widespread language that’s easy to pick up).
  • A very large library of modules, most of them focused on building community-centric web sites.
  • A lightweight footprint, requiring only a web server, MySQL, and PHP. (Yes, I know it is possible to run Drupal on other databases but not every module will).

Alfresco has:

  • Robust workflow via the embedded JBoss jBPM engine.
  • Smart management of file-based objects (files go on the file system, metadata goes in the database, and an API that abstracts the separation).
  • A plethora of file-based protocols and API’s for getting content into and out of the repository, including a framework to easily expose content and business logic via REST.

Silo’d community solutions are best implemented in Drupal alone. Why complicate your life with a separate repository? It adds no value in that situation. Similarly, straight document management (and even team-based collaboration) really can be addressed with the Alfresco repository and the standard Alfresco web client (or, soon, with Alfresco’s new Share client).

I think where Drupal-Alfresco makes the most sense is in cases where there is a significant amount of file-based content that requires “basic content services” such as workflow, versioning, security, check-in/check-out, but needs to be shared in the context of a community.

Alfresco becomes even more useful when there are multiple communities that need this content because you can start to leverage the “content-as-a-service” idea to make the content available to any number of front-end sites (where those sites might or might not be Drupal-based).

Suppose rather than one community, you have ten. Each community will have community-specific content but there may also be a set of content that needs to be leveraged across many communities. A subset of things you might be concerned about include:

  • Some content might need editorial review and approval before it goes live, but not everything.
  • Not all content comes from internal sources (pushed out from the repository). Some might originate from one of the communities as user-generated content. That content might need editorial review before it is made available on other community sites.
  • Communities need flexibility in how/if they expose cross-community content.
  • Tags and other metadata value need to be consistent between an end point and the repository (and therefore, across all end points).
  • Search needs to be properly scoped (does it include community content only, community plus shared content in the repo, multiple selected communities, or all communities)
  • Some clients may not be able to control the technology used on these community endpoints.

In these scenarios, Alfresco acts as your core repository and Drupal provides the front-end presentation layer. When you look at it this way, Drupal really becomes equivalent (in terms of where it sits in the architecture and the role it plays) to traditional portals like Liferay or JBoss Portal.
Content sitting in Drupal is harder for other systems to get to than when it sits in Alfresco. There are Drupal modules that make it easier to syndicate out but Alfresco’s purpose-built to expose content in this way. Once it is in Alfresco, content can be routed through Alfresco workflows, and then approved to be made available to one or more front-end Drupal sites. Content could come from a Drupal site, get persisted to Alfresco, routed around for editorial review, and then be made available. It really opens up a lot of possibilities.

Not all Drupal modules need to persist their data back to Alfresco. Things like comments and ratings will likely never need to be treated as real content. Instead of trying to persist everything you would either modify select modules to integrate with Alfresco or create new ones that work with Alfresco. For example, you might want to have Drupal stick file uploads in Alfresco instead of the local file system. Or, it might make sense to have a “send to alfresco” button visible to certain roles that would send the current node to Alfresco.

It doesn’t all have to be Drupal getting and posting to Alfresco. There might be cases where you need some Drupal data from within Alfresco. Maybe you are in Alfresco and you want to tag objects using the same set of tags Drupal knows about, for example. Or maybe you want to do a mass import of Drupal objects into the Alfresco repository.

I’ve got a little test module that uses Alfresco’s REST API (including the new CMIS URLs) to retrieve content from Alfresco and show it in a Drupal block. I can talk about it in a separate post.

Dogs and Cats: EMC, Microsoft, IBM, & Alfresco release CMIS

EMC, Microsoft, IBM, and Alfresco are announcing today a new specification for interoperability between content management systems (EMC press release, Alfresco press release). The specification is called CMIS which stands for Content Management Interoperability Services (full specification). Other major players involved with the spec include OpenText, Oracle, and SAP.

What the spec outlines is essentially an abstraction layer between content-centric applications and back-end repositories. The abstraction layer is implemented as a set of services (SOAP-based and REST-based). The services are primarily focused on CRUD functions but they also include a SQL-like query language. In his blog post on CMIS, John Newton says that CMIS will become “the SQL of content management”.

This means that, theoretically, a content-centric application can be written that will work with any back-end CMS that implements CMIS. If it sounds like JCR that’s because the two share the same goal, but CMIS is broader because it is language-independent. (Not to be a buzz kill but think about how many applications you’ve seen where the underlying JCR repository could truly be swapped out at no “cost”. It is too early to tell whether that will get any better with CMIS).

In what is really a “dogs and cats living together” moment, think about
this: The new Alfresco Share client (or any Surf-based web application
for that matter) can now be used as the front-end for any
CMIS-compliant repository like Sharepoint or Documentum. (Maybe that’d be a nice “bridge” to have in place while you’re migrating off of those legacy repositories!)

In my post back in June (Slinging some ideas around RESTful content) I mentioned Apache Jackrabbit, Apache Sling, and how there ought to be a standard, REST-based API for working with content repositories. I wondered if Alfresco’s inclusuion of Abdera, Apache’s implementation of the ATOM Publishing Protocol, into the Labs code line signaled Alfresco’s move in that direction. Well, CMIS is that standard. And if you look at Alfresco’s Draft CMIS Implementation, you’ll see that Abdera is, in fact, in the mix.

Back during my Documentum days, a spec was mentioned called iECM that I thought Documentum and maybe AIIM were working on together. But then it seemed like it kind of died. The goals (and some of the details) sound eerily familiar to CMIS. Could the popularity of more modern content management API’s like Alfresco’s web scripts and Apache Sling have spurred the legacy vendors into actually doing something about interoperability for real? (I just saw in John Newton’s blog post that iECM did spawn CMIS but it doesn’t speak to the motivation of the other vendors).

You can try out Alfresco’s CMIS implementation by downloading the latest Labs 3.0 B build.