- 100% server side rendered
- Progressively enhanced (fully works without JS, but having JS enabled makes it nicer)
- In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refreshes normally)
- Running on a single, cheap VPS; no Docker, no Kubernetes, no serverless
- No SQL database; I just keep everything in memory in native data structures and flush to disk periodically; I have a big swap file set up so that I can keep a working set bigger than the RAM
- Written in Rust, so it's fast; I can support tens of thousands of connections per second and thousands concurrent users on my cheap VPS
https://htmx.org - uses HTML attributes and HTML-over-the-wire for AJAX/Web Socket/SSE interactions
https://hyperscript.org - an experimental front end programming language derived from HyperTalk that is event-oriented and that removes the distinction between synchronous and asynchronous code.
Both tools are HTML-oriented and are designed to be embedded directly in your HTML, rather than along side it. I am trying to popularize the term "Locality of Behaviour" for this idea:
https://htmx.org/essays/locality-of-behaviour/
There are a few tools that are moving people this direction these days, notably AlpineJS and Tailwinds.
There's a stark difference in research and production in terms of output, for me. If I wanna get stuff done I have to think less in terms of the newest, coolest thing and just use the right tool for the job.
Edit: Wrote some details on the design and implementation [1]
* Use a Trello board as a free CMS. * Write cloudflare worker code to read cards from the board via Trello APIs and render card content as plain old HTML.
I use labels as tags for the categories, and have specific formatting in the card descriptions. If an attachment is a YouTube URL, it renders the video as an embed, otherwise it uses image attachments as post images. Card covers render as the link thumbnails on the list pages.
Powers our family YouTube blog: https://thunderiron.family
(Check it out if you like fun and delicious Keto recipes)
An earlier version of this stack powers my personal dev blog, and the approach is written up here:
https://splatcollision.com/page/meta-post
What is particularly cool is that I can post things right from my phone using the Trello apps!
- https://h3rald.com/litestore if I need a RESTful searchable data store and some relatively simple middleware logic.
- https://h3.js.org if I need to write a single-page application and I just want to get things done fast.
- https://hastysite.h3rald.com if I need a static site generator.
- https://min-lang.org for more complex things. It took a bit to get used to it, but I managed to get quite productive with it in the end.
I do occasionally try out more traditional things or the latest stuff but... using my own code feels a lot more gratifying. If I needed something different, I found myself building it from scratch exactly like I wanted it.
Overall I'm a huge fan of Elixir, it's incredibly reliable and easy to pick up for simple server tasks. Plus the scheduler is built into Beam, no need for any extra deps. My only complaint is needing to rely on extra python to convert the ENML to HTML, but that's a very niche library so not surprising that it doesn't exist in Elixir yet.
SvelteKit[1] is a framework for SvelteJS (like Next.js is a framework for ReactJS). I've tried both Svelte and React. Svelte seems to be more elegant and lets me implement my ideas faster with less code. Svelte is very flexible; SvelteKit adds some opinions on how to do things like routing.
SvelteKit also embraces the serverless paradigm[2] (AKA JAMstack[3]). Although a node.js server is still an option, you can also have pages rendered in serverless functions or pre-rendered at build time. Even static pages can be "hydrated" on the client so they are not totally static. So this results in fine-grained SSR (server-side rendering) at the page level. The two main reasons for SSR are performance (especially on mobile devices) and SEO.
Backendless[4] is a VADP/MBaaS. This platform offers a lot of services, but the main one I'm looking at is authentication/identity. I was looking for an authentication service that supports anonymous guest login, social login, as well as traditional email/password login. The other contenders were Google Firebase (slow, and confusing sign in/sign up flow[5]) and AWS Cognito (too complicated/difficult to use). Auth0 was a contender, but they don't support guest logins.
[2]: https://www.serverless.com
[3]: https://jamstack.org
I moved a React side-project from CRA to Next.js for server-side rendering benefits, but the latter doesn't support directly importing css styles in jsx to avoid problems with the global scope.
The two options offered were CSS modules and CSS-in-JS. I didn't like either approaches having hashes in the classname when opening the website in devtools, and both seemed too locked into React/JSX.
Tailwind 1. doesn't have component framework lock-in 2. doesn't make me think of css classnames 3. atomic classnames are readable in dev tools 4. provides default colors and box shadows, etc.
In addition, they're starting to make a render-less component library (https://headlessui.dev/): that means you can customize how components look without having to understand how its javascript internals work, which I'd find a huge plus compared to other libraries like ant design or material-ui.
- vite + react
More beginner friendly than webpack in starting a new project, and faster developer experience: page reloads almost instantly when you're modifying a component.
A good 5+ years ago I built HasGluten [1] with react backed by a google spreadsheet, hosted on github pages. Proven technology, it's still working.
More recently I hacked together MultiPreview [2] with react + API served by firebase functions. I'm also temp using firebase hosting as I have little traffic, but plan to replace it with edge computing / CDN caching.
MultiPreview is backed by Saasform [3]. This is more like a classic node/express (nestjs) application, but I really like how we're separating concerns: the SaaS = MultiPreview handles the biz logic / Saasform handles landing page + auth + payments.
While building the new landing page I played with and liked a lot Bulma [4], I used but didn't like AlpineJS [5] and I'm thinking to move to Hotwire [6].
My personal experience is that performance only matters when you're big enough, so in the near future I want to experiment more on usability / nocode side. And I'd love to see more open source alternatives to the big ones.
[3] https://github.com/saasform/saasform
[4] https://bulma.io
Semantic: embed data directly in HTML. If I have a list of wines with categories, each wine's "class" attribute has a class for each category.
HTML: can be generated by anything and consumed by anyone. Great SEO.
CSS: These websites were all made with the same HTML, only CSS changing. http://www.csszengarden.com/
Let's imagine we have a checkbox, that when checked, should dim every wine that is not a white wine. Next to it is a div of wines, with the "container" class. The div contains wine elements.
3 lines of CSS:
input[type="checkbox"].whiteWine:checked + .container > :not(.whiteWine) {
opacity: 0.5;
}
You can replace the checkbox's appearance with an image, a video, just about anything– it doesn't have to look like a checkbox.This would take many lines of JavaScript in any other framework.
Instead of attempting to warp HTML into a UI library, this uses HTML as a data format, and CSS as a way to present that data.
Rust + Actix + Yew (Rust browser framework compiling to WASM) => also verrrry nice vor SPA-first!
Slightly more traditional: Kotlin and jOOQ on the server side.
I also tend to let go of the HTML syntax lately, by using templating eDSLs such as in Elm, or in Rust's Maud[3], or in Kotlin's kotlinx.html or HtmlFlow.
[1]: https://www.youtube.com/watch?v=Ie-gqwSHQr0
[2]: https://github.com/hasura/ra-data-hasura
1. template: https://github.com/adnaan/gomodest-template
2. template demo: https://gomodest-template.fly.dev/
3. SAAS starter kit using the template(wip): https://github.com/adnaan/gomodest-starter
4. SAAS starter demo: https://gomodest.xyz/
[edit: formatting]
- Content all markdown
- Tailwindcss for styling
- Phoenix provides a extremely fast framework
- No database at the moment
- CI/CD with github actions
- Automated deployments with Gigalixir
I switched to gatsby and I notice that I was spending more time fighting the system than writing.
You can check it out here: https://allanmacgregor.com/posts and the code is available here: https://github.com/amacgregor/amgr_phx
My mom’s website is basically a directory of old mansions in former eastern Prussia. Site is in German: https://gutshaeuser-ostpreussen.de
Anyhow Stack chosen:
Backend/CMS as a Service: https://prismic.io/ which is really great because it has an easy user interface that supports drafts, media, i18n (planning a polish version of the website) and defining custom types for pages which is great to force my mom to enter data consistently.
At first I used their SDK to simply query the data and rendered the Page while writing my own static site generator. Obviously very tedious. Since then I have moved away from that and landed on Nuxt which works well for me, because it allows me to iterate faster. Nuxt also supports rendering static pages https://nuxtjs.org/blog/going-full-static/. All of the JavaScript bits are basically progressive enhancements.
The page is then deployed via GitLab pages. Every time my mom changes a page, a webhook triggers a build of the Site.
What really eases my mind is the ability to simply backup all the data entered, as simple JSON files. So I don’t feel like there is any big vendor lock in with Prismic.
https://github.com/Bogdanp/koyo - Koyo: a web app toolkit written in Racket
https://github.com/yawaramin/re-web - ReWeb: a ReasonML/OCaml web framework
https://cons.io - Gerbil Scheme has an embedded web server that supports writing handlers for
Here's what Datasette looks like by default:
And here are three websites that are actually just Datasette with some custom templates and plugins:
- https://datasette.io (data: https://datasette.io/content code: https://github.com/simonw/datasette.io )
- https://til.simonwillison.net (data: https://til.simonwillison.net/tils code: https://github.com/simonw/til )
- https://www.niche-museums.com (data: https://www.niche-museums.com/browse code: https://github.com/simonw/museums )
They're all hosted on either Vercel or Google Cloud Run at the cost of no more than a few dollars a month.
Data is defined by the schema and it's used to build a static JSON API on GitHub Pages.
OpenAPI [2] definition for API reuses data schema and you can use OpenAPI Generator [3] to generate clients.
The site uses docsify [4] to display repo's README nicely.
[0] https://beatcracker.github.io/toptout/
[2] https://swagger.io/specification/
The idea is that the app core is written once in Rust and bindings are automatically generated to all target platforms.
I have a project that starts with protobuf files and generates Rust for the shared core, and Dart (ffi) and JS (wasm) for the client stubs. The generated client interface is “platform-native-async” so Dart Futures or JS Promises. The bridge passes protobuf messages back and forth between both language contexts and takes care of the threading/async mapping.
- Backend: Java + Spring Boot
We went there from node and we did try a lot of other backend stacks (Go, PHP, Clojure, Python, ...). Java has evolved quite nicely recently, APIs and libraries are rock-solid, well documented and battle tested. I plays very will with our DDD approach anyway. Many problems have already been solved for us here. Flyway for migrations, custom session handling mechanism. We do not use an ORM.
- Frontend SPA: Svelte
Again, we tried most of it, from vanilla JS, over Backbone+Marionette through React, Angular 1 - ?? and Vue. Svelte is a good compromise of an opinionated approach, high flexibility and ease of learning. It scales very well for big applications. Built with webpack.
- Frontend styling: Bootstrap
Yes, we developed with all of them again, even wrote our own. IBM Carbon is nice, but the svelte implementation has potential for improvements. People tell me everything looks like Bootstrap, but the point is: it's well tested, very well documented, extensible and accessible, has accessibility concerns baked in and can be themed easily. If done well, an app doesn't have to look like Bootstrap. We might pull in Tachyons for utilities if necessary.
- Data store: MySQL/MariaDB or Postgres plus Redis
You name it, we tried it. Postgres never let us down, we know it very well and its SQL support is a breeze. I personally like MySQL/MariaDB for some technical reasons. We had mixed experience with SQLite and bad experience with SQL Server. Oracle is pretty good, but the pricing is no in our favour. Everything related to caching and session handling goes into Redis. For search and analytics, we might pull in Elasticsearch or InfluxDB.
- Configuration
Config files or environment vars à la 12 factor app. We use Hashicorp Vault for bigger systems. We are dispassionate, though, what ever the client has decided to suffer through will be supported.
Complementary tools and technologies: Docker, docker-compose, Docker Swarm in prod, trying out Dokku at the moment, Keycloak for OAuth, Jenkins for CI/CD, people are trying to convince me to use Github Actions. Deployments are usually done on big machines on an IaaS offering (we run Azure and AWS as well as bare metal), no cluster systems, no micro services. We do not use Kubernetes.
I really enjoy NodeJS/Vue for web apps, but I got sick of having to connect together all the packages from scratch each time, set up ESLint, testing, database connections, write the user auth/management, all that common stuff. So instead, I put together a boilerplate with all my common practices and basic app features. I figure, it ultimately saves me time on all future web apps, and if other people want to build a similar style of app, spending a few hundred on a decent boilerplate is cheaper than hiring a freelancer to do it for it, or even doing it yourself, if you value your time at anything higher than minimum wage.
I'm amazed at how simpler & productive it has become to build apps without getting lost in the whole JS tool ecosystem.
On the personal side I always love using Processing (p5js.org) for interactive canvas visualisations. I recently found out that this can be used with react, so that's the basis for my next learning project.
There's 75+ episodes with a new guest / app in each one. We talk about what tools folks use to build and deploy their apps, the why, best tips, etc..
At the moment there's 188 distinct tools (languages, web frameworks, various services, etc.).
Personally I'm a big fan of Flask and Rails with mostly server rendered templates. Lately I've been combo'ing that with TailwindCSS, Hotwire Turbo and StimulusJS for the front-end.
After a few years I decided to make everything completely static to facilitate some changes. It now uses lxml in a Python script to perform the XML transformation. This is run by a makefile and produces static HTML, which is then uploaded.
My blog (https://ajxs.me) is rendered using a static-site-generator I built myself in Python. Using Python template strings stored in HTML files to create a simple templating engine. The blog entries are written in HTML format and stored in an SQLite database loaded by the build script. The final output is entirely static HTML, not even any Javascript.
I'm experimenting with different formats for writing the entries themselves in, however I haven't found anything yet that gives me more simplicity and control than HTML. The LaTeX to HTML conversions I've tried were way too bloated and messy, and markdown doesn't seem to support the level of control I want. With HTML I have very granular control over the final output in the browser and can create whatever arbitrary content I need to.
Typescript as-required; better language, but adds a build step.
Rust is promising for both front and back end, but backend frameworks are too sparse for websites, and frontend leads to large downloads for the client.
Link - https://github.com/imaginea/inai
Associated post - https://labs.imaginea.com/inai-rest-in-the-small/
- Frontend only, plain javascript, but a lot of it uses a project-specific custom scripting language. This is a game that consists almost entirely of procedurally generated written content, so I write a language that makes it easy to categorize procedural content bits and make sub-calls to new ones. I have a long way to go on language design still, but it's already better than a json blob.
- HTML frontend with some small plain javascript. Backend is node/express, but most of the heavy lifting is done by a shell call to Coil Snake[1], and which inserts a ton of code in ccscript and 65816 assembly. This is a randomizer for Earthbound (http://pkscramble.com/), so those are super specialized tools for that purpose. But I really like the Coil Snake ecosystem, and it's definitely going to influence my projects going forward (the decision to use a custom scripting language above was influenced by ccscript).
- Plain javascript frontend, vertx backend, postgres database. This is my goto for serious projects. It's fairly boring.
On other products I'm using SvelteKit[4], which is the spiritual successor to Sapper, but it's _very much_ in beta, and I wouldn't quite recommend it for production yet (even though it is being used in production for the NY Times).
I've found Svelte to be amazing to work in, especially compared to React/Vue/Angular. The compiler is great, and the final size in production is fantastic. It's also super easy to do things that I previously found annoying/hard/long-winded to do in React.
[1] https://svelte.dev/ [2] https://sapper.svelte.dev/ [3] https://www.listenaddict.com/ [4] https://kit.svelte.dev/
[1] https://findgoodplates.com/
[4] https://aws.amazon.com/api-gateway/
[5] https://aws.amazon.com/lambda/
It's melting the walls between cloud infrastructure and application code and the fact that it does IaC with the same language I use to program web apps (JS/TS) plays an important role here.
I think, it's not 100% there yet, but it's on a good way.
This means I have 1 second turnaround from idea implemented to testable on a copy of live.
Other than that I am still on manual HTML, CSS and vanilla .js!
JavaSE for server and javascript for client.
HTTP Comet-stream over XHR/Fetch for real-time.
Single serving database salt SHA256 for security.
I went with Phoenix and Elixir, and I really liked the combination of a focus on development enjoyment (inspired by Ruby on Rails) combined with an anti-magic attitude, so you can trace through what actually executes pretty easily. I haven't had much other experience though, so that that with a large grain of salt.
My client was very happy with the speed of development and quality of the final product, so I consider it a successful choice by the main metric that matters here.
Edit: The main pain point has been deployment. I spent an afternoon on some shell scripts that scp to a virtual server that mostly work fine, but I don't understand sysadmining very well and I I'm pretty sure they'll blow up on me at some point. It would be really nice if there was a tool that took care of the actual servers part for me.
For the web app I'm working on, I wanted to add some real-time functionality (e.g. being able to broadcast updates to all the users on a given page in my application, and have them interact with each other) without having to write a full SPA. I ended up implementing that functionality using Stimulus Reflex and it's been great.
Stimulus Reflex uses: 1) Stimulus JS for frontend functionality 2) CableReady, a websocket library built on top of ActionCable 3) morphdom, a clientside DOM diffing library to update your UI
I'd recommend anyone who wants to incorporate some more advanced functionality into their Rails app to take a look. (I can't speak to how it stacks up against the new Hotwire/Turbo stack, as I haven't built anything with that.)
Wix and Squarespace with Shopify for ecommerce. Every time I get asked for yet another marketing site at work I make people prove these would not work for them first. 10 bucks a month
I love writing the backend but the frontend part really seems overly complex.
In the end I'm just mirroring my data from the backend on the frontend, having to maintain two models, mapping the json to an object and then inputing that data into another component where it gets displayed. For example I tried to create a generic edit component but without reflexion it was a huge pain in the butt: https://github.com/tschuehly/DataRecovery/blob/f4003ddebbba7...
I would love to just have an html structure and then just having a template for a component filling it in the backend and sending it to the frontend.
I was able to quickly put together a blog with some pretty nice features (e.g. margin notes): https://pratik.is/writing/essays/media-as-food
Writing content in markdown while adding interactivity with JSX is pretty nifty.
If you click "Raw" here you can see how the blog post is just markdown with some custom JSX elements littered in, e.g.
SVELTE[2], routify[3] and Orbit.js[4] for SPA Frontend with API requirements API Platform[5] or JsonApiDotNetCore[6] for Backend
SignalR[7] when realtime is required
And I’ll self-promote, I’ve been working on what I consider to be a “next generation” style system for React that solves my biggest issue with it currently: being able to performantly write styles in a nice syntax that optimize for both web and native. Called SnackUI, still in beta[1]. It has an optimizing compiler that really speeds up React apps a ton, but still lets them run fully on native, even with themes and responsive queries.
I’ve been hacking on a cool project for the last year using the two of them and really believe in them both.
Everything is deployed via Netlify (well except the DB) and I use their functions to emulate a traditional backend.
https://gist.github.com/greim/3de3bcb71a672e11c75e371b7b81f4...
My personal project that has the most use is https://readastorytome.com/. Almost all of the problems/bugs I have with it are to do with my implementation of webrtc and pdf.js. Liveview has been the source of very few problems.
And tinylivechat.com is a WIP that is also using Phoenix live view but I am debating killing it
I created a library to have distributed data types directly on the browser [1]. So there are no servers, data is sync'd directly between people's browsers.
Then I created a library to bind react components directly to my distributed data types [2]. So the app is just a static page, hosted anywhere, that works as an SPA.
[1] https://github.com/hyperhyperspace/hyperhyperspace-core
[2] https://github.com/hyperhyperspace/hyperhyperspace-react
- Gatsby.js static site generator framework
- Posts written as md or mdx (markdown with jsx support)
- Github Actions to build the site
- Published to and served by Cloudflare workers
- Uses [sci](https://github.com/borkdude/sci) and ClojureScript to add a live Clojure REPL component that can be used in blog posts
- Tailwindcss is used for styling via emotion css-in-js and a tailwind plugin.
The setup mostly works ok, but as always with the JavaScript community the amount of breaking changes can be a bit taxing. Because Gatsby handles static site generation the blog works without JavaScript enabled for those that only want to access the static content.
- https://github.com/queer/singyeong if I need message queuing / etc
- https://github.com/queer/crush if I need a basic JSON store or cache or ...
- https://github.com/queer/mahou is my WIP to replace container schedulers
It's a very satisfying experience to see my own tooling reach this level of maturity ^^
In a nutshell, the UI interacts with local state, and a background service syncs local state with server-side state and vice-versa. This theoretically allows the app to remain fully functional even when offline, while maintaining the benefits of your stuff being accessible from all your devices. There's also UX gains as well - your UI interactions don't need to be blocked by network calls.
In practice, that means using something like IndexedDb to manage client-side state, and modelling data as CRDTs or similar in order to have eventual consistency with the server.
And because one of the goals of Objective-S is to blur the hard lines between Unix-style command-line programming, Smalltalk-like integrated development and macOS-like apps, I also wanted to to create something to blend these elements.
The site is served by an Objective-S program that hooks an Objective-C wrapper for libµhttpd up to a bunch of storage-combinators that define the web-site.
The Objective-S program is created in an interactive app called SiteBuilder, which includes Smalltalk-style browsers for the classes the define the program + the resources (some markdown + images). The app has an integrated live-preview that reloads interactively, as-you-type. That preview is served via a special URL handler that keeps everything within the app (no http). In addition it also serves the site on an HTTP port.
The code + resources for the site are stored together in a macOS bundle, so a directory wrapper with the files inside. In fact, this data format is a version of a generic "Smalltalk bundle" that is used by a bunch of different live-editing applications.
To deploy, the wrapper is rsync'ed over to a DO droplet (smallest instance they have) running Linux + GNUstep. This setup has held up to a HN hug-of-death without breaking a sweat, so it's reasonably light-weight and robust.
Other sites are maintained using the same SiteBuilder program, but first exported to a static site.
One thing I'm using that I've seen crop up on this thread is tailwindcss... I've not used it before but I'm really enjoying it so far. It's not a panacea by any means - it makes no attempt to help you organise your CSS or make it modular so you need to 'bring your own discipline'. For example, it's fairly easy to end up with inconsistent design because it makes it so easy to just add a few custom tweaks here and there. That same feature also makes it easy to duplicate information.
That said, for the first time I feel like I can actually iterate quickly on CSS and design in general. That probably says more about me than CSS but I'm having a blast. The fixed set of choices and short/consistent class names mean that I spend less time reading docs and more time iterating, which is great in my book.
Maybe it's an approach that doesn't scale well to teams? Maybe I'll regret it later? Can't comment on that yet but it has certainly given me a step change in CSS productivity.
The rest of the tech I'm using is all pretty dull, with one exception, which is that I'm using the platform to host itself (the backend at least).
Hopefully this doesn't count as too much of a shameless plug but it certainly fits the bill of a 'different approach' as I'm the only user right now!!
The (very basic) landing page is here:
There are obvious downsides - on the back-end it's slower than a proper templating system, and on the front-end you're rebuilding the DOM tree from scratch each time, with all the limitations that includes (performance, animations get interrupted, HTML state gets lost, any event listeners have to be re-initialized). But for simple stuff, I cannot recommend it enough.
Here's a back-end example from my personal website: https://github.com/brundonsmith/website/blob/master/src/rend...
And here's a front-end example: https://github.com/brundonsmith/blogs/blob/master/docs/site....
The stack lately has been
- osprey (sinatra like framework)
- tailwindcss
- sqlite
- alpine.js
- turbo (from hotwire)
Memory usage is really low, so I can have quite a few websites on a single VPS
First j was in love with server side rendering. Mostly it was PHP in many flavors. For projects I had full control over I even built custo frameworks. Then I tried server side rendering in nodejs with frameworks such as react-server. I must say that the overheads were not worth in my experience.
I also tried client side rendering with js frameworks such as angular (v. >= 2) and react, but to be fully honest that was a not idea solution for "static websites".
Lately I've combined all these experiences and I've built my own static web site builder, YASSB (https://yassb-foss.github.io/). I've built it combining what felt tome like the best features of all the above. In short:
- websites are pre-rendered and served as static websites
- pages are composed with reusable components, these can be simple HTML components or can be rendered with js.
That said, I’ve long maintained a blog. I prefer to build my own tools. I wrote a highly opinionated static site generator in Go over the course of the few evenings during March.
I used to use Ghost to host the blog on DigitalOcean but got tired of chasing NPM updates. I got a small VPS instead, installed OpenBSD, and now the site runs off relayd+httpd. relayd handles setting caching headers. httpd handles serving of HTML.
It’s working really nicely. If I didn’t use IBM Plex Sans as a font, my site would easily join the lists like 10kb club. I do set the caching header for it though.
Other than that, I’ve got a couple of side projects I’ve been noodling on. Back end will probably be Go. Front end app will likely be PHP/Laravel. PHP 7+ has been really nice to work with and it runs well on OpenBSD. If it ever got popular enough, shifting to elastic deployments with Docker/LXC/Podman would be straightforward.
- Chakra-UI (for ui + ux)
- Hasura (graphql + postgresql)
- Express.js (for custom actions, event hooks etc)
- Kafka for message brokers
Previously, I was fullstack javascript developer using raw html with only express js and its renderer. Later I discovered ui and ux, react with dsl also graphql as data layer overwhelmed me. So I found simple stack for faster shipping. Learning curve is not that difficult I think.
Here's the new version (WIP):
It's written in Haxe (transpiled to js), runs on a single VPS with all of its data in SQLite, and is cached behind a CDN, making it pretty snappy.
We're a live message tool and it is basically what Elixir is built for https://github.com/papercups-io/papercups.
The Elixir community has been great and incredibly friendly. I originally was worried about the size of the community but that hasn't been an issue the community has been super helpful. I also think the annual stackoverflow usage surveys are very misleading because most of the community's questions get asked in ElixirForum and not on Stackoverflow.
Phoneix is the web framework of Elixir which is very similar to Rails but minus a lot of the magic has been very helpful for our productivity as well.
If I had to built another service that is websocket heavy I would definitely use Elixir. Even if it was a standard crud app I would still most likely choose Elixir.
Feathersjs seems to be just the right amount of magic: choose a backend store with a model, and it creates REST CRUD endpoints for you.
You can drop down to middleware or ideally use "hooks" that activate before (e.g. permissions) or after (post processing) each CRUD call. A new endpoint is a breeze to set up.
The idea is that developers who know business problems are usually bad at frontend. This is a tool to help them build web apps without much html knowledge.
Based on ocaml’s type system which is a delight to use.
I’ve been working on this codebase for over a year and I’ve yet to see a runtime error. Maybe there was one minor one, not sure. It’s remarkable.
Pug and Stylus for html / css preprocessors, especially if you're new to coding.
I used to teach a lot of web dev classes to non web devs (mainly designers looking to upskill). One of the worst parts of html/css (or code in general), particularly when you're experimenting, is the strictness. Pug and Stylus are great preprocessors for experimenting and rapid iteration, particularly because they don't care. Pug doesn't care if you change between its syntax and html. Stylus doesn't care if you missed a ;, or a : in your style declaration. They are forgiving languages, essentially the antithesis of something like Typescript.
Absolutely excellent when you're trying to wrap your brain around something. I highly recommend them.
App written with Electron & Angular. Includes a "web app" inside that gets served so you can browse videos on your phone - built in Angular.
The public-facing website is built in Gatsby, and served from the cheapest hosting I could find: $3/month - also connected to CloudFlare for free-tier CDN.
Made a small webpage for users to download their purchased app too - just 3 pages built with PHP (so fast and easy!)
All code is MIT open source: https://github.com/whyboris
Here is an example Calculator App I've made: https://codesandbox.io/s/fervent-elion-isq29
And here is the ECS library I'm using (which I've written): https://github.com/brochington/ecstatic
I plan to write the server in Racket (likely leaning heavily on [0]) and have it interface with a sqlite database. Since the load will be quite low, I'll put it on a small VPS.
I've enjoyed using Racket for some small projects and am interested in scaling up my abilities to use it in a larger project. Based on my reading the first half of [0], it seems like something that's achievable give my other constraints (real job, etc.).
Its a hack. There are edge cases. It was a proof of concept that has carried me over the line. I even have extra plugins for server side render and compile time render.
I keep meaning to write it up and try and port the tests to weboack itself (so I can argue for missing features), but it does what I need, I'm not a front end dev, im busy elsewhere (in life and work).
Mongoose-patcher [2] for using it with mongoose / mongodb.
Json-patch-rules [3] for declarative security on patch operations.
https://github.com/GWBasic/pogon.html
About a year ago I decided to learn Node.js by writing a personal blog engine. I wanted a rich, template-based server-side rendering engine that would share things like headers and footers among different pages.
Mustache and Handlebars (templating systems for Javascript) are awesome, but they don't have the rich kind of HTML-aware templating that I was looking for.
It was a fun challenge to secure it and make sure it doesn't get overloaded, as its on a cheap 30$/yr VPS. since UML doesn't need any CPU extensions, it just about works anywhere.
You can read a little but more about how I built it under the "UML" menu [1].
[1] https://jrwr.io
[1] - sql.js - https://github.com/sql-js/sql.js/
I use Quasar (based on Vue) for everything. Yes, it makes it look like I have a hammer and everything looks like a Quasar-Vue nail,but it always works.
Everything is enclosed, components, canvas,... SPAs are easy, WPAs are easy, everything is easy.
The community could be better but the docs are excellent.
I've learned quite a few things about Vue using Quasar, so this is a plus too.
As for the back, nothing fancy, usually Python with flask.
https://craftwork.design/downloads/method-4/
It ships with many layouts, blocks and components in React that you can mix and match for building landing pages. If building a page from scratch isn't in your wheelhouse it's quite useful to get something out quickly.
For a hobby project: Typescript, Vue, Bulma, Buefy, Rocket (Rust), Postgres
I’m slightly worried about the bulma/buefy choice as there doesn’t seem to be a very active online community, but they work well so far.
I’m hosting on render but I don’t know if I’ll continue to use them if it starts getting serious with real clients.
Is there anything like Django in the node.js world? I mean that gives you so much stuff out of the box?
It’s all in Golang. Using Pulumi to deploy into AWS. CDN, API Gateway, Lambda, S3.
I’m planning to add DynamoDB for metadata and the recently released S3 feature which allows for on-the-fly transformations of objects.
It’s been a breeze. Absolutely loving it compared to all the static generators and JS-heavy alternatives I’ve built in the past.
I also find some pleasure in finding the resulting HTML being neat too.
It plugs into React stacks, including SSGs like Gatsby/Next.js, and continuously generates code that you can override/extend. (I work on this!)
Arc's kind of underrated. It's nice to spin up a form to do arbitrary things without having to hook up any other boilerplate.
Basically, single VPS with dokku managing multiple sites. Easy to add SSL and more websites whenever.
No regrets so far: it is productive and handles complex state really well.
Provides "core services" for web apps much like mobile OS's do for native apps. Also allows devs to fork existing published apps and built from a pre-existing codebase.
Fun to experiment with.
[0]: https://blitzjs.com/
From your website: "we transfer control to the first PHP file, the router, and begin by importing my little toolbox I've accumulated over the years." If you wanna "get stuff done" that doesn't sound simple or fast.
You don't use any js frameworks? You write CSS by hand and throw out all the benefits of SCSS?! This all applies just to your personal blog. It would not scale.
"It's a total hack achieved by careful output buffering, variable scoping, and function overloading" how is "a total hack" simpler than OOTB functions provided by a PHP framework?
You're even defending ragged-left aligned-right text. In any country where uses are used to reading left-to-right this is the slowest way to read, this has been studied well before the web existed.
For other clients (that need a CMS) it's WordPress.
- React/ Js framework
- Deploy Static Files to S3
- Cloudfront for cdn
- Cloudflare pointing to cloudfront cdn
- Cloudfare Page rules for protected sites / no need create login/auth
- Flask
- Postgres
1) React/Next.js front-end app 2) Lumen (PHP) for the API
Maybe not novel per se, but highly performant and effective.
- JavaEE (see Adam Biens talks)
- ASP.net core
Maybe more HN usual:
- Quarkus (program real Java like its PHP with instant reloads)
So the processing can happen where the static site generator runs.
I create a static site (happens to be with Hugo) and rsync it to a tiny running Nginx.
Normally, I would have gone down the typescript + react route. I'm a backend developer but I've done some frontend projects with it before. But I was the only one on the team with relevant skills here.
So, instead I salvaged what I had which was lot of Kotlin know how in the team, a Kotlin multiplatform library that we built for Android already (api and model classes), and a Kotlin backend. So, I took a calculated risk of picking Kotlin-js as the main way to do our frontend.
I stumbled across a new framework called Fritz2 last year, which is written in Kotlin. I liked what I saw. We did a few spikes end of last year to check if it could do the job and worked as advertised (yes). Then we built a new web app with it in a very short time. I would normally not recommend people take that much risk but in our case it was defensible and it worked out great. In retrospect, we've been very fortunate as this is simply a very well designed framework. At this point we are very productive with it and have a feature complete app that we are putting in the hands of customers. Two months is not a lot of time to pull that off and I'm lucky with both the team and the technology we picked.
What do I like about this:
- It's just another Kotlin project. That means great tools, great language, and it happens to compile to javascript and run in a browser. We refactor at will, use nice Kotlin DSLs, have autocomplete for just about anything.
- Fritz2 is written by a small group of developers that know a lot about frontend development. So you get decent component technology (loosely inspired by react), everything is reactive by default (because Kotlin has great support for that), and they also integrated solutions for things like styled components, using and creating web components. So in short, it's a very modern feeling framework that should feel right if you are expecting clean code, components, and sane architecture.
- The Kotlin tooling for javascript is pretty great. It comes with lots of ways to integrate with the javascript world. E.g. we integrated leaflet and that was pretty straightforward: add the npm, adapt a few of the typescript mappings. Dukat which is the kotlin type mapping generator that does this automatically nearly worked but ended up generating a few problematic areas. So, I expect this to get better. But manually writing some mappings is not that hard.
- Kotlin StateFlows are a great way to represent state. Basically, components subscribe to state flows and respond to any changes you put there. This is a core concept that Fritz2 pushes hard with a concept of stores that store data classes and sub stores that you can derive from that for individual fields. It basically makes you do the right things with your state and you get very type safe and easy separation of rendering code and state management. If you come from Android, that's pretty much how things work there as well these days. Also, it's similar in newer frameworks like Swift UI and Jetpack Compose.
- Fritz2 uses kapt, which a compile time annotation processor, to generate code from model classes to make it easy to subscribe to changes in web components. That gets rid of a lot of boiler plate.
- It uses webpack underneath, which gives us a lot of flexibility for how we build our software. We also use cordova to produce native wrappers. With some plugins even.
- We use koin for dependency injection. And it's just as important of a design pattern in frontend as it is in backend code. Koin is what we used on Android and it's a great fit for Fritz2 as well. Nice testable code and we don't have a lot of Baron from Muenchhausen style self initializing code (like every messy js project I've ever seen).
Things I don't like that are long term fixable:
- The kotlin-js tooling still has some rough edges. It got a lot better with Kotlin 1.4. though. But undeniably, you will have to do some problem solving when dealing with this. Despite this, we pretty much hit the ground running with this and have not lost a lot of time over this.
- Source maps particularly seem flaky. So, debugging in a browser is a bit meh in a browser. If that matters to you, it's a problem for now. I expect this to get fixed as they improve the new IR compiler for kotlin-js.
- Performance of the build tooling and compiler is not great. In fairness, it's not a whole lot worse than the typical webstacks out there. It actually uses webpack underneath. But it's definitely not very fast. They do have incremental compilation and usually changes load in the browser after a few seconds. So, that keeps productivity high.
- There are not a lot of people doing this yet. So, you need to get creative solving issues. That includes reaching out to developers on the Kotlin slack, digging through OSS code to see how stuff works, etc. The community is very supportive. But if you hit a problem, Stackoverflow does not have all the answers just yet.