Well, you’re quite right, why not to write in C or assembly? ;) If you wanna go with that argument, then you can directly ignore any optimization. If you work on large enterprise applications an addition of 1ms per query is an issue.
Cheers From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Ala'a Ibrahim Sent: Tuesday, October 16, 2007 3:36 PM To: [email protected] Subject: [JoPHP] Re: Are database abstraction layers worth it? about DB abstraction layer (I guess you mean something like DB Engine Common interface, a DB abstraction layer is highly recommended, but not a common interface), well depends on what are you doing, a specialized system or an off-the-shelf application, small or big ..., but in the end if you are, or not using a DB Common Interface, stick to a DB layer, where you throw all the sqls there. about Templating systems, well you should look for what they offers, the problem is that people use a templating engine without using any of it's features, just an extra burden on your application. for example, smarty have a very useful caching features. Unless you are using them, then stick with php templating syntax. about speed, well com'on, these things are not going to cost much, also a lot of opcode caching engines are available, which would fix the extra burden of an organized code, if you want to come to it, adding comments to your code would add a little time for php parser, but that is not an excuse for not writing comments, APC would do just fine. so it's not an excuse, also the bottleneck of such applications are the actuall DB queries, and external connections, optimize them, your application would be optimized, in the end why don't we write our code in assembly, or C, it would be faster. On 10/16/07, Khairi Husseini <[EMAIL PROTECTED]> wrote: Hey, I don�t know much about the different PHP abstraction layers, but what I know is that they slow the system down. For small scale application you might not really feel it but if you go on larger applications or even to the enterprise level you should write you data access layer for a specific database (also it is very uncommon that a client/project would change the DB type frequently or often). The same applies to templating systems like Smarty, they are very convenient but at a certain point they do slow down the process of serving a page. Better is to use a templating system like the one incorporated in Symfony (which is purely PHP without parsing etc. etc.). Hope that helped somehow� Cheers, Mozzy From: [email protected] [mailto: <mailto:[email protected]> [EMAIL PROTECTED] On Behalf Of Al-Faisal El-Dajani Sent: Tuesday, October 16, 2007 1:31 PM To: Jordan PHP User Group Mailing list Subject: [JoPHP] Are database abstraction layers worth it? Hello all, I've been searching lately for a database abstraction layer to use with a new project i'm about to start. I tried building my own, and using pear's MDB2, and hated both. During my search, i came along many forums that were discussing if it is worth using one in the first place (of course, templating engines were dragged into the discussion as well). So my question is, is it worth using a database abstraction layer and a templating engine? if so which do you recommend? if not why? Cheers, -- Al-Faisal El-Dajani Phone: +962-7-79 73 70 50 P.O Box: 140056 11814 Amman, Jordan -- Ala'a A. Ibrahim http://guru.alaa-ibrahim.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Jordan PHP Users Group" 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/JoPHP http://Jolug.org/ -~----------~----~----~----~------~----~------~--~---
