Category: Alfresco Book

The Alfresco Developer Guide (Packt Publishing) is an award-winning book that is a must-read for developers getting ramped up on the Alfresco platform.

Now Available: Alfresco Developer Guide 2nd Edition

After more than 8 years since it was first published, Packt has published a second edition of the Alfresco Developer Guide. Much like the Alfresco product itself, the overall approach and architecture of the book is fundamentally the same, but Ben Chevallereau has given it much-needed updates by adding Share, SDK, and Application Development Framework coverage as well as bringing everything else up-to-date.

Before I talk about what’s in the book, I should mention that although the title says “Alfresco One” the book is applicable to both Community Edition and Enterprise Edition. I honestly have no idea why the “One” got added, but that’s a minor quibble.

The first four chapters are essentially the same, with updates here and there to match recent software releases. Chapter 1 introduces content management and Alfresco. Chapter 2 discusses the Alfresco way to develop extensions and customizations. Chapter 3 dives into content modeling. Chapter 4 explains actions, behaviors, transformers, and extractors.

Chapter 5 is when the first serious departure from the first edition occurs. That’s because when the first edition was published, Alfresco Share was just being created. The second edition uses Chapter 5 to discuss Share customizations, primarily focusing on Surf, but also touching on Aikau where it is relevant.

Chapter 6 further expands on application development by exploring the new Application Development Framework based on Angular2.

Chapter 7 returns to familiar territory with web scripts and Chapter 8 covers advanced workflow, although in the second edition it is exclusively focused on Activiti rather than the old jBPM engine.

Chapter 9 is kind of a grab bag of new feature coverage such as the Search Manager and Smart Folders. It also throws in a light example of developing a mobile client for Alfresco using Appcelerator.

Chapter 10 focuses on security and covers the same topics as the first edition (LDAP, SSO, and custom permissions) but with obvious updates.

The appendices originally in the first edition were cut completely which would have been a pain to update. And with the improvements made in the Alfresco-provided documentation over the last eight years they really no longer add much value.

Overall, I think the book still meets its goal of being the quintessential reference for anyone getting started with Alfresco development.

Many people have come up to me over the years and said, “I got my start with Alfresco thanks to your book,” and that makes me happy because that’s exactly what it was for. I’m glad that this new edition will enable a whole new generation of people to get up-to-speed and join us in the vibrant Alfresco community.

The credit for the hard work on the update goes to Ben–you did a great job. We should also recognize Bindu Wavell for the technical editing, which is a huge task. Thanks so much guys!

Let’s stop writing books about Alfresco Explorer

I used to be of the opinion that when it came to books about Alfresco, the more, the better. But with about a dozen on the market at this point, I think it is probably past time to start focusing on quality over quantity.

A big driver of quality is relevance. We’re at a point where the old web client, Alfresco Explorer, is no longer relevant to any new project and most existing implementations. And yet Alfresco Explorer keeps showing up in new books. Come on, people. Alfresco Share made its debut in Alfresco Labs 3a way back in September of 2008. Granted, it needed a few releases before it became the preferred web client, and there are still a few minor things you cannot do in Share, but Alfresco Explorer has been virtually unchanged since then.

Alfresco Share is the preferred web client and has been for quite some time. Yes, there are people who still run old versions of Alfresco. Yes, there are people who like JavaServer Faces. But I’m pretty sure the existing catalog has those folks well-covered. I’d rather see authors spending their energy (and the readers’ time) elsewhere.

I say it all of the time and it seems like it ought to be common knowledge, but I’ll repeat it: No new customizations should be happening with Alfresco Explorer. Talking about Alfresco Explorer customizations is almost a disservice to the community, so let’s stop.

From time-to-time, publishers ask me to review book proposals. I know many of you get the same emails. Let’s all make a stand: No more green lights for books that feature significant coverage of Alfresco Explorer from here on out. Sound good?

Alfresco Explorer was a great web client in its day. It’s not that I dislike it at all. I’m just saying it’s time to say goodbye. So let’s all bid a fond farewell and let it go gently into the good night. We can remember it fondly over drinks at meetups, but for goodness sake, let’s stop writing about it.

Alfresco Developer Series tutorial source code now on github

The source code for the tutorials in my Alfresco Developer Series has always been available to download as a zip. But for some reason I never put it in a project where we could collaborate on it. That’s fixed now. The code’s now on github. (Note that the source code that accompanies the Alfresco Developer Guide is on Google Code. I don’t intend to maintain that going forward and will instead focus on these github projects).

