Flask Web Development 2e: Developing Web Applications with Python Paperback – 16 March 2018
|New from||Used from|
Frequently bought together
Customers who viewed this item also viewed
- Paperback : 316 pages
- ISBN-10 : 1491991739
- ISBN-13 : 978-1491991732
- Language: : English
- Customer reviews:
About the Author
From the Preface
Flask stands out from other frameworks because it lets developers take the driver’s seat and have full creative control of their applications. Maybe you have heard the phrase “fighting the framework” before. This happens with most frameworks when you decide to solve a problem with a solution that isn’t the official one. It could be that you want to use a different database engine, or maybe a different method of authenticating users. Deviating from the path set by the framework’s developers will give you lots of headaches.
Flask is not like that. Do you like relational databases? Great. Flask supports them all. Maybe you prefer a NoSQL database? No problem at all. Flask works with them too. Want to use your own homegrown database engine? Don’t need a database at all? Still fine. With Flask you can choose the components of your application, or even write your own if that’s what you want. No questions asked!
The key to this freedom is that Flask was designed from the start to be extended. It comes with a robust core that includes the basic functionality that all web applications need and expects the rest to be provided by some of the many third-party extensions in the ecosystem—and, of course, by you.
In this book I present my workflow for developing web applications with Flask. I don’t claim this to be the only true way to build applications with this framework. You should take my choices as recommendations and not as gospel.
Most software development books provide small and focused code examples that demonstrate the different features of the target technology in isolation, leaving the “glue” code that is necessary to transform these different features into a fully working application to be figured out by the reader. I take a completely different approach. All the examples I present are part of a single application that starts out very simple and is expanded in each successive chapter. This application begins life with just a few lines of code and ends as a nicely featured blogging and social networking application.
Who This Book Is For
You should have some level of Python coding experience to make the most of this book. Although the book assumes no previous Flask knowledge, Python concepts such as packages, modules, functions, decorators, and object-oriented programming are assumed to be well understood. Some familiarity with exceptions and diagnosing issues from stack traces will be very useful.
While working through the examples in this book, you will spend a great deal of time in the command line. You should feel comfortable using the command line of your operating system.
I released the companion application to this book as open source on GitHub. Although GitHub makes it possible to download applications as regular ZIP or TAR files, I strongly recommend that you install a Git client and familiarize yourself with source code version control (at least with the basic commands to clone and check out the different versions of the application directly from the repository). The short list of commands that you’ll need is shown in “How to Work with the Example Code”. You will want to use version control for your own projects as well, so use this book as an excuse to learn Git!