mar5us
Student - Technical Writing
Lesson 2
Screen 1 of 11
1) Components of a Web application
2) Web frameworks and Flask
3) Installing Python and packages
4) Creating your development environment
5) Building your first local Flask app
6) Running your first Flask app
7) Web application deployment
8) Deploying to PythonAnywhere
Lesson 2
Screen 2 of 11
Lesson 2
Screen 3 of 11
Web applications interact with various components, including client Web browsers, Web servers, remote hosts, file-systems and databases, etc. Integrating these different components can be challenging for Developers.
A Web framework provides Developers with a set of pre-packaged tools and technologies needed to integrate the components of a Web application.
Lesson 2
Screen 4 of 11
Without Web frameworks, Developers would spend a lot of time writing code to integrate the different parts of a Web application. Web frameworks help Developers focus on writing code to implement a Web application’s features, which enables them to work quickly and efficiently (Reitz and Schlusser 2016).
Web frameworks are also called ‘Web application frameworks’ or ‘frameworks’.
There are many Web frameworks. The Web application’s requirements determine which particular Web framework is suitable for use. Most Web frameworks include the following basic features (Reitz and Schlusser 2016, p.201):
Lesson 2
Screen 5 of 11
The Flask micro-framework (or ‘Flask) is a Web framework for the Python computer programming language. Flask is a ‘micro-framework’ because, by default, Flask includes a minimal set of tools and technologies, to make developing Web applications quick and easy.
Lesson 2
Screen 6 of 11
Flask includes the four features of a Web application, i.e. URL routing, Request and Response Objects, Template Engine (Jinja2) and a Development Server.
Developers can add tools and technologies (called packages, modules and libraries) to extend Flask’s default features.
Watch the video for an overview of Web frameworks and Flask (Tutorials Point 2018a):
Lesson 2
Screen 7 of 11
Test your knowledge of Web frameworks with the following quiz. Move forward to reveal the answers.
Lesson 2
Screen 8 of 11
2. Web frameworks help Developers to (choose A, B or C):
1. Define a Web framework, in your own words.
3. Which of the following is a feature of Flask (A, B or C)?
A. Template Objects B. Request Engine C. URL routing
1. A Web framework is a set of pre-packaged tools and technologies that integrate the components of a Web application.
2. Web frameworks help Developers to [B] focus on implementing a Web application’s features.
3. [C.] URL routing is a feature of Flask.
A | create packages for Python. |
B | focus on implementing a Web application’s features. |
C | write code for HTTP requests. |
You completed lesson 2 on Web frameworks and Flask successfully. You now:
Lesson 2
Screen 9 of 11
In Lesson 3 you apply what you learned about Web applications and Web frameworks, by installing Python to build your first Flask Web application.
After you have reviewed the useful resources on the next screen, proceed to lesson 3.
Lesson 2
Screen 10 of 11
Lesson 2
Screen 11 of 11
The official Flask Website, created by Flask’s developer Armin Ronacher (2018), is an excellent place to begin learning more about the Flask Web framework.
Tutorials Point (2018b) provide a free course on Flask Web development with practical tutorials, useful resources and videos.
By mar5us
First Flask App on Python Anywhere Lesson 2