Sunday, December 14, 2008

I have an admission to make.. I changed sides to Wicket

I had evaluated Wicket once before in its early days and dismissed it as a toy, but back in August, after frustrations with trying to write 'complete' web applications, not just for processing xml with Cocoon I tried it again... and absolutely loved it. I have since built a handful of web applications for different clients across the UK, NHS, University and other with Wicket and the Apache Jackrabbit repository backing it up.

The combination of Wicket and Jackrabbit is very powerful indeed. While the verbose nature of Java means nothing is particularly compact with Wicket, the componentisation capabilities are amazing! I love the code re-use possibilities. Every problem can be broken down into is constituent parts.

I don't know much yet about the performance I can expect to see when building webapps with Wicket, its something I will have to read up on.

I have been reading with interest over the last few months how the hippo guys are doing the same. It will be interesting to check out their latest cms release when it is out of beta.

Friday, August 01, 2008

Cocoon 2.2, Spring and Database Integration

Well, it seems I spoke too soon in my last post where I said...

'therefore, you can do anything you like with technologies like Hibernate, marvellous..'.

While Cocoon 2.2 integration with Spring is watertight.. integrating with the right versions of Spring libraries outside of the default ones, and with Hibernate or JPA is not straight forward. Furthermore, as has always been the case, while the documentation for Cocoon is slowly growing in terms of quantity, and quality, it is still far behind many other projects. I had big issues getting any solution to work in terms of writing to or reading from the database, and saw, that many others have apparently had the same problems. In many cases, I saw strange hacks to get things working, and lets face it, users want to see a solution work without strange and ugly hacks.

Changing topics, Cocoon Forms has frustrated me recently, while I have always admired its powerful capabilities, I do not like the way it just seems to 'brake the flow of an application, requiring different matchers, and templating technologies. I realy wanted to enable the componentisation of forms under my own widget system, where forms could just be embedded in a simple manner. I ended up hacking my application to such a deep level that I decided I was better of just using the 'Form is the whole World' approach as per usual. Perhaps someone else has a solution around this?

Anyhow, thats enough of my thoughts on these two subjects, I will get back to them both next time.

Saturday, June 21, 2008

More on Cocoon 2.2 and Maven

Well a couple of months ago I blogged to talk about a number of projects I was working on using Cocoon 2.2 and Maven 2. Here is a little catch up. Both are on the point of going live, and since my last post, Cocoon 2.2 has finally been fully released.

My experiences are all good with both, although as per usual, and particularly where more than one technology is involved, the learning curve is definitely a factor to be taken into consideration, particularly if time is short, or your development team is small.

First up, the company website I mentioned, is due to go live in a matter of weeks now. Crafting it with Cocoon 2.2 was great fun, so neat and tidy. Managing it with Maven 2 is also very efficient. The time required to make everything work well in Maven was pretty immense though, for example the need for a private corporate repository, and a proxy to enable reproducible builds at any time.

I mentioned before that I had no experience with working with databases through Cocoon, and that seemed at the time to be a daunting prospect. Well it turns out Cocoon 2.2's integration with Spring is as watertight as it says on the box, and therefore, you can do anything you like with technologies like Hibernate, marvellous!

Separation of concerns is still to me one of the very best features of Cocoon, and twinned with powerful transformation pipelines, you get the complete set of tools to work with.

Thanks to the Cocoon and Maven teams for providing such excellent tools to work with.

Sunday, February 03, 2008

Touching base on Maven and Cocoon

I blogged a while ago on a new technology (to me), Maven, and one I am familiar with... Cocoon, now here is a quick catch up on both topics.. combined. I am now using both Maven and Cocoon, in the form of Cocoon 2.2, which I am experimenting with for the first time. The modular approach for builds that maven represents appeals to me, and Cocoon is an old favourite in my development toolkit, yes it still gives me a warm glow inside, and truthfully I have not yet experienced anything as good in terms of architecting an elegant web platform.

I intend to rewrite my company website using this set of tools, and have another project to work on simultaneously, the former is purely a publishing project, something I have experience in, the latter is a database intensive operation, something I am not comfortable with in terms of Cocoon. I have still not seen any beginner (best practice) samples for developing DB powered webapps with Cocoon.. specifically Cocoon 2.2, the search goes on. If I do find any, I will be sure to post them as a follow up to this.

In terms of my experience so far, this Maven Cocoon 2 combination has a fair overhead, particularly if you are not familiar with the concept of build tools such as Apache Ant, and Cocoon by itself is a large and complex platform. The joy is in watching your efforts rewarded with powerful automation, and an incremental, concise approach, allowing the developer to use lego blocks, reusing code, and expanding the boundaries confining any architecture elements of the system.

A word of warning though, as of right now, the chances of a successful build of Cocoon 2.2, without being forced to tinker with the system are slim, it is a frustrating experience, which perhaps only makes your eventual success (hopefully), all the more pleasant.

Sunday, January 06, 2008

Decisions decisions.. choosing technologies

Ah but it is so difficult sometimes to choose one technology over another. I have been a big fan of Cocoon for several years now, and know how to use it in some scenarios but not in others, I don't know of a better publishing platform, but what about when you need to work with dynamic input, and databases, what patterns are in place for that side of things?

I have yet to find a better templating system than XSLT, but then when you are getting your data dynamically from a database you don't necessarily want to be working with it in XML. What I really need is a pattern where we can splice seamlessly data from XML, database, and other backend sources, without adding the overhead of squeezing the database results into XML format. Oh and to confuse things further, I'd like to do it with Cocoon 2.2, for which there is nowhere near enough documentation yet.

On recent projects for my new company, in an effort to build componentised platforms for working in a modular way with dynamic data from a database backend, I have worked with JSF and Facelets, and while it is a big improvement over JSF with JSP, there is something that still does not feel natural about it. I get no warm glow like I do when I revisit similar past projects written in Cocoon.... perhaps I am not adapting to change very well, I don't know.. perhaps there was a more domain based language approach using Cocoon and custom templating / component systems?

If anyone has any advice on working with multiple backend stores in a fluid way with Cocoon 2.2, I'd love them to point the way.

On the same subject are there any profiling results out for Cocoon 2.2 benchmarks, without caching, information on the reduction in bloat? It would be interesting reading.