Monthly Archives: September 2004

Nerd Alert

After the thousandth line of boilerplate database code, I decided I had had enough and it was time too look into something new.

Most multi-tier db apps these days consist of a database layer, a business object layer, and a presentation layer. The GUI and database update the business objects, so you should always have an accurate reflection of the state being modeled.

The major problem for a dev is that you have to map the DB to the business objects. Typically this involves a whole lot of diddling with type conversions as you get your programming language’s types into DB types and vice versa. The end result is nice though – you have a UI with no connection to your functionality – so if you need to turn your webapp into a full-blown OS-native application – it’s just a matter of writing a new presentation layer.

I have started to gravitate towards ORM (Object-Relational Mapping) and code generators to get through the mind-numbing CRUD and get to the fun parts.

The gold standard is Hibernate, but it’s Java and the .NET version is still alpha software.
Olero Software’s ORM.NET is fairly popular, but it appears to be abandonware which has now found a home on SourceForge.

I found a tool from France called LLBLGen which pretty much handles all the crufty filth associated with database apps. Point it at a table, click a button, and get sprocs and an object which models the table.

No more conversion of native string and integer types to DB-native types. No more dealing with NULL. No more creating and assigning parameters. You get an object, set the fields, call insert(), update(), or delete. Cake.

For simple tasks, you can use their free, one-way data tier generator. It’s a nice medium between the ORM world and the “SQL in the code” world.

Another task that I can’t stand is writing out the getters / setters (accessors / mutators) for an object, especially big ASP.NET User Control classes with 1000 form elements. Eclipse has a nice feature to let you automatically generate getters & setters from your private class vars, but VS.NET lacks the feature. Not anymore. It’s not perfect, but it works.
vsPropertyGenerator

All you devs out there writing SQL in your loosely-typed scripting language probably feel that I’m just making things too hard. All I can say is this: your apps suck.

Major drag, dude

Super busy lately and no time for the web site. Sorry kiddies. Your boy is at the edge of sanity and this website ain’t on the list of TODO’s.

Anyway here’s some bulletpoints to get everyone up to speed

* job sucks, got raise, sucks less, but still sucks. Turned down 2 gigs paying 20% over my current salary – why?

* summer 03′: 6 condos in my range. summer 04: 300 condos in my range. Something is up.

* Wife started her fulltime teaching gig after years of busting ass. Cheers, baby! Heavy laminating going down on a daily basis.

* Saw the Muffs with Tibsy and Dru Down friday nite. Rocked. Kim is mellowing, less shreiking.

* Off the chronic and it feels so right. Minor relapse, but it ain’t no thang.

* SNAFU with the dealer meant waiting 4 hours in Escon-shithole to get the passenger side window working on the Mini. Can a nigga get a loaner?

* C/C++ class #2 done and done. I can actually write C programs now. Do I bother with more school?

* Doing Thanksgiving in NY this year. 10th high school class reunion also. Dork factor: high.

* Finally got the wireless kit in the home. Bitchen.

* Curb Your Enthusiasm rules. I wish I had HBO, we watched all the DVD’s in 2 weeks.

* A new TV is in the works. Must have 16:9. Finally got the blown channel in the stereo fixed. Crystal clear 5.1 surround, kiddies!

* ABKCO re-released all the early Rolling Stones albums. Get the first record, if only for ‘Carol’.

Well, thats all I got. Carry on.