4th June 2007

Dare on ObjectSpaces, WinFS, etc…

posted in Developers, Technology |

Dare posts about a friend writing about the origins of LINQ and its history with ObjectSpaces. I also worked with the ObjectSpaces team as they went through several iterations forced by various political winds inside Microsoft. We were hoping that they were going to be a great compliment to databinding in Avalon (WPF). Ideally you could easily define some database schemas, create some .NET objects to represent your data logic, and then use WPF databinding to create great user interface on top of it. All resulting in an application with great abstractions so you can evolve the various parts independently as necessary.

I had done some similar experimentation back in 1999-2001 (using Java to model an object programming layer first for Exchange and later for SQL). From my perspective the key was to not try to do a full complex “object relational” layer where you make things artificially automatic. Don’t hide the underlying database, but make it a lot easier to interact with it.

So far the most effective version of this is pretty much the ActiveRecord library that is part of Ruby on Rails. Judy’s Book also has their own version for the various sites built there, and I’ve built my own as part of various Fast Carrot / Launch21 projects. Writing lots of custom SQL and dealing with generic records all over your UI logic can be a big pain, and you also get stuck with poor choices for where to put your business logic. Part of what makes these technologies contraversial is that the database purists want you to put all the logic in the database. You build stored procedures, triggers, or more recently .NET based custom types that live in the database. The advatantage of that approach is that you have a guarantee of consistent behavior no matter what client talks to your database. For certain OS or enterprise applications this is very important. For most of the web-applications we build on the other hand this is a non-issue and just makes building the whole thing a giant pain.

I haven’t had a chance to get my hands dirty with LINQ yet but I’m hopeful that its going to be really cool. I know there were a bunch of neat projects brewing in this space so if they make the database side of the programming really interface with .NET in an elegant way, that could be a huge win for .NET programming.

Leave a Reply