cancel
Showing results for 
Search instead for 
Did you mean: 

Complexity and power versus simplicity - Alfresco vs. Pojos

huima
Champ in-the-making
Champ in-the-making
Hi all,

This is a little long posting first explaining my viewpoint and thinking behid my reasoning as well as solitary rambling about my perceptions of CMS landscape, which I would hope to turn into dialogue.

Eventually the questions for engineers and community is: what are best practices in starting to build competence and experience in Alfresco through projects.

I've been lurking here for years, studying from time to time Alfresco and following up on developments, but never been able yet to use Alfresco in a real project as in the end I get cold feet and am more scared of all the complexity of Alfresco platform rather than impressed about all the capabilities of the platform. As an architect I am thrilled about everything Alfresco has,but as a single developer I am scared shitless as even though I  do understand how things work on higher level, there is vast amount of information and tacit knowledge to be acquired before one can be confident on how everything works together. And by then you are no longer just a java-developer, but Alfresco-developer with heavily vested interest to see everything as a problem solvable with Alfresco. I see Alfresco as an interesting platform, which requires a strategic commitment from companies ( whether development company or enduser company ) to get the benefits out of it - however I don't know the pivot point after which Alfresco will actually make sense.

Applications and problem sets I work with usually involve simple content / data models, which have been easy to model into RDBMS with proper ORM tools, and use those objects in MVC web applications with quite small requirements for developer experience and knowledge outside basic java development, Spring Framework and Hibernate / JPA. Hibernate Search has brought full text indexing and search into this development model. Naturally data / content editing and authoring has required custom solutions every time and as soon as you add permissions, metadata or more complex not so structured content types into equation you start to miss a proper content storage and framework.

However when one starts to look CMS landscape the view is horrible. I've evaluated or looked at numerous different CMS softwares and they all have similar characteristics at least in terms that their creators start to see their software as a platform for web application development and suddenly you are tightly coupled with whatever application you initially selected. If you are using Liferay or another portal you have atleast some common API shared between portal products, but then again when you take a portal product you also bite the bullet of having to learn and administer a huge pile of functionality and code even though you would be building just a simple website and application at first. Pure Web CMS like OpenCMS or even Drupal might be really good fit for webpublishing needs as mental models are really familiar with what people are thinking when they think web publishing.

And when taking developers into the equation thing gets even more complicated. Drupal sites can be built with small change as there are so many people working with it, though a lot of people just seem to use Drupal as a base and then custom build all the features needed on top of Drupal core. Anyhow you can get people with at least some exposure to Drupal hired and trained for small amount of money. Personally hate Drupal and every single time I start to read a book about it to catch up with best practices on Drupal development I start to cry like a baby. Even though smart people build beautiful sites with Drupal, to me Drupal looks and feels like a terrible hack and unless Drupal fills usecases and needs almost out of the box, I really wouldn't want to do development with it. That unfortunately goes for many other PHP based web cms systems, no matter how well coded and clean the system is - if the mental models and abstractions used are poor or make your brain hurt, requiring you to change your natural way of thinking into something else.

I grew up with Plone, but haven't done development in Plone in years. Even today Plone is great CMS for users, but for developers legacy baggage and Zope 2 can be too much. Alfresco and Nuxeo seem to bring best parts of Zope / CMF thinking into Java world, and on theoretical level I am at home with either product, being able to model content in hierarchical trees, having cross cutting services like search, versioning and content transformations available for all content objects. However where Plone provided to be really quick stepping stone to producing a real live site with little bit of skinning / templating, things are not that easy out of the box with neither Nuxeo or Alfresco. Both do provide editing facilities in web clients, but neither is really fun to use. For public website builders, these platforms provide really interesting facilities to build your own REST-apis to communicate with, which means that you can build your website with the framework of your choosing and communicate with http with the content repository. If you need to build online communities which include also putting or updating content, then you need to do user interfaces and user experience for it on your own.

