What happened to the “Learning Nooku” series from last year? Yes it stopped. It stopped abruptly.
Why? Because I got overwhelmed by the torrent of improvements in the Nooku Framework. Yes friends, since I wrote my journey a year ago a lot of things have changed. A lot of things I wrote are now obsolete! So I will archive my posts, and maybe write another one.
Here’s a VERY brief summary of what’s new.
REST is the architecture that powers Web 2.0 and beyond. Any application that is properly using Nooku will automatically be RESTful without extra work. Just use the Nooku’s controller and database package, and you’re all set. Your app is already compliant on REST specifications. Even if you don’t completely understand REST, just understand Nooku(which is really easy) and everything will be taken care of for you!
Another powerful and fun improvement in Nooku is the Controller behavior. This is really neat concept that will make your Nooku code even more reusable. One year ago, Nooku developers are already praising Nooku for helping them reuse and organize their code. How much more now! Controller behaviors puts some weight and clutter off your main controller’s code and forces you to code beautifully by reducing tight coupling and increasing reusablity!
Basically, nothing much have changed in how views and templates work. But some improvements are notable like the new ‘Chrome’ and ‘Module’ filters.
The Chrome filter wraps your template’s output into a Joomla module wrapper. This will make your app look more compatible with the current template that Joomla is using. This concept is already implemented by Ninjaboard. Did you notice how Ninjaboard adapts(like a Chameleon) to any Joomla template with dark or light theme? Amazing isn’t it? You can use that same technology in your Nooku Apps with just one piece of code!
The new Module filter allows you to insert a piece of output to any Module position in Joomla. This is another neat concept that gives power to developers. More information about this change can be found here: http://blog.nooku.org/2011/08/say-hello-to-the-dynamic-module-injector/.
One big change that can break your old Nooku code is the KFactory refactoring. It is now renamed to KService. The refactoring was done to complete the implementation of the Service Oriented Architecture. Before this refactor, services(which are actually objects) are accessed through an identifier using this format:
[application::]type.package.path.name
Now it’s using a more standardized format which everyone is familar with. The Uniform Resource Locator(URL) http://www.ietf.org/rfc/rfc1738.txt. The format now looks like this:
type:[//application/]package.path.name
Another change is the removal of KFactory::tmp. Use KService::get() instead. KService::get() will always instantiate a new object much like KFactory::tmp(). But if the class is intentionally a singleton(implementing the KServiceInstantiatable interface), KService::get() will return the single instantiated object.
So how does this help you? Well, for one, the object identifiers are now more familiar and is actually following a standard. Which means it’s easier to explain. And of course, this improvement has also allowed some optimizations that makes KService more efficient.
Better look inside the Nooku code to see it in action or check the wiki about this change.
But we can’t list them all. These are just some of the significant improvements. But by the looks of it, I believe that the best time to learn Nooku is now. It has gotten more stable and a lot better than the version last year.
The new features of Nooku are so awesome! But of course it will take some learning curve. Once I feel that it reached a certain level of stability, I will continue writing about it in my blog.
© Copyright 2010