Testy McTest
Hi I'm Testy. I love testing so much that I changed my name to Testy and decided to test Slides.com. The results have been positive.
Lesson 1
Screen 1 of 15
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 1
Screen 2 of 15
Lesson 1
Screen 3 of 15
To create your first Flask Web application, you should understand the components of a Web application and how they work.
First, it is necessary to distinguish between local and remote computer resources.
Lesson 1
Screen 4 of 15
A computer hardware or software resource that is part of the computer you are using is called a local resource. In other words, local resources are 'local' to your computer (like your computer’s ‘local disk’).
Local resources can also refer to resources on the same computer network as your computer( such as a ‘local network printer’).
A remote resource is a resource on another, ‘non-local’ computer or non-local network.
As Techopedia (2018) note, standard computer software applications normally reside in a computer’s local memory – on a Hard Disk Drive, for example.
By contrast, a Web application is a computer software program, on a remote computer, that is accessed over a network using the Hypertext Transfer Protocol (HTTP). HTTP is an established standard for transferring information over computer networks, like the Internet.
Lesson 1
Screen 5 of 15
Usually, an end-user accesses a Web Application from her local Web browser. Part of the Web application may be downloaded by the end-user’s Web browser, but most of the processing is performed on the remote computer where the Web application resides.
The remote computer where the Web application resides is called a remote host, because it ‘hosts’ the Web application.
Web applications are also known as ‘Web-based applications’ or ‘Web apps’.
An end-user requests a resource from a host, over the Internet, by entering a Uniform Resource Locator (URL) into her Web browser’s address bar. A URL includes: (University of Sydney 1999):
Lesson 1
Screen 6 of 15
In the URL ‘http://www.example.com/index.html’.
Lesson 1
Screen 7 of 15
A request for a resource using HTTP is called a HTTP request. Chandra and Varanasi’s (2015) outline a basic HTTP request as follows:
The Web server responds to the HTTP request by asking the host computer to locate the requested resource in its file-system. When the requested resource is located, the Web server sends or ‘streams’ the resource to the end-user’s Web browser.
An end-user’s Web browser makes a HTTP request for a Web resource, like a HTML document, to a remote host computer. The host runs specialised software, called a Web server, to handle or ‘serve’ HTTP requests.
When a Web server serves HTTP requests from an end-user’s computer, the end-user’s computer is referred to as a client computer. A Web browser running on a client computer is called a client Web browser.
Much of the Internet is built upon this client-server model.
Take a moment to review Ruslan Spivak’s (2015) illustration, which shows how a Web server responds to a basic HTTP request.
Lesson 1
Screen 8 of 15
Lesson 1
Screen 9 of 15
The HTTP requests we described, so far, relate to serving static Web content.
Static Web content is content that is served to client without modification by the Web server. For example, a client may request an image-file; the Web server sends the image-file to the client without altering its content.
Most modern Web content is adapted to suit particular clients - providing each end-user with a customised greeting, for example.
Content that changes on a per-use-basis is called dynamic Web content. Most Web applications store content in a database.
Lesson 1
Screen 10 of 15
As video explains, Web applications can generate dynamic Web content (Udacity 2014a).
Lesson 1
Screen 11 of 15
Each Web application is designed to meet the needs of its particular end-users. There is no generic model or ‘architecture’. But, the anatomy of a basic Web application is illustrated above.
Complete the following short quiz to test your knowledge of Web applications.
Lesson 1
Screen 12 of 15
You completed Lesson 1 on the Components of a Web application successfully. You:
Lesson 1
Screen 13 of 15
In Lesson 2 you will learn about Web application frameworks and how they can help you to create your first Flask Web application.
After you have reviewed the useful resources on the next screen, proceed to Lesson 2.
Lesson 1
Screen 14 of 15
Lesson 1
Screen 15 of 15
Ruslan Spivak’s blog (2015) is great resource for learning about Web servers and other advanced concepts. Ruslan’s blog is well written and illustrated.
Udacity’s (2014b) Web Development CS253 is a highly recommended (free) course about building Web applications and more (user registration required).
Developer Stephen Young’s blog post (2015) provides useful descriptions of different Web application architectures.
By Testy McTest
First Flask App on Python Anywhere Lesson 1
Hi I'm Testy. I love testing so much that I changed my name to Testy and decided to test Slides.com. The results have been positive.