Category: Rivet Logic

Boston area Alfresco user group meeting on November 17th to cover Alfresco Best Practices

Posted by on November 05, 2009

Join us in Waltham MA (Greater Boston area) and learn best practices for approaching and implementing projects with Alfresco ECM suite

  • Determining your business use case
  • Architectural best practices
  • Development best practices
  • Operational best practices

Our presentation was co-authored by Russ Danner of Rivet Logic, Jeff Potts of Optaros and Peter Monks of Alfresco

Where?
Rivet Logic Developer Forge, Boston
1050 Winter St
Waltham , MA
617.834.2781

When: 6:30 PM

Pizza, coffee and soda will be provided.

RSVP here to attend

JBoss Seam Component wiring options

Posted by on October 29, 2009

At Rivet Logic we do quite a bit of work with the JBoss Seam framework, specifically with our Content Management System integration we call Crafter rivet.

Seam can be used with the Spring bean factory framework, a popular “IoC” or Inversion of Control / Dependency injection framework. Spring enables developers to create instances of java objects known as beans and then to wire them to other java objects. Most people working in J2EE today are familiar with this so I won’t spend any time going in to further detail here. Seam also supports the ability to use java annotations to declare a class as a bean and to specify how it should be wired through what they call out-jection and injection. Check out the Seam website for more details on how the Seam bi-jection mechanics work.

One question that has come up for me many times on consulting engagements is: “which approach to use, Spring or Seam bi-jection?” My experience shows me that the answer is not one or the other. Both approaches have significant benefits and can be used together to create a stronger approach than either one can provide on its own.

Here are some very simple guidelines

When to use Spring beans:

Infrastructure components and services are great candidates for Spring beans

  • Such services are generally singletons within the system. Spring has excellent support for managing and wiring these objects
  • Such service classes are often packaged in separate more commonly used libraries. Hard coding a bean name and wiring within the class definition or strongly coupling to Seam is less desireable.
  • You want a very simple way to override the implementation at deployment time. Consider a scenario where you want to override a DAO. By managing the bean in Spring it is extremely easy to override the bean definition to use an alternate class and configuration in a given environment simply by placing an additional xml file in the classpath

When to use Seam annotations:

Domain specific components are good candidates for bi-jection.

  • They are often fine grained application specific components.
  • Explicitly stating how the component will be wired in the the class file has little impact on its re-usability because its scope is limited to the application at hand.
  • Such components really benefit from one of Seams strongest features in its bean framework: Conversation Scoping. This is the ability to define a life-cycle which is shorter than a session. By limiting the lifetime of a object to its true life-cycle it’s possible to free memory up for other needs within the system. On large, high troughput applications the benefits here cannot be overstated.

By using a combined approach you get the reusability and flexibility of Spring framework with the performance orientation of conversation scoping and ease of development associated with Seam annotations.

Alfresco Tech Talk Live: Leveraging Alfresco Share for Collaborative Enterprise Authoring

Posted by on June 04, 2009

Tomorrow (Friday June 5th, 2009) at 12pm EST I have the pleasure of presenting and leading a discussion for the bi-weekly Alfresco Tech Talk Live hosted by Dr. Yong Qu of Alfresco.

We’ll be exploring how Alfresco Share, with some basic modifications, can be leveraged to create a collaborative authoring and management environment for your enterprise content. Join us tomorrow for a demonstration and open discussion as we explore this interesting subject.

To attend, please visit http://alfresco.acrobat.com/live and enter the meeting room as a Guest.

Leveraging Alfresco Share for more collaborative ECM and WCM at Alfresco Community Event

Posted by on May 02, 2009

Alfresco is hosting a community meetup on Tuesday (details here) at which Rivet Logic will explore through a simple demonstration how the Alfresco repository, Share and WCM can be used in concert with one another to create a superior authoring and management solution for multi-channel enterprise content.

The introduction of Alfresco 3.0 Enterprise, Share, along with the work taking place for Alfresco WCM and Web Studio, a realm of opportunities have become readily accessible including the platform’s ability to facilitate not just workflow and concurrent editing but also first-class collaboration (including discussions, blogs, calendaring etc) around content that is intended for many consumption channels be it Web, wire feeds, PDF, print and so on.

