Pergunta

Although questions similar to this one has already been asked and I can perhaps assemble the answer for myself by reading already posted materials. Still I am going ahead with the question, cause I feel it has elements of new flavor and I would like to see the views of others on how to tackle this.

I have developed several Web Applications of various scale. In some of them, I was only Developer, in another I led small teams and was part of a big team in another.

Most of these were developed using PHP. One of them used Kohana Framework, the rest were all developed using Raw PHP. The main difficulty that I faced in regards to speedy development was, whenever a small change was done to fix a bug or modify a feature, I had to refresh my web browser, go through several pages until I reached the page which included the fix.

I would like to know, what should be the development approach so that I can test out my code without having to, or at least minimize the number of refreshes required to test out changes in code. Although, the concepts maybe applicable for developments of any nature, for this question, let us stick to PHP and it's framework.

Foi útil?

Solução

You're going to have to refresh the page: PHP works on page generation. But you can automate the refreshes using a variety of different methods. Check out this article for four different ways:

Quick Tip: 4 Ways to Auto-Refresh your Browser when Designing new Sites

You'll also want to get into test-driven development. It'll automate the process of testing the same things over and over. For PHP, there's SimpleTest among other frameworks for TDD.

Outras dicas

I would +1 using Test-driven development. This way you would only have to run your tests again (which is still refresh), but less click through to a particular function or a particular case because your test-case would run. Another thing to look into would be automated testing with something like Selinium or Windmill.

Licenciado em: CC-BY-SA com atribuição
scroll top