phpUnderControl

Recently, I had an invitation to participate to some project, which where in development for about a year. The product was quite successful, but stack holders decided to improve its performance, reduce bug-level, develop lots of new features, otherwise get a more loyal customers and make it more profitable. So, for the start, let me tell you about the environment. It was the following:

  • absence of automated process of deployment
  • zero unit-tests code coverage
  • quite low skills of working with repository

So, the consequences are not unexpected:

  • big amount of bugs, even in production
  • deployment was quite rare, difficult and sometimes error prone(especially in the case, when there was need to rollback to previous version)
  • software integration problems
  • DB integration problems
  • consequently, low motivation for producing lots of new code, because it is always scary and many unpredictable bugs arises in different places

Significant part of those problems can be eliminated by improving the development and deployment process. That is what we decided to do, at first. So, after that I  decided to talk with the people, mostly involved in the planned switch – developers, QAs and the system administrators.

The most important fact, that I noticed at first was, that all the team members has performed a motivation and eager to make the switch.  So, we decided to start with CI server, first.

After demands clarification and resources analyzing, we decided that our CI system looks like:

  • open source, free of charge CI server
  • no need for advanced features, such as pre-tested commit, distributed testing. YAGNI, for the start.
  • unit-test runner, functional tests runner(Selenium), code coverage analysis, code static analyzers(duplication, code convention format, cyclomatic complexity)

After some researching, we have found ourselves choosing between Xinc(written in pure PHP) and phpUnderControl(as a plugin for CruiseControl) CI server.

I don’t like PHP language that much, to choice CI server, written on it :) So I decided to choose CC. Maturity of the product, its community and available plugins were the main arguments.

phpUnderControl is a tool, giving us all the power of CruiseControl, and has almost everything, ” right from the box” that usual PHP project CI server wants to have.

After working for quite a long period with the Bamboo CI server, I feel myself very comfortable with phpUnderControl. It has all the base benefits, Continuous Integration can give for a small-to-medium size project. And what I liked especially in phpUnderControl, is that it didn’t take me much time to setup all the required features.

As a consequences, a couple months later, working with that scheme, I can say that level of bugs has decremented in some scale. Mostly, because of those people who writes unit-tests for their code. No they runs all the time, developer commits its code to repository, and we can see the feedback from code very fast.

One more interesting point, I’ve noticed, that static code analyzer increases the code quality in some way :) For example, if some developer worked on the code, other may not see very often, so he can leave it in unrefactored form, and no one can notice that. But when code analyzer tells him, that, for example, cyclomatic complexity of some of the method is enormous, or the class length in LOC is too long, developer might feel ashamed of them, and will refactore the messy code.

Tags: , , , ,

Leave a comment

You must be logged in to post a comment.