Introduction

The past few years have seen an explosion in the development of dynamic, database-driven web sites. Whereas many sites were once built using nothing but hand-written HTML, or a few CGI scripts or server-side includes, today's database-backed web applications have become the norm for everything from personal blogs to online stores to the social networking sites that have revolutionized the way many people use the Web.

But this has come at a cost. Developing these applications, even for relatively simple uses, involves a significant amount of complex work, and much of that work ends up being repeated for each new application. Although web developers have always had access to libraries of code that could automate certain tasks, such as HTML templating or database querying, the process of bringing together all the necessary pieces for a fully polished application has largely remained difficult and tedious.

This challenge has led to the recent development, and subsequent popularity, of “web frameworks.” Web frameworks are reusable collections of components that handle many of the common and repetitive tasks of web-application development in an integrated fashion. Instead of requiring you to obtain disparate libraries of code and find ways to make them work together, web frameworks provide all the necessary components in a single package and take care of the integration work for you.

Django is one of the most recent crop of web frameworks, growing out of the needs of a fast-paced online news operation. Django's original developers needed a set of tools that would not only help them quickly develop new and highly dynamic web applications in response to the news industry's rapidly evolving requirements, but would also let them save time and effort by reusing pieces of code, and even entire applications, whenever possible.

In this book, you'll see how Django can help you achieve both of these goals—rapid application development and flexible, reusable code—through both the tools it provides to you directly and the development practices that it makes possible. I'll guide you through the development of several example applications and show you how the various components and applications bundled with Django can help you write less code at each stage of the development process. You'll also see first-hand a number of best practices for reusable code and learn how you can apply them in your own applications. Plus, you'll learn how to integrate existing third-party libraries into Django-powered applications to minimize the amount of code you'll need to write from scratch.

I've written this book from a pragmatic viewpoint. The sample applications are all intended to be useful in real-world situations, and once you've worked through them, you'll have more than just a technical understanding of Django and its components. You'll have a clear understanding of how Django can help you become a more productive and more effective developer.

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

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