#phpdepend
Explore tagged Tumblr posts
php-belfast · 12 years ago
Text
Meetup #1 - PHP QA by @DragonBe
Last Thursday saw the very first PHP Belfast Meeting. Hosted by SimplyZesty and sponsored by 31 Interactive.
We were very lucky to have PHPBelenelux's Michelangelo Van Dam present to deliver a first rate presentation on PHP Quality Assurance tools.
Why Bother?
The talk started with the obvious question Why Bother with QA? and of course the most obvious answer is protection. Protecting your code, protecting your clients business and protecting your own business/reputation. But It's also about esteem, you feel better knowing your code is better. It's also about saving, yes saving time. Because broken code doesn't needs maintenance.  It's about providing continuous reporting on code/build state and producing nice graphs with green colours for managers.
The topics list included
Version Control
Documenting
Testing
Measuring
Automating
Team
I'm not about to go over everything covered, it would simply take too long. But let me just pull out a couple of highlights.
Source Control
The first step is to implement Source Control. The decision on which SCM tool to choose is arbitrarily up to you, the user/company/team leader... but choose one, learn it and make sure your team uses it too.
Git is flavour of the month but you can just as easily use Mercurial or even Bazaar as well as the older, and  well known Subversion.
Unit Testing
The next step is to start unit testing. Without unit testing, You can't know that your code is good. Michelangelo covered unit testing in some depth with excellent examples and thankfully, an example application that is available for download for you to play with and start writing your own unit tests.
If you've never dipped your toe in the water with unitTesting, see the links at the end of this post, download the application and have a go.
Automation
"Computers are great at repetitive tasks"
Anything that you do more than once should be automated. Automation can cover many topics and tools, from running your phpUnit tests to deployment and monitoring code health.
Start small, start with your tests or even a single test and work your way up. Using a build tool like Phing  you can run a batch of commands, and eventually using a continuous integration server such as Jenkins you can automatically run and re-run these scripts over and over again.
There was of course much more to it that this short synopsis, and you are encouraged to have a look at the slides at for more detail.
As Michelangelo said at the start. It doesn't matter where you start with QA, so long as you do start. Don't necessarily Identify a weakness to be protected. Instead, try to identify the most important part of your application, and work on protecting that.
And keep watching, who knows when we get another visit from Michelangelo, and by then, you better have your code... up to code.
Links
The Slides from Michelangelo's talk are online at:  http://www.slideshare.net/DragonBe/workshop-quality-assurance-for-php-projects-phpbelfast 
Unit testing example application http://github.com/DragonBe/zftest <-- Go on Fork it and have a go!
QA Tools:-
Git: http://git-scm.com/
PHP Documentor: http://www.phpdoc.org/
PHPDepend: http://pdepend.org/
PHP Copy Paste Detector: https://github.com/sebastianbergmann/phpcpd
PHP Mess Detector: http://phpmd.org/
Mantis bug tracker: http://www.mantisbt.org/
Phing : http://www.phing.info/
Jenkins Continuous Integration: http://jenkins-ci.org/
If you'd like to hear more from Michelangelo, consider attending PHP Benelux's annual conference, Jan 25-26 2014. More details at http://phpbenelux.com/ 
Finally, if you would like to attend the next meet, or your would like to sponsor a meet, go on over to the Google group or get in touch via email [email protected]
0 notes