Here are some thoughts about our way of coding. This list is not yet complete and will be maintained and growing over the next months…
- Get the big picture first – before you start coding your classes and functions: create dummy classes and functions, adjust them to each other like building the complete frame for your house. If this is standing and yet returning no PHP error… start bringing life into the functions and classes by going from the top managment processes down to the one- or two-line functions…
- Write comments first – Before you start coding a function or something else which is sequentially doing something… go through the whole process without coding a single line and create a PHP comment for every single step you want to go.
- Build hierarchical SQL queries – when you need to build your queries by yourself: Build them hierarchically! This means, try to have every part of your query occuring only one time in your code… esp. WHERE clauses.
- Thight space for your functions – interfaces are everything in coding: The interfaces between the functions and classes, the interfaces of your objects define how well your application will run and how sensitive towards fault events it is. Make your interfaces as precisious as possible. Design their values as restrict as possible and test this with UnitTests
This entry was posted
on Tuesday, April 3rd, 2007 at 8:35 am and is filed under PHP.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.