Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Flask

You're reading from   Mastering Flask Gain expertise in Flask to create dynamic and powerful web applications

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781784393656
Length 288 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Jack Stouffer Jack Stouffer
Author Profile Icon Jack Stouffer
Jack Stouffer
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Preface 1. Getting Started FREE CHAPTER 2. Creating Models with SQLAlchemy 3. Creating Views with Templates 4. Creating Controllers with Blueprints 5. Advanced Application Structure 6. Securing Your App 7. Using NoSQL with Flask 8. Building RESTful APIs 9. Creating Asynchronous Tasks with Celery 10. Useful Flask Extensions 11. Building Your Own Extension 12. Testing Flask Apps 13. Deploying Flask Apps Index

Preface

Flask is a web framework for Python that is specifically designed to provide the minimum amount of functionality that is needed to create web apps. Unlike other web frameworks, especially those in other languages, Flask does not have an entire ecosystem of libraries bundled with it for things such as database querying or form handling. Flask instead prefers to be an implementation agnostic.

The main feature of this setup is that it allows the programmer to design their app and their tools in any way they want. Not providing their own version of common abstractions also means that the standard library can be used much more often than other frameworks, which guarantees their stability and readability by other Python programmers. Because the Flask community is rather large, there are also many different community-provided ways of adding common functionality. One of the main focuses of this book is to introduce these extensions and find out how they can help avoid reinventing the wheel. The best part about these extensions is that if you don't need their extra functionality, you don't need to include them and your app will stay small.

The main downside of this setup is that the vast majority of new Flask users do not know how to properly structure large applications and end up creating an unintelligible and unmaintainable mess of code. This is why the other main focus of this book is how to create a Model View Controller (MVC) architecture with Flask apps.

Originally invented to design desktop user interfaces, the MVC setup allows the data handling (models), user interaction (controllers), and user interface (views) to be separated into three different components.

Preface

Separating these three different components allows the programmer to reuse code rather than re-implement the same functionality for each web page. For example, if the data handling code wasn't split into its own separate functions, we would have to write the same database connection code and SQL queries in each of the functions that render a web page.

A large amount of research and a lot of painful first-hand experience of what can go wrong while developing web applications has made this book the most comprehensive resource on Flask available, so I sincerely hope that you will enjoy reading it.

lock icon The rest of the chapter is locked
Next Section arrow right
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime