With the rapid development of new frameworks and other web technologies, design constraints are more necessary now than ever. There are a host of voices online, posing as authorities in the web space, who are advising new developers to learn the latest tech stacks and tools.
While this may be from a position of good intention, it can lead junior devs to an endless goose chase to test out new tech more than they create useful software.
This article focuses on the importance of design constraints (and thus strong opinions) in the creation of the software we know and love.
Ruby-on-rails and empowering the one-man dev team
Rails strips out the need for large dev teams by giving an individual developer the tools needed to run large webapps. By emphasizing convention over configuration, focus is placed on giving developers a starting point from which they can immediately begin solving the actual problems they need to solve.
Less time is wasted on setting up frameworks and more time is spent targeting the specific problem domain for which the app is being built. Small design decisions such as out-of-the-box brotli compression of HTML responses sent over the internet shows the heart behind Rails.
HTMX and its extension of what HTML attributes can do
HX attributes look like HTML attributes. Whereas other JS frameworks require the user to hand-roll their own AJAX requests to some extent, HTMX asks them to simply remember a few hx attributes and have the server-side set up to serve HTML snippets to be swapped out for other HTML elements.
Instead of users having to learn a new templating language and replacing code-like snippets inside of their HTML files, they can write hx attributes.
Hugo and the preference of static files over database queries
A large portion of the internet consists of WordPress websites. WordPress is built on PHP and the rendering of each page on a WP site involves a database query. This queried information is then injected into HTML and then sent to the user. This cycle of making queries and re-rendering HTML is unnecessary for static informational websites as the user will see the same information every time.
Hugo proposes that since the informational site does not change, the information on the pages (specified in Markdown format) should be used to generate the HTML files once and these files stored on disk. Database queries or information injection on every page visit are thus avoided. The server will simply send the HTML files to the user - no middle man required.
Laravel and developer productivity
Laravel is a very mature PHP framework. Instead of asking developers to compose their projects via an enormous package.json file, Laravel provides the important functionality out of the box.
A user does not have to import a package in order to use CSRF tokens in their HTML forms. They simply type @csrf within the form tag and Laravel handles the rest.
Golang and its strong standard library
Go is a modern programming language which addresses many of the pain points of C. A common complaint with C is developers having to write their own libraries before they can be productive in building larger systems. Go provides a much stronger standard library that offers features such as encryption, string conversion, web servers and template engines for HTML file creation.