During the coming days I’ll be documenting how I am learning Nooku. I’m a total Noob to Nooku so this might help other Nooku noobs to learn the framework. For those who doesn’t know it, Nooku is a Rapid Application Development Framework for Joomla.
This is Part Zero of my series of posts about Learning Nooku.
This should be fun! I’m learning another PHP Framework - Nooku. I’ve had fun using Kohana 3 for a year but Kohana 3 is so easy and simple, there’s not much to learn anymore. I’ve heard many great things about Nooku, so I guess it’s time to see what the hype is all about.

Since hearing about Nooku in 2009 until now, I’ve just been reading about it. I just browse the code, check the examples, read the mailing list, see how things were done so I’d have a general idea of what to do once I actually code something.
As of the moment, Nooku lacks a solid documentation, or even a total beginner’s guide. So as my first contribution to the Nooku Community, I think it’s nice to document my learning process. I’m a total beginner to Nooku, coming from a Kohana background.
Since I am coming from Kohana, the natural approach would be to compare Nooku with what I already know. Something in the lines of “I do this and that in Kohana, now how do I do it in Nooku?”. But Johan(chief architect of Nooku) advised me to unlearn what I know, and approach Nooku from a clean slate.
I’ll take his advise. That’s gonna be the approach I’ll make. I’ll ask the most general questions and try to answer them, without comparing Nooku with what I already know.
I’ve never written a Nooku App prior to this post. I’m writing this from a noob perspective. That means I am describing Nooku as I understand it, and I might be wrong. For sure this is also incomplete.
A magic framework is a framework that does many things for the developer “automagically”. Many developers like this approach, but there are some, particularly me, who doesn’t like it. I don’t like “automagic”. One reason why I chose Django over Rails is because Rails does many things automagically. But Django still has many magics in it. One of the reasons why I settled on Kohana is because it doesn’t have any magic in it. Why don’t I like Magic? I don’t like Magic frameworks because they make common things really easy, and uncommon things really hard. I usually end up writing uncommon tasks, so magic frameworks rarely help me.
If I don’t like magic frameworks, why am I diving into Nooku? Because it’s a framework that doesn’t force me to use Magic. The magic is there when I need it, but if I don’t need it, I can simply discard it and still enjoy the bare minimum features that Nooku Framework offers.
I haven’t written any Nooku application yet, so I found this out when reading the Nooku source code. So maybe I’m wrong. But I’ll find out as I document my learning process.
Although not fully consistent, Nooku’s directory structure, class naming, object mapping, and database table/column naming are consistent enough. Knowing the conventions helps developers understand what’s going on with the code. If you see a class, you know where to find it in the file system just by looking at its name. If you want to access database objects, you’ll easily know how to access it because the object’s properties aren’t different from their database counterpart. The number one feature of a Framework should be Consistency. Nooku is grade A (and will soon to be A+) when it comes to consistency.
As far as I know, Nooku’s architecture allows developers to modularize their code to make it reusable, maintainable, and redistributable. Using OOP(Object Oriented Programming) makes frameworks naturally modular. If taken to the next level, we have an MVC(Model View Controller) architecture, take it again to the next level, and we have HMVC(Hierarchical MVC). Many frameworks nowadays stops at MVC. Nooku is one of the first, along with Kohana 3 to fully implement HMVC.
But Nooku doesn’t stop there. Nooku gives you many other tools to help you modularize your code. It does so by helping you implement programming design patterns such as Mixins, Chain of Command, Dependency Injection, BREAD, and many others. If you can’t see how these design patterns can help you, you must write an app. The best way to learn is to experience problems, and shoot them down with design patterns where applicable. You may have employed some of those design patterns without knowing it.
Then again, Nooku doesn’t seem stop there. Nooku was designed with modularization to the core. From its core objects to its derivative classes, even in its file structure and naming conventions, you’ll see how easy it is to modularize code!
I Imagine Nooku as an onion with many layers. It has a powerful core, as you go up higher in each level you’ll find awesome things that you can use to mix and match to use in your app. Each layer provides a certain kind of Magic!
I was overwhelmed by these things at first, but I’m guessing that once I grasp the basics, it’s gonna be a smooth sailing. I haven’t used frameworks that has this kind of modularization so it’s new to me. I don’t know if these are unique to Nooku so it’s certainly eye popping for me. But of course, I have only used Django and Kohana, and just read about other frameworks so I’ll see how it goes. Of course all frameworks are modular, what’s the use if they aren’t? But Nooku’s modularity seems to be different. I don’t know how to call it nor how to describe it in words. It’s just different from the things I’ve used.
Perhaps the best way to really understand all these things is to write an app. When you ask Nooku lovers to describe Nooku, they will use superlatives like “awesome”, “the best”, “amazing”, etc. Let’s see what they really mean. In the coming days and weeks I’m having an adventure with Nooku!
© Copyright 2010