Web Applications

Many people who want to learn Python these days are looking to write web applications. Web apps are web sites that do something unique. If you understand how to develop web apps, you can ask for any input you want from users, and you can do just about anything you want with that input.

top

What is a web app?

A web app takes in data from users, and does something with that data. There are all kinds of examples of web apps:

  • Dropbox takes in files from users, and makes them available to that user and perhaps other users.
  • Gittip allows people to create recurring tips to people who are doing projects that benefit others.
  • Twitter allows people to send short messages to followers.

These examples all go beyond just managing content online. If you are just looking to manage content, you should be looking at a content-management system (CMS).

top

How web apps work

Web apps tie together lots of different kinds of programming. To understand what kinds of things you will get into in creating a web app, consider how a typical app works:

  • Pull together different bits of data in order to present a set of pages to the user
  • Take in new data from the user
  • Clean and process all data that is received
  • Store relevant parts of the data in a database

In order to make all of this happen, you need to develop some understanding of:

  • Web architecture (html, css, javascript)
  • Web protocols (http requests)
  • Security issues (unpredictable and untrustworthy data, ongoing attacks by countless bots)
  • Database maintenance issues
  • Server infrastructure

Modern frameworks take care of a lot of the lower-level details of these aspects, but if you are going to make decent web apps you will end up learning a good deal about all of this. The good news is it can be pretty interesting, and even fun to pull all of these pieces together to solve real problems for your users.

top

Python web frameworks

Python has a number of frameworks that can help you create and maintain a web app:

  • Django
  • Flask
  • Pyramid