As part of that I’ve made sure that the content types, behaviors, actions, web scripts, and workflow tutorial code works on 4.0.d and 4.2.c. The original zips referenced in the tutorial PDF still work with the versions they were written for, of course, but if you grab the source from github, they’ll work on the version they are tagged for.

One thing I’ve realized as part of this is that with the actual tutorials in PDF, keeping the written instructions in sync with the code is tough. Maybe I should convert the tutorial text into markdown or something similar and check that into the source code repo as well. Let me know what you think about that idea.

Next step for the code is to convert from the old Ant-based Alfresco SDK to the new Maven-based SDK.

Any interest in a pre-3.4 five star ratings widget for Alfresco Share?

One of the examples I put in the Alfresco Developer Guide is a five star ratings widget. The example company in the book, SomeCo, uses it to let their web site users rate whitepapers published on the site. Metaversant recently took that code and implemented it in a production web site, and that client gave us permission to take the code (which wasn’t really changed that much from the book anyway) and release it as open source.

But in Alfresco 3.4 Community and Enterprise, Alfresco has implemented partial ratings functionality. Right now, it consists of the back-end, repository tier services and it is darn close to what’s in the book.

With the back end in place, I expect Alfresco to release ratings functionality in the Share front-end in an upcoming release. So, I’m somewhat reluctant to package up my ratings stuff and release it as it is partially obsolete in 3.4 anyway. On the other hand, it would give those of you on releases earlier than 3.4 a functional ratings widget, and, with some adjustments, I could make the front-end work with Alfresco’s rating service in 3.4, which would mean functional ratings in Share for those of you that have already upgraded.

If the code was ready to go, I’d just package it up and if only one person used it, great. But, the client we did the widget for was using a heavily customized version of Share–we didn’t integrate the widget into the out-of-the-box document library or document details page. That’s the last bit of work that needs to be done. Even if there is no interest, I might do it anyway just to have as an example. But, I’d be even more motivated if there were folks out there who would use it in their production implementations.

So what do you say? Any interest? Take the survey below and let me know.

Create your free online surveys with SurveyMonkey, the world’s leading questionnaire tool.

Alfresco Developer Guide source updated, uploaded to Google Code

Back in July of 2009, I did a reorg of the source code that accompanies the Alfresco Developer Guide. Shortly after that I validated against 3.2 Enterprise, but I didn’t keep up with the Alfresco releases after that. I’m happy to say that I’ve caught up. And, to make it easier for you to get to the source code, I’ve checked it all in to a Google Code project.

So, if you’re reading the book and you’re finding a couple of problems with the source code on Alfresco versions after 3.2 Enterprise, go get a version that matches up with the chapter you are on and the release of Alfresco you are running, and see if it fixes the problem.

I’ve now validated that the code works with the following versions:

  • Alfresco 2.2.4 Enterprise
  • Alfresco 3d Labs
  • Alfresco 3.0.1 Enterprise
  • Alfresco 3.1.1 Enterprise
  • Alfresco 3.2 Community
  • Alfresco 3.2 Enterprise
  • Alfresco 3.3 Community
  • Alfresco 3.3 Enterprise
  • Alfresco 3.4c Community
  • Alfresco 3.4 Enterprise

Alfresco Developer Guide source code update for 3.2 Enterprise

I’ve updated the source code that accompanies the Alfresco Developer Guide to be compatible with the recent 3.2 Enterprise release of Alfresco. You can get the link from my original post on the source code re-org, or download it directly.

Most of it hasn’t changed terribly much. The BootstrapAuthorityCreator class, which you don’t need unless you are playing with the AMP example in Appendix C, isn’t working yet due to changes in the AuthorityService with 3.2 Enterprise.

The biggest change is in the LDAP configuration (Chapter 9). Overall, setting up LDAP authentication and chaining has gotten much easier in 3.2 Enterprise. But the configuration is much different than in previous releases (See the Alfresco wiki pages on Subsystems and the Authentication Subsystem for more info).

I don’t have CAS SSO working with 3.2 Enterprise quite yet, so the authentication filter included in the Chapter 9 source code is commented out for now.

Packt Author of the Year Award

I mentioned it on Twitter yesterday but I definitely wanted to spend more than 140 characters saying thanks. If you missed the tweet, what I’m talking about is that Packt announced that I won the Author of the Year Award for the Alfresco Developer Guide.

Earlier this year they had a nomination process which resulted in readers choosing me as a finalist. Getting that far was really cool and I definitely want to say thanks to the readers of the book and the blog for making that happen.

