Monthly Archives: January 2009

Cache’ Zen for our AJAX Platform

Violating the rule of thumb about saying something nice first, my last blog entry talked about how the Cache’ language based on MUMPS, COS, does not resonate with me. Now for the good news regarding the platform I selected for our software…

Zen is a framework for doing AJAX with MultiValue BASIC as the server-side language and JavaScript as the client-side language. This permits us to use a richer data model than an RDBMS like MySQL, PostgreSQL, SQL Server, and many others. MultiValue is a platform that has proven (even if only through many, many anecdotes) to be a high productivity environment. We are starting this project with developers who have worked in the MV space, several of them for decades. 

Other languages can be used on the server-side with Zen too, with the most common one being COS. So, not only is this a MultiValue AJAX platform (how cool is that?), it is not limited to the MV space. It makes the umbrella bigger for those of us who have been working in MultiValue.

Cache’ is a highly scalable platform. While in the first ten years we might still have a typical amount of data and use, our software needs to scale up for significant use. We need a platform that can offer us all of the -ilities: scalability, maintainability, reliability including those that don’t end in “ility” such as security and performance.

Additionally, Zen comes with reusable components and a community that is adding to these. These can be specified in a “Zen page” using XML so you might include in your source code a form with a field that is bound to a model, such as a MultiValue file (or logical file).

<dataController id=“source” modelClass=“My.File”  />

<form controllerId=“source” id=“myForm” 
    groupClass=“snupform” enclosingClass=“snupencform”>

<text label=“MyField” id=“MyField” name=“MyField” 
   dataBinding=“MyField”
    onvalidate=“return zenPage.validateMyField(zenThis.getValue())” 
    invalidMessage=“This is not a valid MyField value”  />

</form>   

This should prove to be a very valuable AJAX platform both for developing and maintaining software. The Cache’ toolset that blends MultiValue and AJAX is named Cache 2008.2 and was generally available last year, so it makes some sense that we are just getting out of the gate, although we have been using it for more than a year. There is a learning curve.

The most difficult part in gearing up, other than the fact that this is a sweat equity endeavour and only a couple of people are actually coding so far, is that we are learning to speak MVBASIC enhanced for object-oriented programming, combined with JavaScript and XML specifications (as above) with the examples and documentation primarily written in Hebrew. OK, maybe it’s not Hebrew as we need not read it from right to left, but equally as cryptic to me.

There is another difficulty, which I thought I had better in hand when I started. I had given a couple of talks about AJAX, such as this one. I had written a few examples of AJAX using OpenQM, an open source MultiValue database, and PHP on the back end. I had an initial understanding and a bit of a feel for writing AJAX applications using the prototype library. For me, understanding this client-side framework did not translate handily into using a server-side framework. People who started with a server-side framework for their web pages, even for non-AJAX work, such as JSP, ASP, or Cache’ Server Pages, CSP, are likely further along for using Zen than I was with my prior client-centric approach that reaches in to use server-side services.

You can see that I am justifying my slow start-up with Zen. I have been working to learn and write in this new environment for more than a year, along with trying to teach what I have learned to others, and I have developed nothing resembling a year’s worth of code. No one on the project is to the point where they feel they can pound out code, but I definitely feel more confident in that regard now than I did a year ago. Please note that I have no doubt that if we were each working full-time developing software for SnupNow, we would be much further along, so existing companies with paid software developers are not likely experiencing the learning curve to the same extent that we are. 

Now that we understand this framework a little better and are further along with our application platform, we need to make some more reusable code that can help both our developers and hopefully also others who are using Cache’ Zen with MultiValue. The bottom line is that the gear up has taken a while for reasons that are still somewhat mysterious to me (although I have a list of possibilities), but that I am still committed to and excited about using this platform for the long haul.

Perhaps it was in Peopleware that DeMarco and Lister quoted a restaurant menu saying “Good cooking takes time, if you are made to wait, it is to serve you better.” Maybe it was another book that I read more than two decades ago, but I don’t feel like scanning my bookshelves to check. While I am not purposely coding slowly, I’m pretty sure it was Aesop who indicated that the tortoise won the race.