Hey Felix,

* Faster execution is definitely a benefit of stored procs for
intensive or repetitive tasks
* Centralised place for logic is definitely a good thing, but I would
suggest that it's better to have in ColdFusion not stored procs. In
some cases, not all business logic can be represented in T-SQL so you
end up with a half-half solution anyway. Depends what you define as
"business logic" but perhaps writing to a file, accessing a web
service or emailing an administrator on a certain event may be part of
your "business logic" which needs CF.
* Not sure if you implement unit testing or use other debugging tools,
but I find T-SQL is not as easy to test or debug as ColdFusion.
* Do you have version control for your stored procedures? I would
think it pretty important that your app's business logic should be
under version control and that's far easier to do with your CF code
than stored procs which have to be copied to files.
* Database portability may not be an issue on a single app, but it may
be if you reuse the same code on other projects

cheers
Ryan


On Jan 12, 12:19 pm, felixt <cem...@gmail.com> wrote:
> 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 cfaussie@googlegroups.com
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to