Using factory pattern in DataAccess Layer

Feb 6, 2009 at 1:23 PM
Edited Feb 6, 2009 at 11:45 PM
Would anyone disagree with me that the DataAccess layer should be replaced with static methods?
Please comment!

Feb 8, 2009 at 8:57 AM
Hi Sean,

What are your thoughts and which area do you think static methods should be used?

One of the reason why I think the Data Layer components should have instance methods is that it will allow them to perform their assigned processing and maintain state information independently of each other.

Best Regards,
Feb 10, 2009 at 2:23 AM
Thanks Serena

I didn't realize that the data access layer maintain state for the entity objects. I was thinking if the data access layer can be implemented as a service with the static classes.

Jun 23, 2010 at 4:22 PM

But aren't you then violating separation of concerns? An entity should be able to perform processing and maintain it's own state. Data layer should be used only for communicating to the database. My 2 cents anyway. I'm looking forward to diving into this a bit more.

Jun 24, 2010 at 6:55 AM

Hi kaschimer,

I didn't noticed what mcsean said until your post.

I was refering to the data access component's state i.e. Connection information, and not the entities state.