In my
original post to this blog, I mentioned who the audience is. If you are an experienced developer that has it all figured out, then I'm not going to post anything here that you don't already know. However, if you are a beginner to intermediate level programmer, I hope that I can give some advice that will be helpful to you.
I've been posting about Subsonic for a while, but the question is: Why is a tool like subsonic important? The key point here is abstraction. This is a key principle in software development that has been around for years and years. It's important. At the application level, you must learn to think abstractly (I'm setting the date of birth for an employees vs. I'm updating the dob column in the employee database). The mind can only deal with so much detail, thinking abstractly helps you solve bigger problems. Object oriented programming helps in this quest.
Datasets are objects too....Well, yeah they are, but not the kind of objects that I'm talking about here. Datasets do not provide abstraction. Think about this, when you deal with an application that is dataset oriented, what is the documentation that you refer to most often? Could it be the database schema? Your column names appear at the top level of your code. There is no abstraction. With true business objects, the top level appication has no idea how the objects are stored, the application deals with operations like, Save, Update, Delete. Much more abstract.
The problem with business objectsThe downside of writing business object oriented code has always been the overhead. Business object oriented code has always taken a lot of time because of the code needed to 'translate' between the object model and the database model. Datasets seem to be quicker because there doesn't need to be any translation code. In the end, however, dataset oriented applications become brittle because they are tied to the database in an unhealthy way. What about strong typing? With datasets you must constantly typecast your data. The business object model provides strong typing which by definition improves your code.
If the abstraction argument doesn't work...If the concept of abstraction doesn't appeal to you, then how about this. If you use true business objects, you have intellisense at the application level, even when databinding to controls.
The reason Subsonic is important....Subsonic provides the needed abstraction while removing the overhead of writing the translation code yourself. The concept of abstraction is what is important, not the specific tool.