ActiveRecord Generator

ARGen256

Real Studio makes doing database applications very easy.  The strength of the database classes in Real Studio is that they’re generic enough to do almost anything.  The drawback to the database classes in Real Studio is that they’re generic enough to do almost anything.  No contradiction there, eh?

Database programming in Real Studio can be very tedious.  It’s the exact same code over and over again.  I generally have Load, SaveExisting, SaveNew, and Validation methods where I am literally just using the same combination of SQLSelect, SQLExecute, InsertDatabaseRecord statements over and over again.  Since the IDE has no idea what tables and fields are in the database it can’t help me detect table and field misspellings (a common issue) or tell me when I’m trying to convert data improperly.  Depending upon the database data conversion errors will happen silently with no errors (I’m looking at you SQLite and MySQL).

For years we’ve been using ActiveRecord for Real Studio.  It’s been a great way to abstract all the boring and tedious database stuff out of the way and let Real Studio work with us and for us.  It’s very nice to have AutoComplete work (most of the time) and the compiler warn of datatype mismatches.  It’s been a great timesaver but sometimes the work involved creating the classes in Real Studio was a hindrance.

About a year ago we were working on an conversion project where the original app was created in Microsoft Access.  The database had a hundred or so tables and some of those tables had two hundred fields in each table (I didn’t say it was a well designed database) and the client wanted a Real Studio version of it for Mac and Windows.  Doing all that work of creating the Real Studio classes would have taken twenty or thirty hours (or more) so we came up with a generator to create the classes for us.

This is where ARGen, the ActiveRecord Generator, for Real Studio was born.  Since then we’ve used it in a couple of projects and found it very, very handy.  It is now available in our web store and lets you scan an SQLite, MySQL, PostgreSQL or Microsoft SQL Server 2008 databases.  It then simply generates the necessary classes in a Real Studio XML file that you can open in Real Studio and copy and paste the namespace data files into your own application.

ARGen conveniently adds a generic DBOpen, DBClose, and Register functions into the namespace module letting you start using ActiveRecord as quickly as possible.  Each ActiveRecord class then has FindByID and List shared methods for your convenience.  Naturally you’ll add your own shared methods over time but it’s a good starting place for most developers.

You can try out ARGen for free but if you want to unleash its full potential it’s a paltry $9.95.  I think this is a steal since it might be saving you many, many hours of coding.

Downloads for the Mac OS  X and Windows versions can be found at http://www.bkeeney.com/allproducts/argen/ 

Purchase in the BKeeney web store here.

 

3 thoughts on “ActiveRecord Generator

  1. That was the missing tool for Active Record. And thanks for the affordable price. I’m looking forward to test it with my next database based project.

  2. I have been using this for a little while now. The tool now saves me five (very simple database/table) to hours (very complicated/many fields in each table) on every app I develop now. This is a great tool. if you do ActiveRecord, do yourself a favor and get this tool.

    sb

  3. Thanks for the kind comments. ARGen certainly makes life a little easier. It’s really time consuming to make all those classes by hand.

    Before we made it public, ARGen helped us use AR for a 100 table database with several of the tables containing 200 fields each. It would have taken a week to code all that. Instead it took 5 minutes.

Comments are closed.