And this is where my biggest problem is at the moment. If you need to build your user experience and UI anyway, and you need to build your API layer to manage the content, when does it make sense to start to use Alfresco as a repository, compared to working with keep it simple paradigm and using pojos. And does it make at all sense to start to use Alfresco as a common base for even such simple projects like traditional websites and online communities, even though in the beginning many features and possibilities of Alfresco would not be used. My rational or irrational fear is that taking Alfresco into use would slow down development, as most developers can be really competent and fast while working with well known paradigm of objects, ORM and MVC, but when instead querying objects from relational database you need to do queries via search indexes. Similarly modeling content objects Alfresco way might take time before developers learn best practices and start to understand how things work.

So how do teams and companies start up their journey and development towards leveraging Alfresco instead of just filesystems and databases, and how much of an effort has it been?

My dream scenario would be:

- Robust storage with services provided like Alfresco and Nuxeo does

- Ability to query repository in SQL:like syntax, so that Lucene search queries are simple to from for normal developers ( Nuxeo's nxql seems to do something like this )

- Great looking and easy to use default user interface for content management ( intranet scenarios / internal content managers scenario )

- Easy to use remote Java API, which would expose repository, content objects and services to be used in web frontends ( Spring MVC )

- Ability to easily understand what happens in the whole stack, so that monitoring, management and optimization would be easy

I believe that what I wish to have is something Alfresco can do already, atleast almost. But I just don't know which way to turn first and / or are there certain extension projects that should be used to make things easier for myself.

Based on my preliminary reading and studying, the best or atleast one way to move forward would be:

1) Use hybrid repository model where non relational content would be in Alfresco and stuff that fits relational model nicely put into relational databases ( ratings etc. )

Hybrid model came to me as an idea as I don't yet know the internals of Alfresco and would be a little scared to put ratings or comments inside the content model untill I would understand what the implications were. In hybrid model a really simple spring service with sql queries and caching could keep count on given ratings and store the raw data in own table. Reference to documents would be made with content id. Similarly comments are an interesting question mark. Should they be part of content model or outside the content model? Let's say that we would be developing a large community site, where content items like photos and blogpostings etc. could get thousands or tens of thousands ratings and reviews. Users would have heated discussions in commenting threads on daily basis.

In that kind of situation would it be reasonable to model comments into Alfresco content model or keep them outside just as with ratings?

2) Alfresco could have access to these relational database services via custom services ( written in java, Spring services which get injected datasource from appserver )

This would mean management UI could have widgets that show content ratings and comments from outside services. Ratings status and comments could be properties of content model, though they would not be updated in real time, but as a batch job.

3) WebScripts would be used to write content API, which frontends would use

4) Flex UI or WebClient could be used to give content authors access to the repository



Any thoughts on whether I am on the right track or should I do something else instead?
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
What a long posting  Smiley Very Happy 

From Alfresco's perspective we are aiming to do very much what you are asking for.

In particular:
We are anticipating that CMIS will become a big part of working with any repository, alfresco included, much in the way that SQL changed the RDBMS landscape.   And with the CMIS toolkits in development now it should help people get started when all they need is a bog standard content repository.     You may have one of your "dream scenarios" met with the CMIS query language. :wink:

The Alfresco UI is currently in a state of flux with V3 with the introduction of Share and Surf to make it lighter weight and more flexible and capable.  Its growing rapidly and is working well.    The next version of Alfresco (3.4) aims to  bring WCM to the Surf/Share platform.

What are best practices in starting to build competence and experience in Alfresco through projects?
I'd start with the simple advice of understanding your requirements and starting small and simple.

And if you look back in this forum some-one asked a similar question of whether they should spend time learning to use alfresco or rolling their own solution.    My summary of the thread was that if the requirement is simple enough for you to implement it yourself in say 10 days then roll your own solution.    If not then use a tool like Alfresco.

huima
Champ in-the-making
Champ in-the-making
Now that I have gained more experience, wisdom and enlightenment I can actually concur that you were spot on with your response.

I was actually looking forward seeing you at Dev Con at Paris - just to say thank you for your great responses on the forum.

mrogers
Star Contributor
Star Contributor
Thank you.  It was good to talk to so many people at DevCon.

New York next week…