Come to the meetup — and while you’re there check out this demonstration!

JBoss Seam Client for Alfresco – a Rich Java UI for Alfresco

Posted by on November 18, 2008

Since Alfresco was first released in 2005, I have led a number of projects that required some sort of custom user interface on top of the Alfresco repository.  In a few cases, we customized Alfresco’s standard web client.  For others, we built custom interfaces that were stand-alone web applications or were exposed via portlets within a portal framework like Liferay or JBoss Portal.

In most cases, we needed a user interface that was not embedded within the repository, but rather was hosted remotely as a standalone web application.  To do this, the main choices for the web application to communicate remotely with Alfresco are the following mechanisms:

Each one of these approaches has its pros and cons and the choice is highly influenced by the client’s needs.

Alfresco’s Surf platform provides a powerful framework that enables developers to leverage most if not all of the repository’s features using a RESTful approach using their Web Script runtime engine. It also allows for the web tier to be remote to the Alfresco repository.  Surf is a very good option for projects that have a Javascript-centric web tier, using frameworks such as ExtJS.  We have successfully built and deployed several Web Script-based UIs for customers, including one of the very first public sites to leverage Web Scripts found at http://highschool.ccsso.org.  In its most recent v3.0 release, Alfresco provides a UI platform for aggregating Surf dashlets to create fully functional web clients.  This platform is known as Alfresco Share.

However, we also have customers who want a Java-based UI solution too.  Alfresco’s original web client UI is a JSF/Spring based application that is customizable in many ways and is the only available alternative in this case (short of building your own web client).  It is built using a large number of custom JSF components that are very nice as long as your target UI is expected to behave similarly to Alfresco’s web client.  If you were asked to change the way one or more of these components work things start to get a little hairy especially when you realize how much work is required to make it do exactly what was needed.  There was an apparent need for developing a Java-based UI platform that shared some of the Share features.

So we set out to fill this void: To create an open source, Java-based UI platform for Alfresco.

We turned to JSF for the view framework, as it is the predominant standard in the Java community.  One of the challenges of JSF component development has always been ease of customization, or the lack of it.  Even though the JSF spec allows for extending UI components, it is still not trivial to make your components very flexible.  And what typically happens in those situations is that smart people decide to put in a lot of work into getting rid of the problem.  That’s where the JSF component suites come in. There are a lot of them out there.  Some open source, some not. Naturally I’m only interested in the open source ones.

When working with JSF components suites like JBoss RichFaces you gain a lot of leverage when you incorporate a framework that makes dealing with the JSF lifecycle both intuitive and easy.  If you guessed that I was talking about JBoss Seam, you’re right.

Projects that are more Java-centric and make use of web frameworks such as JSF would find that a remote Java API that provides access to the Alfresco Foundation Services (AFS) is necessary.  In this case, our own Remote Alfresco API rivet is ideal.  It is both scalable and fits within the JEE tiered approach quite nicely.

For these reasons, the technology stack we used for building our Java-based Alfresco web client is comprised of JBoss Seam, RichFaces/Facelets, and RAAr.

So here was the perfect opportunity to bring all this technology together and provide the Alfresco community with an example of a new way for developing Web 2.0 rich web clients for the Alfresco repository.  We decided that the web client had to be rich (AJAX is key here and RichFaces among other JSF component suites makes it possible), remote from the Alfresco repository, and modular so that it could be reused in other projects in the future.  And while we were at it, it needed to be easy for new developers to contribute to.

We gave the web client a name that explains what it really is; Seam Client for Alfresco rivet — SCAr.  (As an aside, because we incorporate RichFaces we also considered calling it ScarFaces :^)

From a high level, SCAr makes use of RAAr to utilize a complete suite of services that fully expose Alfresco ECM’s core services at the back-end, and a number of out of the box JBoss RichFaces AJAX enabled UI components at the front-end tied together using JBoss Seam to provide a single page multi-user interface to Alfresco ECM’s document management system.  The following diagram shows a high-level overview of SCAr.  The power of this architecture is in its inherent simplicity without sacrificing flexibility.

