Learning Nooku Framework: Setting it up.

Nooku Framework is a big step forward taken by a team of developers to make Joomla Development easier.  I appreciate their work, but the big issue with the Nooku Framework is the super fragmented and crappy documentation.  I’m starting to learn to code in it, but finding current and good documentation is the hardest part.  The first reactions have been that the auto-magic has been both nice and scary.

Nooku Framework is a big step forward taken by a team of developers to make Joomla Development easier.  I appreciate their work, but the big issue with the Nooku Framework is the super fragmented and crappy documentation.  I’m starting to learn to code in it, but finding current and good documentation is the hardest part.  The first reactions have been that the auto-magic has been both nice and scary.

As for the documentation, I don’t really blame the developers since it looks like they’re working on the things so much (and changing things around on a daily basis) they probably can’t document… yet.

I decided to put something together since there isn’t a good one stop resource for it as far as I know.  Also, I kept on getting errors for the backend of Nooku Server (all inclusive package of below items) so I had to put this together.

Note: this is for their trunk release 12.1 (or something like that).

 

My Assumptions:

  1. I am going to assume that you are on Fedora Linux (Centos 6, F15 or F16 probably is similar enough that it works).
  2. I’m assuming that by this point, you know how to use the command line, mysql, phpmyadmin, apache and SVN.
  3. I’m assuming that you know Joomla very well.
  4. You have shorthand enabled for PHP (<?=?> for echo)
  5. You have PHP 5.3.X

 

Setting up Joomla

To start, download Joomla 1.5 latest from http://joomla.com

Install it as usual by creating a new DB/DB user pair.  Nothing special yet.

We will refer to your web root as ROOT (/var/www/html/ on Fedora/Redhat) and your Joomla root as SITE (/var/www/html/JOOMLA-INSTALL).

 

Getting the Nooku Framework Trunk

Create a directory called “nksource” on ROOT.  We will be pulling a lot of the stuff from the Nooku subversion repository into “nksource”. To make code updates easier for us, the Nooku developers created something called “Symlinker” which creates convenient symlinks from the SVN checkouts to the Joomla install location.  We will be using the tool to create our development environment today.

  1. Go into “nksource” :
    cd /var/www/html/nksource
  2. SVN Checkout their latest Framework as “nkframework” :
    svn co http://subversion.assembla.com/svn/nooku-framework/trunk/code nkframework
  3. SVN Checkout their latest Nooku Components as “nkcom” :
    svn co http://subversion.assembla.com/svn/nooku-components/trunk/code nkcom
  4. SVN Checkout their latest tools as “nktools” :
    svn co http://subversion.assembla.com/svn/nooku-tools/trunk nktools

“nkframework” is the actual framework, “nkcom” contains components created by Nooku developers to help us build frameworks (helper components), and “nktools” contains tools for setting up and testing Nooku Framework Apps.

After you’ve downloaded those source repositories, you’ll need to issue these commands (unless you have it installed)

pear install --alldeps Console_Commandline

This will install the required piece of php for the “symlinker” package which will be explained below.  If you don’t have pear installed, use yum.

Next, go into the symlinker package location and sym-link the required Pear libraries from their directories:

cd ROOT/nksource/nktools/symlinker/
ln -s /usr/share/pear/PEAR PEAR
ln -s /usr/share/pear/Console/ Console

This will allow the “symlinker” to use those libaries directly.  You should sym-link the “symlinker” script from this directory to your own ~/bin.  If you don’t have a “bin” directory in your home directory, now would be a good time to make one.

mkdir ~/bin
ln -s symlinker ~/bin/symlinker

Now you can use symlinker anywhere.  You can use the symlinker command like below to setup the SVN Checkouts against your Joomla Installation.

symlinker ROOT/nksource/nkframework ROOT/SITE
symlinker ROOT/nksource/nkcom ROOT/SITE

 

Registering the Koowa Plugin Manually

The Nooku Framework is basically a system level plugin.  The plugin’s name is called “Koowa”.  Since we just copied and didn’t really “install” in the traditional Joomla sense, you have to run a SQL command on your database.  You can do so using the command line or phpMyAdmin (I used the latter for convenience).  Make sure to replace the “#__” with the default “jos_” or whatever you used as the database table pre-fix during your Joomla installation.

INSERT INTO `#__plugins` (`id`, `name`, `element`, `folder`, `published`)
VALUES ('0', 'Nooku Framework', 'koowa', 'system', '1');

This will enabled the Nooku Framework on your Joomla system.

Also, at this time, make sure that your Joomla configuration.php file has as its database as “mysqli” instead of “mysql”.

 

DONE!

You should now have a successful installation of Joomla with Nooku Framework.  Many of the helper components also have database SQL files to be run under the “install” category, but since we’re not there yet, we won’t play with that today.

I will be writing up about my first test CMS app built on top of Nooku Framework 12.1 soon.

 

Some Resources I Used to Figure This Out.

http://nooku.assembla.com/spaces/nooku-framework/wiki

http://blog.bedre.no/nooku/tutorials/installing-nooku-framework-with-the-symlinker/

http://blog.bedre.no/nooku/resources/nooku-links-resources/

http://israelcanasa.com/post/1115813980/learning-nooku