Last post Jan 29, 2006 02:58 PM by adefwebserver
Jan 28, 2006 12:31 PM|vanVeen|LINK
Lately if have been working on some projects using some kind of o/r mapper. This mapper provides me with some useful functionality. All typical Db related info which is required for all my objects/records
like: recordstatus(e.g. deleted, archived,..), recordlocking/locktype (e.g. optimistic,..), last modified, last modifieddate, createdby, creation date etc is automatically handled by the DAL of the o/r mapper. This saves me a lot of work and provides me with
a consistence data model.
Since I am also creating a lot of Dnn modules I tried to add the o/r mapper like functionality to the Dnn module architecture. What I did so far is creating a Controller base class which holds the Username which is send to the Db by the Create end Update routines.
The Stored procedures handle the creationdate, createdby, modifieddate and modifiedby properties.
This is off course far from perfect and not o/r mapper like which uses dynamic sql, so i was wondering if somebody else has some thoughts on this.
Jan 29, 2006 02:58 PM|adefwebserver|LINK
Can you expand on this more? I have read how some programmers do not like the "DB centric" way of doing things. I believe it is possible to have a more "OOP" style but to be careful when making changes to the DotNetNule DAL. Since it's purpose is to be database
agnostic you would want to put your design changes "on top of it" rather than "inside" the DotNetNuke DAL.
Meaning, you would not want to do anything that no longer make the DAL database agnostic. Now if you don't care about supporting multiple data sources than just disregard the DotNetNuke DAL and use your own DAL layer.
However I think people should keep in mind how hard it is to upgrade a site that contains modules that don't "conform" to the DAL standard.