Friday, August 29, 2008

Rel: Beyond SQL and OOP

Don't get too excited yet! Rel is still in the early formative stages as a product. Currently it's only usable as a teaching aid. So, what is it? It's the first (only?) implementation of a relational database. Ignoring the ANSI SQL guidelines, which some scholars feel are inherently flawed, the project has as it's driving goal to implement relation theory in a software product.

I have to admire some of the design principles being followed by the development team. Things like
  • never optimize early - currently, the product is written in java to maximize platform breadth without killing the small team with multiple build environments. The plan is to port the project to C or some other low level language after it is complete to gain performance.
  • free and open source - need I say more.
  • rel is essentially a working prototype for the real product(s) that come after. It's the design spec for those products that actually works.
There are a couple of aspects of the language (Tutorial D) that I find interesting
  • there are no nulls - you can do this with sql products, but it can be very painful. You wind up with lots and lots of tables and joins
  • there is no autonumber feature - complete reliance on candidate keys.
  • attributes(columns) do not have a specific order. No commands rely on the position of an attribute in a relation (table)
  • there is no restriction on what may go into an attribute. You can define whatever types you need, although you may have to drop out into a different language to do that. Even other tables can be contained in an attribute of a tuple (row)
While it is certainly not ready for use as a product, even for small projects (there are no drivers that I'm aware of) it certainly is an interesting development and might point to the future of data storage many years down the road.

You can visit the Rel site here.

Monday, August 25, 2008

Strange Ant/Eclipse (Ganymede) error

This had me going for a long time trying to figure out what the heck was going on. Any time I tried to run an ant task from inside eclipse I would get this "waiting for virtual machine to exit" message and ant would just hang. Nothing in the console at all to tell me what was wrong.

If I ran the same thing from the command line, everything worked fine, so it must be some eclipse setup thing that's screwed up.

To make a long story short, for some reason, the ant home directory was not pointing to the ant install in eclipse.

To fix, go to window | preferences | Ant | runtime | Ant Home... and enter the path to the embedded ant install (for me, this is: C:/Program Files/eclipse/plugins/org.apache.ant_1.7.0.vblahblah

For some reason, it was pointing into my workspace directory.

Go figure.

Friday, August 08, 2008

CF9 Wish

Ok, so I'm a little late to the game on this one. The cf9 wish lists were going around a few months ago, but I'll chime in anyway.

I like that we're going to be seeing an expansion of cfscript to the point that you can write an entire cfc in script. A cfscript version of cfquery would be really nice. It'll be interesting to see how cfqueryparam gets handled because that tag is so important and so ugly.

The one thing I didn't see mentioned was support of xslt 2.0 and xpath 2.0. Both of them have been W3 recommandations for a while, but it looks like the development efforts of xalan have stalled. It doesn't look like anybody is working on it at all. Maybe cf9 can include the saxon 9b parser instead. You can get the saxon parser working in CF8, but it requires a little hacking. I always tend to shy away from those types of modifications simply becuase I tend to forget about them when the next CF version comes out and something invariably breaks.

MXUnit 1.0

I've been remiss in my blogging! I don't have a single entry about mxunit. The project seems to be going really well thanks to the dedicated work that (theguys at mxuint dot org) are doing (yours truly is probably the biggest slacker of the bunch).

If you haven't looked into test driven development, here are a few links to get you started:

A good readable book to get the juices flowing: Test Driven Development: By Example
The mxuint website
The mxuint blog
a good online reference


Now that mxuint has made it's 1.0 debut, there are a lot of interesting thoughts floating around the group regarding what we can do next. For me, I think the most compelling idea is that it would be nice to be able to use the same framework to do other sorts of testing. In particular, finding some strategies for testing THROUGH the database and pushing into the area of functional testing.

The db problem is a tricky one since in order to write good tests for that, you need to have your database in a known state for each test. A lot of people persue the mock strategy, but to me, that only gets you so far. A lot of my apps have a great deal of logic in the db itself which mocks short circuit. Use of transactions would seem like a good idea, but the devil is in the details. Screw up a rollback and your db could wind up in really bad shape. I like the use of a backup/restore strategy, but performance can be a big issue as well as database locking. Oh, and forget about running it against a shared development database. Hopefully we'll get something nailed down to help with this, even if it's just a set of processes you can implement.

Functional testing is where the real fun comes in. Scenario and output testing can take so many forms that it's going to be fun to tackle some of that. If you have any thoughts on what you would like to see here, make sure you post them over on the mxuint blog. We're still gathering thoughts on the subject, so it would be nice to see what everyone is thinking about.