Designing for maintainability and usability

It is one thing to come up with a great idea on how to implement some web application but yet another to design an application in such a way that it will be easy to maintain and use. Designing with these considerations in mind will make all the difference between a professional application and a mediocre one.

Testing

Everybody will agree that it makes sense to test an application before it is deployed but thorough testing requires some serious effort. Testing is also often considered as boring or even detracting from the 'real' development work and shares this aura with writing documentation.

However, testing gives you a better feel for the quality of the application you deliver and a test framework, however simple, is always better than none, especially for the kind of small to medium web applications we look at in this book, as these tend to be written by very small teams that quickly prototype and often change the code as insight progresses and customer requirements change. Having a test suite at hand ensures that at least the parts of the code that don't change keep on performing as expected.

Of course, not everything can be tested and the tools needed to test part of your code should be simple to use, otherwise there is no incentive to keep on using them. We will look at unit tests for a number of modules we develop in Python. Unit testing is an approach where we try to define the behavior of an isolated piece of code (for example, a single method) and check whether this code produces the expected results. If the implementation of the code changes but the tests still show no failure, we know that the new implementation can be used safely.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.198.59