SCAr high-level architecture

The internal architecture of SCAr is broken down into a number of RichFaces components each exposing one or more of Alfresco’s document management features.  Each RichFaces component is backed by a Seam action class (POJO), where each Seam listener has access to a RAAr abstraction layer providing it with an easy to use domain specific API into Alfresco ECM. By making use of Seam observers each user action triggers one or more events at the back-end allowing one UI component to manipulate the state of the other components on the screen as needed.

The following is a screenshot of what SCAr looks like to a typical end user:

SCAr UI

This development framework makes enabling new features and customizing the behavior of existing ones straightforward.

A demo site running SCAr can be accessed at http://scar.rivetlogic.com.

If you want to know more about SCAr you can visit its wiki pages here: http://wiki.rivetlogic.org/display/SCAr/

Keep it ‘Lite’ (Part I) : Layer your platform for development agility, performance and lower development costs

Posted by on October 24, 2008

This is Part I of a series that I will be doing on factoring your software architecture for development agility, software performance, and total cost of ownership (TCO).

When object oriented programming first arrived on the scene (25 years ago!), it delivered important concepts: encapsulation, polymorphism, and inheritance. These concepts were designed to help the developer factor code. Proper factoring reduces complexity, redundancy and cohesion. One of the most powerful factoring techniques in programming is grouping for reuse.  Functions, Objects, and Aspects are all code groupings that organize an area of concern for reuse.

Code reuse and other factoring techniques tend toward greater simplicity and development agility. These characteristics have an important and positive impact on cost and revenue. There is no doubt that software development can be an expensive undertaking and at the end of the day it’s always about the economics.

As we have observed, programming languages have been evolving to help manage complexity and make software development more efficient and effective.  As computing power continues to improve, platforms are also evolving to improve development agility.  For example JAVA introduced the JVM and the concept of “write once run anywhere.”  It’s clear that the JAVA platform (as opposed to the JAVA language) provides clear agility over languages compiled to specific machine architectures because it removes the dependence on specific machine architectures by introducing an abstraction; the JVM. It has greatly simplified building, packaging and the distribution of software.

Today scripting languages are mainstream.  Scripting languages are generally loosely typed and are interpreted rather than compiled. There are debates between what might be termed the “systems level programming languages” and “scripting languages.”  Some in the traditional camp cite that scripting languages lack rigor, and claim that it won’t perform when compared to their compiled counterparts.  Those in the scripting community point to “extra work for little value” and complex deployment environments as the other side of the coin.  The communities around PHP, Ruby, Python, PERL, Groovy and others boast impressive development agility characteristics over JAVA, C++, etc.

It’s unlikely that there is anything inherent in the languages available today that drastically change the agility characteristics of development in those languages.  Most of the mainstream languages have similar concepts and differ in terms of syntax.  While some expressions may be quicker in one language over another, it’s unlikely that any of the mainstream language’s syntax will produce agility characteristics that are orders of magnitude above and beyond the others. That is to say, it is not the “PHP” in “PHP” or the “Ruby” in “Ruby on Rails” that makes them faster to develop in. It’s platform and architecture that accounts for the difference.  PHP, Ruby and many other examples are interpreted rather than compiled and this means that when a change must be made to a program there is no need for a recompile and no need for a restart.  Just change the code and (in the case of the web) hit refresh.  In the same way JAVA cleaved an entire effort out of the development process (building for individual architectures), scripting languages have cleaved a massive time sync off the hands of developers by making it easy to modify code “on-the-fly.”   I believe that scripting and compiled languages are not at odds but rather they are complimentary.

The strong typing, static analysis and offline assembly of byte code makes perfect sense for framework or systems oriented code.  This code is not likely to change much in the course of an implementation but is executed frequently. Framework code often defines the performance profiles of a system.  You always want to optimize when possible.  Where there is no absolute requirement for interpretation and no strong value proposition it should be avoided.  That is to say favor compilation over interpretation where interpretation does not deliver significant value.  Don’t make the machine do the same work twice when it can be avoided.

