-
Notifications
You must be signed in to change notification settings - Fork 8
About
This tutorial was developed with the support of the PDX Code Guild as a seminar project within the Advanced Portfolio program, for the session which began January 2018.
The Portfolio class offers students an opportunity to design and implement programming projects that stretch their current abilities, and to add important skills to their résumés. Students are encouraged to solve new problems with familiar technologies and/or to solve classic problems with new technologies. They're asked to research something new and then implementat of a final portfolio piece that leverages that new ability. In short, they're challenged to demonstrate their ability to organize their work and learn in a collaborative, technical setting.
Given the seminar format of the class, I felt it was important to follow the course format myself, along with the students. Given the Code Guild's other courses, I also felt it was important to delve into Python. I knew very little about Python at the outset. I've known there was a large ecosystem of Python-based development across multiple domains, but I'm still learning which frameworks and libraries are most common or popular.
In the web domain, researching Pythonic solutions leads more or less directly to Flask. Like the Django web framework, which is taught in the Code Guild's introductory course, Flask is common in full-stack web development. Unlike Django, however, Flask is a micro-framework. As demonstrated in the tutorial, a minimal Flask application can be launched with minimal dependencies very quickly. Dependencies are introduced only as needed, for instance when importing Flask Extensions. This is ideal for developing lean applications, and ideal for learning component details as they become required.
The project's initial requirement then was to create a robust, containerized, web accessible, Flask development environment. In terms of scope, the goal was to manage a minimum of two modular, related data objects with CRUD operations for all fields. MySQL was selected later for the storage layer, and Boostrap with JQuery was selected for the presentation layer. (As a challenge while following the tutorial, PostgreSQL or Mongo could substitute for the database, or a different materialized CSS framework could substitute for Bootstrap.)
Prototype development spanned January and most of February. Then, with a working demo in hand, I started over. This process - slowly rebuilding and carefully logging each step - provided the bulk of the tutorial. The result, I think, is a solid 2nd or 3rd iteration of the Flask pattern, still grounded in fundamentals, but laid out and ready for improvements and extensions.
Table of Contents | About | Commit-v0.1
- FlaskApp Tutorial
- Table of Contents
- About
- Application Setup
- Modules, Templates, and Layouts
- Database Items, Forms, and CRUD
- List Filter, Sort, and Paginate
- Users and Login
- Database Relationships
- API Module, HTTPAuth and JSON
- Refactoring User Roles and Item Status
- AJAX and Public Pages