Puakma: Under the hood

I'm Brendon Upson, jack-of-all-trades, master of one or two. I'm talking about life running a small ISV tackling business issues and leaping technology hurdles in a single bound.

webWise Network Consultants is based in Sydney, Australia and develops the groundbreaking Tornado Server technology.

New stuff

Filed under: by Brendon Upson on 2006-08-28

We have a new release of Tornado just around the corner. The big changes in this release are the updated system applications: /puakma.pma, /system/admin.pma and /system/webdesign.pma These three applications are oooooooold and easily had the oldest code of any Tornado app inside. For example webdesign was the first app created in 2001 and until recently still had code from that era in it! As you can imagine a few things have changed since then, now some actions that previously took maybe a page of code now have only a couple of lines.

The biggest change is probably the introduction of TableManager. TableManager is a brilliant class that makes dealing with relational databases very, very easy. It came into existance around 2004, and since noone likes to go back a redo a working application, webdesign et al remained severely outdated.

We are just putting the finishing touches to the admin application and will shortly after make a new release. Here's a sample of what the new look and feel holds. The layout is based on the fabulous Sinorca Open Source web template http://haran.freeshell.org/oswd/sinorca/ .



Templating like a madman

Filed under: by Brendon Upson on 2006-08-23

The new project we've been working on is a front-end to hide the ugliness of Tivoli and help with a rollout of new desktops throughout an organisation. Tivoli really does seem to be an unintuitive beast. Flexible, yes, if you enjoy arcane commandline scripts to do what (to me) seem like fairly trivial functions. Did I mention expensive....? Anyway, their new Tornado web application will hide all of this joy and allow even the most technically challenged deploy and remove software from remote machines with a couple of mouse clicks.

There will be a few user groups using the system and in order to keep the coding simple (and cheaper for the client) we have split the code into 3 .pma applications - one for each user group. Each user group doesn't have much overlap in functionality, but the look and feel is the same and we have built a shared java library of commonly used routines that all the applications use. Hmmmm, now how do we keep the designs in synch so that all apps get the correct and most up to date shared components. Enter Tornado's built-in design inheritance.

Design inheritance is something Domino developers have taken for granted for years and most other development platforms ignore. It is quite simple and incredibly powerful. You mark one .pma application as a template by giving it a template name eg "myTemplate" then in the actual application you say that it inherits its design from "myTemplate". That's it. There is a scheduled action inside the/system/webdesign.pma application that runs every morning at 4am and makes sure that everything in actual application matches the template (except for some application properties and database connection settings). All automagically. Just like Domino we also go to the next level. You can nominate individual design elements (for example a page) to inherit from a template. This is how we have implemented things in our current project.

The current project has one application which is marked as a template called "APP_Core". The common design elements inside each of the actual application have their inheritance property set to inherit from "APP_Core". Too simple. If we need to update things during development we just issue the console command "tell agenda run /system/webdesign.pma/RefreshDesign" and the scheduled task manager (AGENDA) will force the design refresh to run. Almost immediately all applications are synchronized to the template.

Domino has the ability to flag individual design elements so that they are NEVER touched by the design update process. Working with Domino for a number of years I have seen this cause absolute catastrophies or confusion. For this reason I have purposely not included this "feature" in Tornado.

For all the Domino guys reading, I'm sure you're saying "yeah? and?" Domino has done that for years. For everyone else, I hope that was a nice introduction to the power of templating. 

Fun with Tornado

Filed under: by Brendon Upson on 2006-08-16

One thing I really enjoy is messing around inside Tornado to make it do some cool new thing. This week it was rewriting the various incarnations of LDAP authenticators and making one that works reliably with most LDAP servers. See, depending on the schema each directory has different attributes and layout so requires different queries and processes to get the data out. The catalyst for getting stuck into this was making Tornado authenticate against Microsoft's Active Directory.

I also spent some quality time with updating the RefreshDesign scheduled action to take into account individual design elements inheriting from a template. Domino people will be very familiar with this - non Domino people will have no idea what I'm talking about or why it's so handy!

So in the last two weeks Tornado talks to Oracle, authenticates with Active Directory and is easier to develop for using the new webdesign web app.

Busy, but it's fun! 

Dragged again, screaming from the comfort zone

Filed under: by Brendon Upson on 2006-08-07

It has been a whirlwind few weeks. Just as I was relaxing into a beautiful daze of complacency a new customer dragged me back out screaming. 

We now have a new Tornado customer who has engaged us to build a web deployment system to run on top of their Tivoli installation. Basic principle is helpdesk and workstation deployment people can go to a secure internal web page and and through a click or two send a software package to be deployed on the workstation. Precisely the work Tornado was designed for.

Of course there were a few hurdles to leap. First, this is our first customer using Oracle, so some tweaks had to be made to the webdesign app (table building logic, eg CREATE TABLE ...) and to the Tornado core, specifically the HTMLView class.

The webdesign app has undergone a HUGE overhaul. This started prior to the new customer and took a little longer than I would have liked to get it all working. The old webdesign interface was heavy on html, contained some clunky (and sometimes IE only) javascript and a few "spacer.gif" images for good measure. These are all gone now, replaced with a fresh new look and extremely light css based layout and a little ajax thrown in for good measure. The wedesign app is the oldest in the fleet, and most neglected - it always worked well enough to not bother rewriting.

The HTMLView class is used inside Tornado to render lists of records from a database (and used behind the <P@View @P> tag). Basically you throw an SQL query at it and it will render in full html glory a representation of that recordset, which you can also scroll through using next and previous. The really bad news is each database vendor implements the LIMIT clause in a different way - or not at all. Oracle's implementation is questionable (and don't even start me on Microsoft SQL Server!). The real benefit of HTMLView is that you just say "SELECT * FROM ATABLE ORDER BY Name" and the HTMLView class takes care of all the hard work. Using LIMIT means you only have to deal with a small subset of all the records in the table. Short answer is HTMLView got a good reworking to be able to deal with Oracle. Whew.