Forums / Cotonti / General / Future Genoa

GHengeveld
#32026 2011-12-13 10:18

The way I've come to see it now is that basically we should scratch PDO, we simply don't need it and many people don't like it. It took me a while to get used to it, and personally the only important benefit I see is it's easy query preparation. Oh and I love chaining it's functions like $db->query(...)->fetchAll(). Of course there are other benefits, but those don't apply for the majority of users.

I think it would be good for Cotonti to make a decision about procedural vs objectoriented and stick with it, and although I personally prefer OO code, I'm in favor of procedural code for Cotonti. This is for several reasons:

  • Having a mostly procedural but very structured codebase makes the system easy to use and modify for beginners.
  • We can use the slogan 'procedural where possible, object oriented where necessary' as a marketing feat. I think the simplicity of the code is an important benefit we have over Wordpress and the likes.
  • Historically we've had a procedural codebase, it's too big a change to go all OO. We'd lose a lot of users that way.

I'm not saying it should all be procedural. XTemplate has always been OO and that doesn't bother anyone. I think it's ok to write core APIs in an OO way if procedural just doesn't make sense. In the end we should focus on speed, ease of use and readability. XTemplate and Caching are two examples of features that must be OO to make any sense. As for CotDB, I'm happy to go back to sed_sql_queries, although it should be extended with some conveniences we have in PDO (but procedural). Perhaps we can move PDO into a plugin so advanced users can still use it.

On a final note, I don't see us scratching Siena itself. Probably we'll try to make it more backwards compatible with Genoa and go on with Siena. This is simply because Siena has a lot of minor improvements and fixes as well, which are not quickly backported. It would be like throwing away 2 years of work.