Speed through being objectionable
Another form of speed comes from the basic database being object-oriented. Let’s pull a few hymns from the Java hymn-book as we see how this comes together. The obvious advantage is the portability of objects. If you have a common, working object doing as it should, converting that object to do other things (either in derived objects or objects with similar behaviours – and of course both) is considerably easier than breaking out the editor to wade through acres of near-identical but subtly-different relational statements.
InterSystems have a facility which they call JA-LA-PE-NO, for “JAva LAnguage PErsistence NO mapping” which uses a class called Object Manager to painlessly instantiate POJOs (Plain Old Java Objects) and ensure that they are persisted afterwards.
To use Jalapeño, simply include cacheDB.jar in your CLASSPATH; import the POJO package; and instantiate Object Manager. Very few steps for permanent objects, no?
However, there’s even better news: you need only develop a suitable SQL schema (an automatable process) and point Object Manager at the “schemaed” relational database to achieve the same effect with that.
Speed through systematism
Caché in a web-server manages to include the business logic within the database rather than the other way around (typical web scripting) or the complete separation typical of an application server. This means that the slowest internal link is pushing out the HTML at the end rather than the business logic, which can bolt along at full speed.
It also takes the big effort out of the actual serving of the web pages themselves, and tucks it away within the business logic, so the web-service components (such as serving of images, plain CSS and the like) can proceed independently at full speed. While some of these can be split off into separate servers (static images and CSS can be separately served, for example), this often complicates and confuses the web service which is the key reason for the whole system’s existence. Far better all around to use a single server and better structure.
Developing some speed
One thing which Jalapeño and similar systems make plain is that Caché provides a speed boost to development time itself. There are two main ways to take advantage of this; one is simply to deliver sooner. The other is to spend some of the saved effort in delivering a better outcome. This aspect can amplify itself, if done carefully, since effort put into designing a better outcome can often make use of further time-saving features when providing said outcome. For example, rewriting a relational part of the application to make more effective use of object-oriented methods and principles can both speed up and debug that section of code.
Herding CATs
Another aspect of Caché which provides a development speed-boost is CATs. A CAT is a Caché Application Tag, which is a HTML “word” which invokes a Caché feature when embedded in an HTML page. This means that standard HTML editors can be used to prototype the CAT pages, so the layout part of development can be easily farmed out – or to put it another way, what the layout people see can become real code.
Another interesting feature of CATs is that they are extendible. This means that code can be produced and later the CATs can be altered to work better, without necessarily changing any of the coded pages. Alternatively, CATs can be embedded for future features, and defined to do nothing until those features are actually developed.
For a third alternative, one set of pages can be produced, then wedded with CATs defined to achieve different ends, be it an admin/user split, a departmental change, or the same pages handling different data.
Getting the CATs into the bag
Caché is available for a fairly wide variety of systems, so you can grab a random PC from the office, install Linux on it, then Caché, and run some experiments.
Caché is available for free with an unending single-user licence, which seems to be ideal for testing. There is also a “MultiValue” version available, geared to migration from “UniVerse, UniData, D3, and jBase”. It’s also free. “Free” PC, free OS, free database; it’s hard to beat that for a budget.
About Intersystems
InterSystems Corporation is a technology innovation leader in database and integration software. The CACHÉ post-relational database, Ensemble rapid integration software and HealthShare health information exchange platform enable developers to quickly create, deploy and integrate high-performance systems. InterSystems has offices in 22 countries and provides support to customers in 88 countries.