D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] PHP as opposed to C#

 

On Tuesday 14 October 2008 21:15, Steve Lee wrote:
> 2008/10/14 Tom Potts <tompotts@xxxxxxxxxxxxxxxxxxxx>:
> > However, in my experience the best place for 'WORK' - unless your writing
> > highlevel maths - is within the DB itself and caching and good DB design
> > are far more important than whatever poxy language you are using to
> > access your information. I wrote a vb asp application for 300,000
> > products and 30,000 customers and it was the db ( a seriously powerful
> > multiprocessor setup) that slowed it down.
>
> +1
> in addition to efficiency I like to split the DB working out the data
> and the script doing presentation (some times it blurs). I've found
> you can do almost anything you want in SQL, often without resorting to
> cursors. Of course some like to approach it with biz objects and the
> like rather than a DB paradigm (e.g views).
I hope I didn't suggest the use of (db) views! I would suggest that any db 
access of any form (in a live system) is through stored procedures. 
I would even advocate adding redundant parameters to be passed to/from stored 
procedures just in case...
Choosing the right interfaces between objects is the difference between 
maintainable and extendible code and a system that requires too much 
maintenance. 
>>From the 'view' point of view - the web page in this case - we have a good 
idea of what we want from the DB but we really should leave it up to the db 
how it provides that data. When we ask the db to modify data we leave it up 
to the db to do all the housekeeping - they're a lot better at it than you 
are. The use of stored procedures reinforces this and means you can 
extensively modify the db structure without having to touch the web pages.
Laziness is at the heart of all good programming. Prescient laziness is at the 
heart of a good life. 
Tom te tom te tom
> fullmeasure.co.uk


-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html