Hockey wrote:1) What is the purpose of DSN??
When would I use DSN?
Its useful in a variety of situations. Its basically an alternative format for providing the information needed for opening database connections. Its nice in that it is widely used in a huge number of database types, so it can be a more consistent format than others.
Hockey wrote:2) I know what persistent connections are, but I never used them in web application development.
When would one use persistent MySQL database connections?
In the very specific situation where benchmarking shows that the process of building a db connection, connecting, and breaking down the connection is the largest performance cost item - and too impacting to ignore.
Even then, it is extremely likely to prove to be a net performance detriment, not improvement. Persistent connections is one of those "We gave you enough options that you can really hurt yourself if you dont know what you are doing" items. It *appears* helpful, but testing will often show just the opposite.
Use with caution.
Hockey wrote:3) Recordsets. I know what they are and have used them, but wonder if their really worth it? I mean is it that more difficult to work with an associative array, than a resultset object?
If you want to encapsulate objects cleanly, recordsets are wonderful. Sometimes you want that, for a cleaner design, while other times, you may prefer speed and simplicity.
Its a small part of the whole OOP v. Procedural concept, and your mileage may vary.
Just to mention, even in a mostly procedural program, they can be very useful. If you need a recordset, its very nice to have that available.
Hockey wrote:What is your opinion on recordsets in abstraction layers like AdoDB? Overkill or nice feature?
Questions like "Overkill?" are really great, in that it shows you are asking a key question: Is this something *I* need.
As a result, no one can answer that but you. Perhaps you find any abstraction or code that uses classes to be meaningless and wasteful. Maybe you prefer procedural because its "just easier to look at".
Or on the other hand, maybe you can't stand procedural code, and clean abstraction and design makes you happy.
Adodb has a large number of features, its true. Some of them are more useful than others for specific people. The only way to answer whether it is "Overkill", or bloated, is to work with it, and determine whether you use the features in question.
If you do, and there isn't an alternative that currently supports those features, then its useful.
It comes down to design choices, and personal needs.
Personally, I use over 80% of the features in adodb actively, and as a result, talk about specific features being "Overkill", or "Bloat", just sounds like complaining to me. It does what I need and want, and nothing else currently can. Makes it an easy choice.
That may change in time, at which point I may be asking the same question you are.