Application level code (as opposed to framework code) changes often.  Developers benefit from the ability to easily write and run code without having to restart servers and perform compilations and deployments.  Application code has a lifecycle and release cycle that is much different from infrastructural / framework code.  This becomes more and more apparent as the framework matures and changes less and less often.  They are two different types of code with two different lifecycles.  Businesses don’t want to spend more time on framework than is necessary.  The value is in the applications and this is where agility matters most.

The optimal approach doesn’t have to be one or the other (although in some cases it is.)  Each platform plays best to a different set of concerns.  In software, a common approach for tackling separation of concerns is called layering.  It is possible to layer a system by using a traditional, compiler based language and platform (such as JAVA) for infrastructure needs while leveraging scripting languages and template technologies (such as PHP, Ruby, Groovy and so on) for the application layer.  By doing so, you combine the success characteristics of both platforms: compensating for weaknesses while playing to strengths. To understand the power and success of this approach, one needs to look no further than Excel; a truly killer application.  Excel is a framework.  You bring the application to it when you build your spreadsheet.  Excel’s (a compiled, c++ based application) power is opened full bore with the VBA scripting environment.

We also see this approach taking hold in the web space with packages like Bean shell, groovy, JRuby, Quercus PHP and so on.  At a recent community conference Alfresco, an open source enterprise content management platform demonstrated SURF, a java based framework that enables developers to code applications in server side Javascript.  Alfresco used the SURF platform to create its new Share application (a Share Point alternative.)  They are moving away from developing in pure JAVA because it just doesn’t provide the agility they need to compete at “internet speed”. Instead, they will continue to build their core repository and framework in JAVA but applications will be built based on SURFs support for Javascript and templates.  It’s powerful and fast as a development platform.  The productivity Alfresco has demonstrated in the last year is truly impressive and a testament to layering the two types of development platforms.  Use the right tool for the job and it will get it done better and faster every time.

I’d like to point out one more important outcome of layering your development platform. In doing so you can greatly reduce the learning curve that one must overcome before one can develop for the system.  A relative few people know how to program in JAVA.  However a great many more people have at least some experience programming in Javascript and even more have experience with PHP.  Why?  That’s simple. Javascript is common on web pages. PHP is offered by almost every ISP on the planet and it has a huge online community from which one can find code examples.  When you layer your system you get all the technical benefits of JAVA on the back end with all the benefits of easy to develop code on the front end (the application) in a way that is open to a very wide range of developers; for example: The core framework written in JAVA and the application consuming that frame-work written in PHP (Quercus PHP is an Open Source, JAVA based implementation of PHP5).

PHP developers tend to be much more available and affordable than JAVA programmers. It’s simple economics.

Open Source Looks Good in Orange

Posted by on October 17, 2008

Alfresco Community Conference

Posted by on October 11, 2008

Today I am back in Boston after spending most of the week in Washington DC. I was there for the Alfresco Community Conference and also to spend some time at Rivet Logic’s new headquarters. We have a lot more room for our team in our new digs. Every time I have a chance to spend time with the group in Reston I am reminded of what an awesome team Rivet Logic has put together and why joining this team was such an easy decision.

The DC Conference was absolutely awesome. I left DC with the same excitement I had for Alfresco the first day I read about it on the web back in early 2005. This coming release is a Landmark release for Alfresco and a springboard for really big things in the future.

Last year Alfresco gave us Web Scripts. Web Scripts was raw functionality / capability for binding web-based functionality hosted in the repository to a parameterized, ReSTful URL. Web Scripts allowed Alfresco to easily integrate with other platforms, participate in mash-ups and to some extent get around the issues with the traditional alfresco web client (it’s much slower to develop for and a bit “click” intensive.) Web Scripts by it’s very nature is AJAX friendly which leads to better, more rich user experience and the javascript / freemarker construction makes building Web Scripts a whole lot easier than writing, compiling and deploying heavy Java code.

