Why

Modern web development is complicated. Luckily, we now have web frameworks! Web frameworks automate a lot of the lower level details of web development so that we don’t have to worry about them. The web framework we’ll be using today is called Flask.

So those are a lot of different technologies in play for doing development of dynamic web applications. Our web application will need a server that can handle HTTP requests from clients (web browsers, or other web applications). We know we will want it to return responses back to the client, and use HTTP status codes so that the browser understands what to do with the response. We know that we’d like to return content in the form of HTML pages styled with CSS so that the browser can display it back to users. And we know that we’d probably want to have our application do multiple different things rather than just display a single page, so we will need to expose those different actions through different URIs. We want all of this to work together well.

This sounds like a lot doesn’t it? How do we go about writing code to do all of these things? If you are wanting to write a web application to achieve a certain goal or use case (or many), you don’t want to have to worry about a lot of this. The good news is that you don’t need to!

Most web applications today are built using web frameworks. Frameworks take care of implementing a lot of the lower level details so we don’t need to, but an understanding of the concepts is still beneficial to effectively use frameworks. Frameworks provide a way to organize code, route requests from URIs to specific code that handles it, gives us shortcuts to create responses, and more.

In libraries and archives it is often the case that we’re doing what’s called “full stack development” where we might be working with code and frameworks at different pieces of the web development stack. Using frameworks can save us a great deal of time and effort so that we can focus on solving the unique challenges of libraries and archives.

There are a lot of web frameworks to choose from in basically every programming language. They range in capability, flexibility, philosophy (eg. one right way to do something vs. endless configurability), and more. We’ll be focusing in this workshop on server-side software development. At some point every application needs to have something on some web server somewhere, so it is worth learning what’s behind this. Some popular server-side frameworks include Ruby on Rails and Django. The server-side framework that we’ll be using throughout the rest of the workshop is called Flask.

Often applications are layers of different technologies. Every part of the web development stack often has its own different frameworks. For instance there are client-side frameworks which make working with JavaScript in the browser easier (e.g. Vue.js and React). And CSS frameworks make it quick and easy to style HTML (e.g. Bootstrap and Foundation).