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

Stuart McLachlan stuart at lexacorp.com.pg
Mon Mar 19 02:17:37 CDT 2007


On 19 Mar 2007 at 17:42, Bruce Bruen wrote:

> 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}

IMNSHO:
Ideally E.  The database engine itself  - using triggers so that it doesn't 
matter how the changes are made, you always get the update.

But if you are using an engine which doesn't support triggers, you need to 
move it back up to B. The DAL.

The higher up you put it, the more complex it becomes to ensure that the 
updates are always applied.

-- 
Stuart





More information about the AccessD mailing list