I feel that some of my ideas about backend code and how to organize a business/data access tier have been somewhat validated by the release of an object/relational mapper:
Gentle.NET - An Object Persistence Framework
Last year I developed a simple attribute-based o/r mapping system to simplify the persistence of a whole bunch of simple objects to a database for a project I was working on. Over time, it's morphed into a database independent access layer (that currently works for SqlServer and MySQL) and a nice broker framework that I've used on several other projects at Kanga.
Many of the ideas I had developed on my own are directly translateable to the Gentle.NET framework. Examples of this include:
- Broker based persistence using static convenience methods like; Broker.Save( IDBEntity entity), and Broker.Fill( IDBEntity entity ). Gentle.NET appears to use Broker.Persist( obj ) and Broker.Refresh( obj ) to accomplish the same tasks.
- Using SqlHelpers (I packaged them in classes called 'BrokerTools') which are able to dynamically construct queries based upon the objects passed to them, based upon attributes which map properties and objects to columns and tables.
Gentle.NET is definitely farther along as a framework than my own, however I feel pretty good about the way I've been doing things after seeing another project that is organized almost identically. I'm currently missing the foreign key handling stuff, and most of my data access code could do with more 'objectifying', but I've known that for a while. ;)