Enigo Homepage
Client Login
User ID:
Password:

What Is Kansas?

Apart from the obvious, an agricultural state in the middle of the United States of America, perhaps best known for the mindnumbing flatness of the western portion of the state as well as for being the home of the fictional Clark Kent (aka Superman), Kansas is the name of a software package that maps relational database tables to objects within the Ruby programming language. Kansas was originally written by Avi Bryant as what he calls a quick hack to play with object/relational mapping ideas. It was packaged as an extra within his old Iowa distribution.

It is currently undergoing active development work to solidify its API and extend its capabilities and its robustness in order to make it suitable for production code. Consequently, it should be considered an alpha quality package at the current time, and is subject to change. So, anything said in this tutorial could change overnight. However, that said, the current incarnation of Kansas, while not terribly tolerant or informative of errors when used incorrectly, is suitably featureful to be very useful, and it is not likely that there will be substantial changes in the Kansas API as work continues on it.

Kansas is a rather lightweight package. It aims to provide a simple to use mapping of relational database tables to Ruby objects along with useful capabilities for defining relationships between these objects, interrogating the the data, and updating the data. The intent is for it to be a tool that easily handles the simple sorts of database interactions that make up the vast majority of interactions that an application has with a database. The tool should make the developer's life easier yet stay out of the developer's way when the developer wants it to. It should also have a light footprint, not significantly degrading the performance of database interactions nor itself consuming many system resources.

Kansas will be complete when it can do all of those things with a high level of robustness, with useful feedback to the developer and/or the application when things go wrong, and with a complete test suite, which it passes, that covers all of Kansas' intended capabilities.