Introduction

2 min read · last updated at

TODO: This should live outside of the concept/ folder.

Web frameworks, like most software, usually have a set of core features, and components that deal with a certain area of application.

Terminology

Language can be confusing, so I want to define some commonly used terms related to software modules, especially the terms library and framework. Some of the “frameworks” discussed in this guide refer do not refer to them as such. However, for the sake of simplicitly, we will still call them framework.

In general if a software component is called one of these terms:

  • Library: A piece of software you can install through your package manager.
  • Framework: A collection of software libraries, that are commonly used together and possibly even ease the integration between each other.
  • Ecosystem: Everything surrounding a framework or library. Third-party libraries, the community, etc.

Library: You put the library code in your business logic. You call the library functions.

Framework: You put your business logic into the frameworks places. The framework calls your code.

Framework vs. Framework: Nextjs fits the latter one, but when you compare the feature set to Rails or Laravel, it feels very different.

Sometimes this transcendents even the boundaries of software. Laravel provides pre-built features and first-party libraries of application logic, such as authentication, billing, or an administrative admin panel. Shuttle provides first-party hosting infrastructure, that even scans your application code, and automatically provisions infrastructure, such as a Postgres database or Redis. These are all ecosystem features.

Architecture

In some part this is relevant for all software.

  • Show how web frameworks are architected. The Symfony Documentation does a pretty good job at this and can be used as a reference. There is an “inner” layer (called “Architecture” for symfony), and “outer” ones, e.g. for request/response processing, the database, etc., all built on the inner one.
  • Connect the concepts to these layers or topics via keywords. E.g. Event Bus is concerned with “Architecture” or the inner layer, while a Job Queue or Cache is more like “Infrastructure” and Routing, Request Pipeline and Generating URLs all deal with HTTP.
  • Overview with inner and outer layer communicating and abstracting with different systems.

Integration

  • Conclude with an important motivation: All these layers require integration. Good examples is the transactional event dispatching used by at least Laravel and Spring (see Event Bus). This is only possible, if your event bus knows about your database layer. Discuss “Coupling” and why the drawbacks maybe don’t really apply here.