Oct 18, 2007 at 1:41 PM
Edited Oct 18, 2007 at 1:41 PM
I have two pieces of technology I am building and I wanted to throw them out there before I start serious development on it to see if they already exist in some incarnation.
IDEA ONE: ObjectMapper.
I'm tired of doing this:
ViewObject someObject; // populated from a databinding from view.
DomainObject target = FetchCurrentObject();
target.SomeProperty1 = someObject.SomeProperty1;
target.SomeProperty2 = someObject.SomeProperty2;
Instead I should just do this:
ObjectMapper.Map( from, to );
or better yet:
to = ObjectMapper.Map( from );
Where ObjectMapper uses policies to set properties based off a given type.
Basically, making assignments a thing of the past. :)
IDEA TWO: Domain Entity Initialization/Management.
When I load up an application, I want to ensure certain entities are loaded based off a configuration file of some sort. These entities would be things like States and Regions, Administrator accounts, etc.
Yes, you can use SQL scripts to initialize your database, but this seems backwards to me. Instead I prefer to have .xml files of serialized entity objects that the initializer loads up and then checks to see if the objects exist. If it doesn't, then add it.
(providers can then send them to SQL-land, which is tantamount to a SQL script in the end. :))
Along such lines, I'd like to be able to add and manage Domain Entities straight from configuration, leveraging the power of the Component Design framework and PropertyGrid.
Anyways, these are the two ideas I've had for quite some time now. If they already exist in some incarnation I'd like to check them out. If not, I have my first EntLib blocks to build on CodePlex!
You should check out the EntLib contrib project in Codeplex. It's the perfect fit for this kind of new blocks!
See you there,