Do these screenshots look like Joomla! to you? Well, they are! They’re not from the Joomla! CMS though, they’re from a Joomla! application, based on the Joomla! Framework, and running in a terminal window. Betcha you didn’t know that was possible!
Joomla! without Joomla!
JApplications work on a completely different level than extensions. They’re more or less standalone web application, based on the Joomla! Framework, in the same way a Ruby on Rails application is a standalone web app based on the RoR framework. When you install Joomla! CMS on your site, you’re actually installing four applications, along with the framework.
- JSite (the front-end of your site)
- JAdministrator (the back end)
- JInstallation (the installer, which you are supposed to delete when you’ve finished installing J!)
- JXMLRPC (for the XML-RPC protocol, but that’s a subject for a different post).
As far as I know, no third party Joomla! applications available at the moment, except for one: RokBridge, a bridge for J! and PhpBB3, which Johan built for RocketWerx. It is possible to create applications that are truly standalone as well. You could for example create a CRM web app, that uses the framework, but that is totally independant of the CMS. Instead of starting from scratch, you could use some of the features of the framework, such as authentication, plugin support, MVC, … to build you own solution. And, as you can see from the screenshots, you can even use it outside of the web or the browser, to make a command line application, that runs in a terminal.
Writing unit tests for a Joomla! extension, requires that you can mimick the environment in which the extension runs. It also requires that you can run the tests from the command line, so you can execute them from inside an IDE, from a Phing or Ant script, etc. So that’s how I got the idea to write a Joomla! application that has the single purpose of recreating a Joomla! environment in which the tests run. The actual tests are then passed on to PHPUnit. It only took me a couple of hours to build. All I did was basically copy the JSite application, remove everything I didn’t need, and add PHPUnit to the mix. Easy! The biggest task now is of course to write more tests, so when we show Nooku to the world, we know it’s working.