I want to write maintainable web apps: readable code, easy to adapt if needed. However, learning how to do this seems to be hard: Many resources on software architecture assume big organizations, microservices, massive scaling etc.<p>What shall one read, watch or use to make better decisions in the architecture of maintainable "small web" code as a single creator or a two person team?
The #1 advice I can give you is ditch React and other front-end frameworks. Many kinds of complexity in software multiply instead of add. Hate fighting with pip or mvn? It’s at least twice as bad if you are developing two systems instead of one. (It is how Googliness infests the rest of the web…. They can afford to pay 10 freshers $200k a year to develop an app they will kill shortly afterwards, but you can’t.)<p>The strange thing is that old-school web apps built like it was 1999 are faster and better for the users in most ways. Sure, people put more effort into choosing fonts for reddit as opposed to HN, but HN is so much faster I can’t see how anybody can wait for reddit to load, never mind wait to log in and post.<p>Old school web apps do require you to have a systematic strategy for handling things that html doesn’t do by itself. You need a single function that draws a <select> with the <options> filled out. Proper error handling requires a systematic way to fill the old form values into the controls when you draw them. That’s about it.<p>The one disadvantage of old school apps is there is no support for transition animations or loading spinners but your app might be so fast it doesn’t need to display spinners. If you want to have some animation and the ability to make dropdowns automatically send an AJAX request see htmlx.
We're a team of 3 (with mostly 2 people coding) working on a Slack alternative for communities if you are interested to read through what the code base looks like <a href="https://github.com/linen-dev/linen.dev">https://github.com/linen-dev/linen.dev</a><p>The client side can get a bit complicated but it's a good look as to what it looks like for a production app.<p>I started this out by myself and the things I wanted to optimize for was my own productivity. I started out with React, Nextjs, Prisma, Tailwind and typescript all the way with a mono repo. Probably the most productive I have felt coding.<p>As we've grown the code base has gotten more complicated and started to move things out in to it's own packages but still keeping things in a mono repo style. We've added Elixir for our websocket service for the realtime chat portion but if I were doing a crud app it'd be unnecessary.<p>For tests we decided to focus on backend tests since they were much cheaper to write and maintain.
(OP) To contribute some of my own findings:<p>Some high level infos or ideas on the "small web" or "web 0" can be found on:<p>– <a href="https://ar.al/2020/08/07/what-is-the-small-web/" rel="nofollow">https://ar.al/2020/08/07/what-is-the-small-web/</a><p>– <a href="https://www.robinsloan.com/notes/home-cooked-app/" rel="nofollow">https://www.robinsloan.com/notes/home-cooked-app/</a><p>- <a href="https://neustadt.fr/essays/the-small-web/" rel="nofollow">https://neustadt.fr/essays/the-small-web/</a><p>Books I found helpful:<p>- Ship it (Richardson, Gwaltney)<p>- Clean Code (Martin)<p>Aside of that:<p>- I experimented a bit with DDD, but that feels massively oversized (though some of the concepts are useful)<p>- I found Pythons opinionatedness and documentation very helpful in contrast to Javascript, where it is hard to find "a good way" to do things (You see, I like dynamic languages…)