This article was written for the Joomla! Community Magazine of June 2011, but not placed.
Just like this cartoon.

More background why it was not placed, is still to be published. Some discussion can be found on www.alltogetherasawhole.org. This is the draft of the article as offered for "review" to the CLT.

With a little help from my friends...

Other frameworks can be used as a help to develop Joomla!-applications. Nooku is specially made for that.

WithALittleHelp

illustration: Nelleke Verhoeff


The Joomla!-software consists of two parts: a framework with core classes (mainly residing in the /libraries/joomla-folder) and a CMS built on top of that. Just right now the Joomla!-framework and it's development are being split off from the rest of Joomla!: it is planned that the next Joomla!-CMS version, 1.7, will include the Joomla! Framework version 11.1. All kinds of applications can be built with and for that Joomla! platform. Sometimes other frameworks can also be used to accomplish a task. For instance: in the last issue of this magazine there was an article about using Doctrine in Joomla!. That can be useful if you make Joomla!-software following the principles of Domain Driven Design (DDD). The Joomla!-framework doesn't offer much possibilities to map domain-objects to a relational database (ORM), but Doctrine does. Another example can be found in JomSocial (an extension that is a.o. used on people.joomla.org): they wanted to use some RESTful webservices, which was not provided by the Joomla!-framework, and used the Zend-framework for that. All GPL-compatible software can be used without any problem.

Nooku is such a framework that can be used to make Joomla!-applications. In fact: it was specially designed for that. The Nooku-framework can be used besides the Joomla!-framework. So, you can still use your "normal" Joomla!-extensions, but after installing the Nooku-framework you can also run Joomla!-extensions that were built for the Nooku-framework. It is a great tool for developers. A very powerful engine besides the "normal" engine. And what's more: it is completely free ("free" as well as in "freedom of speech" as in "free beer").

In the JED there are several extensions, that were built with the Nooku-framework.There probably will follow more in the coming period, now the Nooku-framework nears the 0.7 release. Best known extensions in the JED at the moment are: NinjaBoard and Ohanah. Ninjaboard doesn't even cost you anything, so that is a nice one to check out first. Ninjaboard is for instance used by the JCE Support Forum. When using those extensions, the Nooku-framework is automatically installed (if it is not allready there). Other Joomla!-extensions still work.

REST and Nooku Server
One of the advantages of extensions built with the Nooku-framework is that they have a REST-interface out of the box. Internet-applications will be more and more connected with all kinds of apps. And REST has become the standard for that. There are several initiatives to build a RESTful API for Joomla!, for instance http://techjoomla.com/joomla-extension-news/joomla-rest-api.html. Those projects have to adapt a whole list of existing Joomla!-extensions in order to provide a RESTful-interface for them. When you build a Nooku extension, you get the REST-interface with it. No extra coding needed.

Nooku-developers are putting a lot of effort at the moment in a Joomla! 1.5 distribution, called Nooku Server. Of course it has the Nooku-framework on board. It also includes the Joomla!-1.5-framework, so you can still use your other Joomla! extensions. But the core Joomla! 1.5 extensions are now being refactored with the use of the Nooku framework. The functionality and database-scheme are unaltered, for backward compatibility. But those components now have a REST-interface out of the box. Other nice features of this distribution: multi-site and (in the near future) multi-language.

Compatible with 1.6, 1.7 etc.
Another strong point of extensions, that are made with Nooku is, that they can be used in different versions of Joomla!: 1.5, 1.6, 1.7 etc. So: you write once, and upgrading is no problem. The intention to keep that compatibility is very clear. For me as a developer that is a good thing. There even have been positive tests to use Nooku in Wordpress, so your applications can have a broader use.

Less code, less work, less bugs, more result
When you write a Joomla!-extension, a lot of code is always the same. Recently Marius van Rijnsoever did some tests for duplicate code in Joomla! 1.6: with a detection threshold to 5 minimum consecutive lines he showed that 50% of joomla core code is duplicated in one form or another. When building an extension you often start by copying some of that basic code from another extension; subclasses for JModel,JView, JTable, etc. One of the basic things in Nooku is: let repetitive tasks do by the framework. By the use of "convention over code" a lot of code doesn't have to be written anymore. Combine that with more flexibility: everything in Nooku is extendible and overridable. Everything can be made, but defaults don't have to be coded.

Every advantage has it's disadvantage
As the famous Dutch soccer-player and Ajax enthusiast Johan Cruijff would say: "every advantage has it's disadvantage" (and the other way around). If you want to develop more advanced extensions with Nooku, then you'll have to put quite some time in learning it; more than when you just learn how to use the Joomla!-framework. There are some tutorials and there is a wiki, but most of the information has to be learned by reading the code and by trying and asking. Fortunately there is an active mailinglist with a lot of helpful members. The framework is still under heavy development and you have to stay alert to keep your extensions working with the latest trunk. Also, there is no strong emphasis on DDD and ORM, which makes it less fit for enterprise level applications, but that is not much different from the Joomla!-framework. However, there are plans to use Doctrine in a future version of Nooku too. Another bigger application that uses Nooku, Anahita Social Engine, developed their own ORM.

No competition
So, Nooku gives exciting possibilities to develop Joomla!-extensions. As a developer I'm very glad with that innovation. Some people see Nooku as competition, but I don't understand that. I have no financial interest in it, but wholeheartedly I can say: Nooku is one of the best things we have in Joomla!. Especially for developers it is very interesting.