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

Charlotte Foust cfoust at infostatsystems.com
Mon Mar 19 10:35:25 CDT 2007


The current user can be retrieved by the data tier, John.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby
Sent: Monday, March 19, 2007 5:03 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] A question of design philosophy... n-tier

I don't think that the "last changed by" could be known by the DAL.  The
"created on" however should be implemented by the dal, since it does
know when the record was createdand it can perform this date insertion
without fail.


John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bruce Bruen
Sent: Monday, March 19, 2007 2:42 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] A question of design philosophy... n-tier

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
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list