JADE (programming language)
JADE is an object-oriented programming language that exhibits a seamlessly integrated object-oriented database management system. It is designed to be an end-to-end development environment, which allows systems to be coded in one language from the database server at one end down to the clients at the other.
As a programming language, its main competitors are Java and .NET, while as a database it competes with other object-oriented database and post-relational databases such as Caché and Matisse as well as traditional relational database software packages such as Oracle and Microsoft SQL Server. Like Java, JADE is a commercially supported product that is available free to developers.
Language
In terms of syntax, JADE is very similar to Pascal. It was actually based on the language Modula-2 which was based on Pascal. However, being a much newer language, it has many more innovations.
Programming model
Like all of the other popular programming languages used to create database-driven software, JADE is object-oriented to the core. JADE was designed to have all the most important features of object-oriented programming, but it was also designed to make programming simple, and so does not exhibit the full range of tools that some other languages do. For example, JADE does not support the overloading of methods or operators. This may seem like a big loss to some programmers, but for programming database applications which is what JADE is designed for, the parts that are left out do not end up being major drawbacks, as they are almost never needed.
Originally JADE did not support interfaces or static variables, but interfaces are planned to be included in the JADE 6.1 release, which is expected to be out September 2005, and static variables are intended to be released with JADE 6.2 - expected Quarter 3 2006.
Classes in JADE are kept together in schemas. Schemas serve the same purpose as packages in Java or namespaces in .NET, but they are much different in the fact that schemas have a hierarchy, and inherit classes from superschemas. This becomes useful especially when programming using the Model-view-controller methodology, as model classes can be put in one schema, then the controller and view classes can be built on top of the model classes in a subschema.
Program structure
JADE applications are structured quite differently from most programming languages in the fact that JADE programs are not developed by writing code into long files and then compiling all the files together in one go. JADE programs are actually developed using a user interface that allows programmers to visually create classes and define their properties and methods. Instead of locating methods in large files, programmers select the method they would like to edit and only the code for that particular method is displayed. Also instead of compiling all the code of a program at once, in JADE, each method is compiled individually as soon as the method is completed, meaning code can be checked immediately.
All the code for a JADE application is stored in its object-oriented database. This has a number of advantages. First, it allows for multi-user development, as the database maintains concurrency control. Second, with each piece of the code being a separate object in the database, in a lot of the cases it is possible to recode the system while it is live, online and in use as long as the parts of the system being changed are not in use.
Features
The main goal of JADE was to give programmers what they wanted — a seamlessly integrated programming language that would allow developers to just create one application that would go from end-to-end instead of having to write three separate applications for the database server, application server and presentation client and then write the code for them to communicate with each other.
Object-oriented Database
The most striking difference between JADE and other object-oriented programming languages is that its object-oriented database is a native part of its language. For example, when creating an object in JADE, it can be created as transient or persistent. Creating an object as transient is just the same as creating objects in other object-oriented programming languages. The object is simply created in memory, and then lost when the program ends. On the other hand, when an object is created as persistent, when the program ends, the object will still exist and be there the next time the program starts up. In other words, when an object is persistent JADE automatically works in the background to store and retrieve the object in the database when necessary.
There are very few differences between manipulating transient and persistent objects. It has been said that JADE makes it appear to the programmer as if all the objects in the entire database were in local memory. Most of the time, JADE's object-oriented database is used in a multi-user system, and so this statement could be extended to say that JADE makes it appear to the programmer as if all the objects in the database were stored in some shared memory that all users connected to the system could access, even from different computers.
With all of the program code centralised on the database server as well the data, JADE achieves its goal of an end-to-end system, as JADE presents such a level of abstraction that all the client nodes can be programmed as if they were running on the database server. This is very desirable to most database programmers as they don't have to take a number of different technologies and link them together, they just create one application for everything.
The object-oriented database JADE uses is also inherently object-oriented, and so it eliminates the performance loss in an Object-relational mapping system where objects must constantly be converted from their object-oriented form to their relational form. Also like all other commercial database products, JADE has all of the standard features such as atomic transactions, locking, rollback, crash recovery and the ability to keep a Secondary database server synchronised with the main database for reliability and performance reasons.
Three-tier model
Often for database-driven software, the three-tier methodology is followed. This involves applications being split into three tiers — data storage, processing and presentation. Multiple computers, called nodes may be involved in each tier, and each has a different name. Database servers handle data storage, application servers handle processing and presentation clients provide the user interface. Traditionally, these three tiers would be created by combining three programs and having them talk to each other to create a single system. Having the different programs separate like this has many advantages, the main point that the system becomes scalable — that is, increasing the power of the system simply involves adding more nodes.
Designing a system like this gives the programmer a decision to consider every time they want to code in a particular function. They need to decide whether the function would run best on the database server, application server or presentation client before they begin coding as it will be difficult to change that decision once the functionality is coded into one of the tiers.
This is different for JADE applications, as they are coded as one application from end-to-end. When creating a JADE application, the programmer can think as if they were creating a program that be running on the database server — as if all the data storage, processing and presentation were happening on one computer. When the program runs on three tiers, JADE automatically knows to run all the code by default on the application server, and to send database requests up to the database server and user interface information down to the presentation client. However, it is very easy for the programmer to switch the location at which a particular method is run and move it up to the database server or down to the presentation client by changing the method properties. Because of this, the decision on where a particular piece of code should run can be made late in the development cycle, and refactoring code to run on different parts of the system ends up being a lot easier because of the way JADE allows end-to-end development of software.
Code Examples
In this section are some short examples of JADE code.
Hello World!
In accordance with tradition, the first program that most people ever write in any language is one that says "Hello World!" This is what the code would look like in JADE:
rh3_helloWorld(); begin app.msgBox("Hello, World!", "Hello, World!", MsgBox_OK_Only + MsgBox_Information_Icon); end;
History
The concept of JADE was originally conceived by Sir Gil Simpson and is currently maintained by the Jade Software Corporation. The first version of JADE was JADE 3, released September 1996. Currently, the latest version of JADE is JADE 6.0.22, but this is planned to be superceded by JADE 6.1 in September 2005.
See Also
- Object Oriented Programming
- Object Oriented Database Management Systems
- Object-relational mapping
- Database Management Systems