[AccessD] A question of design philosophy... n-tier

Bruce Bruen bbruen at unwired.com.au
Mon Mar 19 01:42:21 CDT 2007


Dear friends,

I just can't seem to get my head around this today, so I'm throwing it open 
for ideas.

I have "inherited" a rather nicely designed 3-tier VB application to do a 
design review on.  The UI is separate from the business object layer as is 
the data access layer, which includes an MS-Access (XP) option.  Putting that 
another way, there is a (set of) VB apps that use logical business objects 
that depending on the selected/implemented DAL could be an MS-Access db.  The 
Access db interface is actually implemented as an mdb (mde) which executes 
stored queries in the real backend.

Now, to get down to the dirt....

There are a significant number of tables in the design that have audit 
attributes, "createdOn", "lastChangedBy", etc.

Here's the question!  Should the audit fields be set by the business logic 
layer or by the DAL?  (At the moment its a mixed bag, some are set at the BLL 
and some at the DAL.)

By way of example,  lets say we have a business object "project" with said 
audit attibutes.  When an update is made to the object, i.e. the current 
instance of project, say MyProject, the user can at some time update those 
changes to the database.  When s/he does so, the "lastChangedBy" 
and "lastChangeDate" of the project needs to be updated by the system 
(to "currentUser" and "now() respectively).  

So what layer should ("logically", or "architecturally" or "industry standard" 
or "best practice" or....)  be responsible?  The BLL or the DAL? 

Your input would be appreciated - either by considered answer or by survey:
[Survey]
	a) Uh????  (This is the top answer from the VB forums I use)
	b) The DAL
	c) The BLL
	d) What does it matter,  the real question is "Does it work?"
[/Survey}

-- 
regards

Bruce



More information about the AccessD mailing list