Tools of my trade

Categories:

At present my work is focused mainly on a small software development project for which I write code in php.  I have to write code to interact with a database and generate forms and reports.

  Among the tools I am using for this project, Pear::DB and Smarty are more significant. PEAR is allowing me to write code which is database neutral. That is I do not have to write database functions addressed to a specific database. I need to do it only once in a single statement when I connect to a database of my choice. This is a cool concept that allows portability. For example same code can be used to connect to MySQL or SQLite or PostgresSQL data bases with changes only to configuration parameters. 

Another tool that I am using is “Smarty templates” for report layout. With Smarty I can   write code separating presentation details from the processing logic. Additionally Smarty allows me to use conditional logic and looping within the template, thus allowing me to separate not only the template but also the logic, this ability to use some level of logic, instead  of just plugging in the variables, gives me more control over the display

  For example I have been able to code the display of a form containing a list box filled with the results of a data base query. I am also able to create a table, populated with records from database with a layout based on a condition. Using smarty has simplified and reduced my php code as well. I find, having HTML files (templates)separated from PHP files is convenient in terms of running through HTML validator, linking to style sheets, debugging and editing.