LESSON 7

 

Web application deployment

Lesson 7

Screen 1 of 10

Course progress review

This is lesson 7 of 8


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 7

Screen 2 of 10

Lesson 7 outcomes

This lesson prepares you to:

 

  • recall a definition of Web application deployment
  • recognise common reasons for deploying Web applications
  • distinguish between four approaches to hosting production environments

Lesson 7

Screen 3 of 10

What is Web application deployment?

A developed and tested Web application can be made available to its end-users.  

 

Web Application Deployment is the process of migrating a Web application from its development environment to its production environment.  A production environment hosts and runs the Web application, so that end-users can access the Web application (Microsoft 2006).

Lesson 7

Screen 4 of 10

Four reasons for deploying Web applications

Common reasons for deploying Web applications include:

Lesson 7

Screen 5 of 10

  • High Web application availability – end-users expect Web applications to be available 24 hours per day and 365 days a year.  Hosting a Web application, on a personal computer, cannot ensure a high level of availability.  If the computer stops running the Web application, end-users cannot access it.  Running a Web application in a dedicated, ‘always on’ production environment can facilitate the high level of availability end-users expect (Makai 2018).
  • Support for concurrent users – a standard, home Internet connection is not designed to handle requests for Web content from many end-users at the same time. Production environments use specialised software and hardware resources to handle multiple, concurrent user-requests efficiently.
  • Non-disruptive development – keeping a Web application running in a production environment gives Web Developers freedom to modify a Web application’s code, in a separate development environment. Developers may add or improve a Web application’s features, in a development environment, before deploying their changes to the production environment, without disrupting the end-users’ experience.
  • Greater security – Most Web applications are intended to work with end-users’ data, which need to be secure (Makai 2018). Even security-conscious Developers may inadvertently expose end-users’ data to risk by running a Web application in an insecure environment. Production environments can offer greater security to protect end-users’ data.

Approaches to hosting production environments

There are many ways to host a production environment.  Four popular approaches are:

Lesson 7

Screen 6 of 10

  • Shared hosting refers to sharing the software and hardware resources of a single, physical server among many Developers. Each Developer sets up a production environment, on the same server, to host a Web application (Stevens 2016). Developers rent server resources from a service provider or purchase a server to share together.
  • Dedicated hosting involves acquiring and setting up the software and hardware required by the Web application’s production environment (Makai 2018). Developers rent the exclusive use of server resources from a service provider or purchase their own. The resources are not shared with other Developers.
  • Virtual private hosting (VPS) is like shared hosting, but the server's resources are shared differently. VPS involves configuring a single server to provide multiple, virtual server instances.  The instances run on the same physical server, but each instance functions like a discrete server.  Developers rent instances from service providers and set up production environments inside the instances for Web applications (Menning 2014).
  • Platform as a service (PaaS) is a type of cloud computing service. A PaaS provider allows Developers to select the specific software and hardware components for their Web applications (Reitz and Schlusser 2016). The provider configures and manages the chosen components, which Developers rents as an integrated solution or ‘platform’ (Techopedia 2018). PythonAnywhere.com is a PaaS provider.

 Deployment quiz

Complete the following short quiz to test your knowledge of Web application deployment and hosting.

Lesson 7

Screen 7 of 10

Lesson 7 review

You completed Lesson 7 on Web application deployment successfully.  You can now:

 

  • define Web application deployment
  • recognise reasons for deploying Web applications
  • distinguish approaches to hosting production environments

Lesson 7

Screen 8 of 10

Next lesson

In Lesson 8 you will apply what you learned about Web application deployment, by deploying your Flask Web application to the PythonAnywhere PaaS provider.

 

After you have reviewed the useful resources on the next screen, proceed to Lesson 8.

Lesson 7

Screen 9 of 10

Useful resources

Lesson 7

Screen 10 of 10

The section on Web application deployment in Matt Makai’s e-book, Full stack Python (2018), provides a useful overview of different types of deployment.  The book section also contains links to online resources related to deployment.

 

Kenneth Reitz and Tanya Schlusser’s book, The Hitchhiker’s Guide to Python (2016a), offers useful descriptions of various PaaS and Web hosting service providers.  An e-book version (2016b) is available online.

Made with Slides.com