Lisantra Technologies, Llc

Smart Programming for Creative Professionals

How We Work

3 Write Feature's Code

We craft our Php code to be fault-tolerant, maintainable and extendable. We achieve this through a methodical process of adhering to professional best practices. Among them are documenting our code, unit testing it and storing it in a version control repository also known as Source Code Management (SCM). We follow the Php community's coding standards.

Use an IDE

Using our Eclipse Php Development Tools IDE is the first and basic step in writing code. This development environment also provides auto-complete of variable, class and function names to save us time. It also helps us to avoid syntax errors as we type which prompts us to immediately fix the errors before that code even gets out the door. We also use our IDE to track bugs, interface with version control, to do lists and other professional code management tasks.

Write Unit Tests

We write our tests for the code while we are writing the code itself. Then, we run these tests while we write the code to verify that it works as specificed and produces the error we want when we purposefully give it a test it should fail. PhpUnit and Simpletest are the testing suites of choice in the Php community.

Code According to a Standard

Coding standards are a pre-defined way to format one's code for maximum readibility. Coding standards contribute to the code's maintainibility. Two common standards are the PEAR Coding Standard and the Zend Coding Standard. PHP_CodeSniffer is an automated tool to assist us in adhering to any Php coding standard, including those which we define for ourselves. If you require a specific style of coding, we can use this tool to ensure our code complies. We also sniff our code to ensure it complies with Php's E_STRICT setting to avoid deprecated settings and functions.

Save to Version Control Repository

Version control maintains a complete record of each file's contents. Professional IDE's automate the process, making it faster and more accurate, reducing errors during this phase. We store our Php code using version control systems (VCS) such as Subversion, Mercurial, Git, Bazaar, or possibly CVS. Upon request, we can use your preferred verson control system such as Perforce or Visual Source Safe.

Write In-line Documentation

We record these three attributes with good documentation and code commenting in addition to the plain-English variable, function, and class names we use. We use PhpDocumentor and Docbook to produce proper documentation which because of our good formatting habits, couple documentation to the code it describes, making even the documentation highly maintainable for future coders, whether they be us or any other competent developer.

Refactor the Code

Its important to focus on getting our code to just work at the beginning. Then, we can go back to it after we verify it works with our unit tests and optimize it for performance, and make it more maintainable, robust and extendable.

Further reading

Next » 4. Test the Feature

About This Website 59 E. Camino Limon Verde, Sahuarita AZ 85629 * 520.777.9330 * mgatto at lisantra dot com © 2010 by Lisantra Technologies, Llc. All rights reserved. Terms of Use. Privacy Policy.