Book Image

Python 3 Web Development Beginner's Guide

By : Michel Anders
Book Image

Python 3 Web Development Beginner's Guide

By: Michel Anders

Overview of this book

<p>Building your own Python web applications provides you with the opportunity to have great functionality, with no restrictions. However, creating web applications with Python is not straightforward. Coupled with learning a new skill of developing web applications, you would normally have to learn how to work with a framework as well.</p> <p><em>Python 3 Web Development Beginner's Guide</em> shows you how to independently build your own web application that is easy to use, performs smoothly, and is themed to your taste – all without having to learn another web framework.</p> <p>Web development can take time and is often fiddly to get right. This book will show you how to design and implement a complex program from start to finish. Each chapter looks at a different type of web application, meaning that you will learn about a wide variety of features and how to add them to your custom web application. You will also learn to implement jQuery into your web application to give it extra functionality. By using the right combination of a wide range of tools, you can have a fully functional, complex web application up and running in no time.</p>
Table of Contents (19 chapters)
Python 3 Web Development Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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.