Moving back end rules to the middle tier

Posted on July 29, 2004. Filed under: Visual FoxPro |

Traditionally I have been putting a lot of the admin business logic (eg auditing, recent changes logs) in the back end, but I’m wondering if I should be moving it to the middle tier.

 

Let me give you a simple example. In SQL I log the last change to a record in a field using an update trigger that checks SUSER_SNAME(). Previously (read client-server projects) this was fine. But since most projects these days use a COM+ service running the middle tier we are running into problems. Basically the COM+ service on the server has its own domain account, and when SQL checks SUSER_SNAME() it gets the COM+ account instead of the account of the app calling the COM+ service. Initially I thought this was a COM+ setting (I’m using Impersonation) but I haven’t found a solution so far.

 

I raised this at the VFP User Group last night and whilst we coudn’t find a solution, it was commented that many vendors are moving these kinds of busines rules to the middle tier. There seems to be a tendency to leave the back end simple and clean. It also has the advantage of easily moving between back end servers (which I don’t care about because I am targeting SQL Server anyway).

 

But it has got me thinking. Maybe I should be putting the effort into the middle tier more so than the back end.

 

 

Advertisements

Make a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: