Jon

> I can see your arguement regarding SQL within one's code, but doesn't 
> your arguement fail to hold up if we assume that the SQL is fully 
> "compliant"? 

Well, yes and no.  I was citing that example as *another* reason to keep 
SQL out of your application-level code.
If you do, as Henrik suggests, write pure SQL92, then obviously you 
wouldn't need to wrap all your SQL in "ifs" like they did with 
wwwthreads... you could just switch out MySQL and switch in Filemaker 
Pro if it supported SQL92 and had a DBD module :-).  I maintain, 
however, that SQL embedded in application logic is evil in all but the 
simplest of scripts. Putting it in middleware is mandatory; I don't take 
issue with that.  

> In other words, if the makers of WWWThreads had stuck with standard 
> SQL, rather than using any non-standard features of MySQL like last 
> inserted ID, wouldn't their code be useable on Oracle, for example 
> (assuming we changed the correct var to tell DBI we are using Oracle 
> now) ? 

Sure thing.  

Cheers

Kyle
Software Engineer
Central Park Software
http://www.centralparksoftware.com


Reply via email to