The next step was a round of judging. This took a while and I can’t imagine the process whereby you get a panel of judges, with different backgrounds and full-time jobs (I assume) to look at six technical books that cover a wide range of topics (Alfresco, Drupal, Ext JS, JavaScript, and SOA) and subsequently make sense of the feedback. Definitely a big thanks to Packt and the panel of judges who worked hard to make this happen.

The book was certainly a team effort. I had a great team of technical reviewers, and they were instrumental. I think it’s also important to recognize my firm, Optaros, because the project couldn’t have happened without their support and encouragement. The entire Alfresco team also got behind it in one way or another and that was important to the success as well.

Alright, enough said. I’ll quit before I start working my way down the family tree. Maybe Twitter’s length restriction really is the best thing for an acceptance speech. Thanks, again, to everyone involved!

Alfresco Developer Guide source reorg and 3.2 Community update

[UPDATE: Added a link to the source code that works with 3.2 Enterprise]

I originally wrote the Alfresco Developer Guide source code for Alfresco 2.2 Enterprise and Alfresco 3 Labs. The code was pretty much the same regardless of which one you were running. For things that did happen to be different, I handled those with separate projects: one for community-specific stuff and one for enterprise-specific stuff. This was pretty much limited to minor web script differences for the “client extensions” projects and LDAP configuration differences for the “server extension” project.

With the release of 3.2 Community, I realized:

  • The number of different flavors of Alfresco any given reader might be running are going up, not down. Who knows when 2.2 Enterprise will be sunset.
  • It is no longer as easy as “Enterprise” versus “Labs/Community” because multiple releases of the same flavor are prevalent (2.2E, 3.0E, and 3.1E, for example).
  • Tagging my code in Subversion by Chapter alone is no longer enough–I need to tag by Chapter and by Alfresco version.
  • Sending the publisher the code one chapter at-a-time and expecting them to manage updates and deciding how to organize all of the chapter code was a bad idea.

So, I’ve done some work to make this better (reorg the projects, restructure the download files). I’ve also tested the example code from each chapter against the latest service packs for all releases since 2.2 Enterprise. That includes making some small updates to get the examples running on 3.2 Community.

You can now download either all of the source for every version I tested against, or, download the source that works for a specific version. It may take the official download site at Packt a while to get the new files, so here are links to download them from my site:

Alfresco Developer Guide example source code for…

  • Alfresco 2.2 Enterprise (~5.3 MB, Download)
  • Alfresco 3.0 Labs (~5.6 MB, Download)
  • Alfresco 3.0 Enterprise (~5.7 MB, Download)
  • Alfresco 3.1 Enterprise (~5.6 MB, Download)
  • Alfresco 3.2 Community (~5.7 MB, Download)
  • Alfresco 3.2 Enterprise (~5.9 MB, Download)
  • All of the above, combined (~28.1 MB, Download)

Hopefully this makes it easier for you to grab only what you need and makes it clear that each Eclipse project contains only what’s needed to work with that version of Alfresco. Deployment is easier too. Most of the time, it’s just the “someco-client-extensions” project that you deploy.

Now that I’ve got everything structured like I want it, as new versions of Alfresco are released, it should be much easier to keep up.

Save 15% on Alfresco Developer Guide

Forgive this temporary transgression into a blatant sales pitch, but I’m trying to save you some money. Packt Publishing is offering ECM Architect readers 15% off my book, the Alfresco Developer Guide. To take advantage of the discount:

  1. Visit the Alfresco Developer Guide Book Page
  2. Click the “ADD TO CART” button to add the book to your shopping cart
  3. Enter AlfrescoDG-3117 in the “Promotional Code” field and click the “Update Button”. The discounted price should now be reflected in your order.

After your book arrives, if you read it and decide it was the best Packt book published in 2008, you should take a minute to vote for the Alfresco Developer Guide in Packt’s Author of the Year awards. Voting ends May 25.

Alfresco Developer Guide readers react positively

Thanks so much to everyone who has commented on the blog, sent an email, mentioned the book in a blog post, or written a review on my book, Alfresco Developer Guide. I’m glad you’re finding it helpful. Keep that feedback coming. While I’m thinking about it, here are some links related to the book you might find helpful:

  • A free chapter can be downloaded from the Alfresco Content Community. You’ll need an Alfresco Content Community login (it’s free).
  • One of my Optaros colleagues, Olivier Pépin, and I, originally wrote a chapter on Optaros’ open source alternative web client, DoCASU, but we had to make it a download for space reasons. You can download the “bonus chapter” from Optaros (email address required).
  • Appendix C talks about installing Alfresco, AMPs, import/export, and Surf. This was originally intended to be included in the book as well, but it’s been provided as a download instead.