Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
Thanks. Looks like test-driven development is the way to go. One quick question, is SimpleTest a framework in itself, or it can fit with existing PHP frameworks like Kohana, CakePHP. –  Shamim Hafiz Nov 21 '10 at 16:01
    
@Gunner it is a testing framework that works in concert with other frameworks. It allows you to spawn testing environments of your orignal program to run its tests. Drupal uses SimpleTest to this end with great effect. –  user8 Nov 21 '10 at 22:32

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.

share|improve this answer
    
I have heard of using Test Driven Development to speed up development. Perhaps I should look into approaches of TDD using PHP. –  Shamim Hafiz Nov 21 '10 at 15:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.