With the advent of serverless platforms came the creation of multiple frameworks to help us manage our serverless applications. Just as Ruby on Rails, Spring, Django, Express, and other web frameworks aid in the creation and management of web applications, various serverless frameworks have sprung up that make the software development lifecycle easier for serverless applications.
An essential difference between web frameworks and serverless frameworks is that serverless frameworks often help with the management of application code on a serverless platform. In contrast, much of the help web frameworks provide revolves around web logic and tasks such as the following:
- Producing HTML output via templating engines
- Managing database records via Object Relational Mappers (ORMs)
- Validating submitted form data
- Dealing with the details of HTTP requests and responses
Not all applications that run on a serverless platform are HTTP-based. Therefore, serverless frameworks do not necessarily have application-specific functionality baked in but, instead, they have deployment and management functionality. Some frameworks do target web developers and aid in web-centric tasks; however, there are several other frameworks that do not and instead focus on managing arbitrary application code.
A few popular serverless frameworks worth noting are the following:
- Apex
- Serverless
- ClaudiaJS
- Kappa
- SAM (Serverless Application Model from AWS)
- Chalice (from AWS)
- Zappa
Throughout this book, I'll be using a serverless framework to manage application code and the entire stack of resources that we will deploy during the examples. Serverless works with a variety of programming languages and various platforms, such as AWS, Azure, Google Compute Cloud, and IBM Open Whisk. We will build all of our examples using AWS, but the patterns discussed should apply to other cloud providers unless explicitly noted otherwise. Since serverless frameworks such as Zappa don't give us any web-specific functionality, we will be responsible for some of the lower-level web application details in Chapter 2, A Three-Tier Web Application Using REST, and Chapter 3, A Three-Tier Web Application Pattern with GraphQL.