On 20 January 2011 20:05, Graeme Geldenhuys <[email protected]> wrote:

> On 20 January 2011 20:28, Bo Berglund <[email protected]> wrote:
> >>
> >>Use query.ExecSQL instead of query.Open even in Delphi!
> >
> > Not if the stored procedure returns a recordset....
>
> And with this whole mess I would end by saying:  And that is why you
> will not see me ever use a Stored Procedure! 99.99% of the time they
> contain business logic, which doesn't belong in the data layer of your
> application in any case - you can't unit test that business logic.
>
> Just my 2¢ worth...
>
>
>
Apologies to Vincent, I just couldn't resist, I need to say that Stored
Procedures in some cases are absolutely necessary, even for business logic.

Sometimes you need to do a whole lot of processing, and if you have to drag
all the data down a slow WAN link for processing, the app will fail
miserably.

When you need to poll the database every second for some events, it is much
easier to do the processing server side and return the results.

There is also the need to keep critical logic server side for security
reasons. Have you ever viewed your apps strings at runtime to see how much
of the programs SQL logic is exposed?

You might even see the odd password there. Scary.



> --
> Regards,
>   - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://fpgui.sourceforge.net
>
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>



-- 
Frank Church

=======================
http://devblog.brahmancreations.com
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to