This year Alfresco gave us:

  • A better core repository
  • SURF
  • Alfresco Share
  • A peek at SURF Development Studio
  • CMIS

It’s clear that without the foundational work of Web Scripts and the capabilities in the WCM product the items above would not have come to pass in a single year. Web Scripts has enabled an explosion of capability. Last years release of Web Scripts may have seemed like a powerful but merely additional capability but it laid the foundation for a huge growth explosion. The game board was set up with last year’s release and it is evident with 3.x that the game has changed.

As Alfresco’s application architecture is refactored they are also able to refactor their team a bit and more cleanly dedicate resources to specific areas of the architecture. We now have a dedicated team of strong developers with a focus on repository scalability and stability. This week we were told we can expect better performance, scalability in both the DM and WCM repositories. We also heard that harmonizing the APIs and capabilities for these repositories is a goal and is underway. Alfresco has also added a new remote interface to the repository that allows Microsoft Office to use the Alfresco repository as if it were a Share Point server. Something good just got better. I like the direction the engineering is heading by cleanly separating the repository from the applications that work on top of it. I also like what I have heard about the focus on key areas like performance and scalability. New features are always important but are a distant second to improved performance and scalability of something as core and foundational as the repository and its content services.

SURF is an application platform for aggregating and delivering Web Scripts (and other components.) SURF is an MVC for site / application composition. Alfresco has taken Webscripts, templating, and URL addressability and parameterization capabilities out of the core repository, combined them with a set of new capabilities and re-organized them in a entirely separate framework. In essence SURF is entirely independent of the Alfresco Repository. The key here is that while SURF is entirely separate, creating Alfresco client capabilities in SURF is a snap.

Alfresco Share is a new application that Alfresco has developed, which, for many people will eliminate the need to use the traditional Alfresco web client for anything other than repository administration. Share is a collaboration platform similar to something one might expect from Share Point but with much more Enterprise 2.0 and social features. Share is really impressive and it demonstrates what can be built with SURF and how quickly and easily one can build it. Share was developed in less than a year but has features and capabilities of other systems that have been under development for years. Best of all, Share will continue to get better at a similar rate and because it is so easy to write new components with Web Scripts the community can contribute and accelerate this growth.

Development Studio is a SURF based application that integrates with Alfresco WCM, the Alfresco Network and your SURF application to provide you with a visual (WYSIWYG / drag and drop / edit in line) environment for developing SURF applications. I truly believe that Alfresco WCM is an awesome platform with advanced features and capabilities not found anywhere else in Open Source and in some cases even in the world of the proprietary giants. WCM is a new platform with groundbreaking capabilities but without a something like SURF or the Development Studio to demonstrate these capabilities, it was hard for customers to recognize the value sitting right in-front of them. Early on in WCM, Rivet Logic had developed similar capability to what you see in SURF for the exact same reason. SURF and the Development Studio help to round out the Alfresco offering and will really help to highlight the unique and powerful value in Alfresco WCM.

CMIS (Content Management Interoperability Standard) is a new standard for ECM platform interoperability. Today it is in DRAFT status with OASIS but according to John Newton, CTO of Alfresco there is a strong probability of its adoption with the backing of the like of Microsoft, Documentum, Open Text, Alfresco and several other key players. CMIS supports both Web Service and REST based protocal bindings making it very easy to integrate in to an existing platforms. Alfresco’s REST implementation provides nearly full coverage of the specification. Web Scripts played an important role in the lightning-fast turn-around time for this implementation. Again we see the foundational work of Web Scripts delivered last year providing big results less than a year later. CMIS will allow developers to write repository agnostic applications that will work against any repository which supports CMIS including Alfresco. CMIS also specifies a SQL like query language. Unlike previously proposed standards that pushed XQUERY and XPATH, CMIS is adopting a well understood paradigm which I believe will only encourage its adoption.

It was a fantastic week and an exciting conference. If you have not looked at Alfresco lately it is definitely time to take another look. This is truly an exciting release for this product! I really enjoyed the opportunity to see everyone in the community, Alfresco, and at Rivet Logic HQ.