A little late on this conversation but I will address the questions you have
down below.

There are a number of ways you could approach this, but the idea of having a
central logic storage is the best solution. For the reasons that it was
suggested, and this is where ORM's have tried to bridge the gap with DDD or
DDL depending on who you talk to.

Domain Driven Design/Language, allows for one to separate that core logic
that is used for business logic and data manipulation. And in the sense that
this tier is used in the Database or Application code becomes down to
whether you want to spend time to create that tier that best suite's your
infrastructure and business flow.

So the idea to move this over to Stored procedures is more than an
attractive idea, seeing as there are many other areas of the business
relying on these Domain Controllers.

Regards
Andrew Scott



-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of felixt
Sent: Monday, 12 January 2009 12:19 PM
To: cfaussie
Subject: [cfaussie] Using stored procedure exclusively to control database
access


Hi all,

It has been suggested by someone at work that we should only allow
access to database via stored procedures.

This was proposed to fix the current situation where we have hundreds
of similar SQL statements scattered
around the system. For example if the business logic has changed in
one place that affects a table, one needs to do a keyword search on
all files to make sure all the related files are updated.

I am aware of the benefits of going the stored procs way, like:
1. Centralized place for logic
2. Faster execution
3. It's very unlikely that we will go with different database system
other than MSSQL so portability is not an issue for us.

But I feel a bit uneasy about this, I don't feel business logic should
be in the database also I think debugging stored procedure will be
more difficult (adding one more place to check).
But this is just my feel, I might be wrong.

Any thoughts, is this a normal/recommended practice? Also what are the
best practices that you guys use to combat this scattered SQL
statements?
I thought of using CFCs (gateways and/or DAOs) should be sufficient:
CFM -> CFC -> query
rather than:
CFM -> CFC -> stored proc

Cheers,

Felix


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to