After the decision to push ahead with a PHP implementation, I spent some time going through the available ORM implementations for PHP, with a view of using one from the beginning. After some thought here, I've decided that for the initial implementation, our database access is simple enough - and I don't really want the overhead of an ORM.
Next came the learning curve of understanding the basics of PHP classes, so we can have some sort of structure, especially within the data abstraction.
I've also switched to a MySQL database (we started with a SQLite3 database which is simple and quick to get going) as I reckoned I should be dealing with MySQL issues from the start. I've created the table definitions in sequential .sql files so they can be 'migrated' on the rollout server. As an aside, the two ORMs I investigated the most didn't seem to have a simple and easy to use database migration system (unlike Rails - which I have a feeling I will miss.)
I've now got basic user creation, and webservice client code working, the next step is to integrate them together, along with the existing logon functionality.
There continues to be a little re-writing of earlier PHP code as I discover better or easier-to-maintain ways of doing things, a really simple example is storing configuration items in a global array ($CONFIG) instead of a bunch of variables, although I will look for a PHP YAML implementation for this.
I've also set up a local instance of MediaWiki to stick all these gems into for future reference.
Sunday, January 25, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment