Sysmod

News

9 October 2004 - Velocity Based Templates Working
This year we have moved to Velocity for generation of code, rather than having pure Java generate code. This is a much better method of writing the generators, and typically will mean that no Java will need to be written to support new languages.

Introduction

Sysmod is a simple "system modelling" tool primarily for Java developers, but with support for other languages (through the use of plugable code generators.)

When starting to work with java, I found myself constantly writing data objects to hold the contents of my database tables, filling from a ResultSet, filling from a HTTP Request, filling from XML etc. etc. It came up during a discussion amongst the developers that it would be good having a tool to automate it, and thus, sysmod was born...

Of course, the moment I started working on the project I found about 1000 other "code generator" or "object relational mapping" projects, but none of them were really "simple" to use, or didn't work the way we really wanted them to.

Why is Sysmod Different?

There are essentially two kinds of Object Persistance available today. There are native object databases which do not use relational databases at all. These systems are pure in a OO sense, but they suffer from a lack of compatible tools such as reporting engines. They also have various flavours of query systems in order to query the object database. Then there are object relational mappers, which try to map a OO structure to a relational structure. The object relational mappers tend to be complex, as they need to be able to be flexible enough to handle any OO structure in a relational context. Relational tables may be able to support this in theory, but often it increases the complexity of the database.

Sysmod is neither a true object database or a true object relational mapper. In simple terms we have accepted certain limitations to our object model in order to achieve an easy to use system. The most important benefit of the system is that our objects maintain a simple one to one relationship between database tables and data objects. This is not so say you cannot relate tables from one to another just like a relational database. What it does mean is that you do not have the flexibility of object relational mappers.

This is in effect a trade off. We have traded the flexibility of true object strucutres for the ease of intergration with a relational database. There is no need to manually map between data and objects, as this is all handled automatically. There is no need to code data persistance, and there is no need to manually create a database.

Sysmod makes use of a single model file which is XML based. From this model all the Java code and the database schema is derrived. Sysmod continues to be a core technology in our professional development shop through its simplicity and effectivness.