As a long time software developer who hasn't done full stack in awhile (since 2013), what's everyone's go to web hosting stack today? Wanted to quickly put together a simple website with react/node.
Immutability down to the database
Database reads scale horizontally
Impossible SQL injection from reading API
Cache TTLs can be set to infinity
Can ask for data at any point in time or do speculative writes
Same programming language front and back
Running queries within loops are performant due to data locality
Query results can be returned with nested results
The database can be queried with Clojure functions
Data shape is defined at query time, not at schema time
Specs can enforce stronger safety than types
Specs can help generatively test your application
Prolog -> Datalog many things from SQL can be expressed easier in datalog i.e. recursion, nesting, joins etc
This kind of stack is just getting started, see hyperfiddle as a real-time app builder that leverages these primitives that thing is off the chain powerful it can render itself inside its self, can express blogs, tables, crud applications very easily, once that gets deps support no reason it couldn't support much more complex apps
The equivalent would be a site were you could write SQL client side, to define your data for your application then add react code to complete your app
This is very cool and certainly unique compared to some of the other responses. How much have you used this in production? Have you worked at companies that do?
Backend: Go (no framework, just the standard library) Frontend: Vue Working great so far. A little longer to get things up than using Rails/Django, but the extra speed and control is really nice. Using Go's templating engine to assemble Vue components into HTML
I haven't yet seen any concrete tutorials for getting this up and running with Vue and Go. All I've been able to google is augustoroman/V8 and dop251/jago and other derivatives.
If you’re using a service like Netlify to host your front end code, you can use their predenderer (if you’re okay with 24H TTL) or run your own prerendering engine with Google’s Rendertron (Headless Chrome packaged as a renderer)
JS has its uses. Once in a while I see a site which actually needs it and makes proper use of it. Much rarer, I have to develop such a site myself. But generally, I hark back to ancient times when websites meant html and css. When I do need a dose of JS, I usually go with something raw, or the unfashinable jQuery. I abhor the thought of JS in the backend.
Html and css always via Pug and Sass. Out back, I really, really like minimalism, usually in the form of a single executable made with Nim. Static link whenever possible, so I can just bang the thing unto anything linuxish. For a reasonably low-volume site (meaning 99.9% of all sites), I go with SQLite for data. Yes, there'll be shouts of outrage that I shouldn't do it. These I know I can safely ignore, but keep my code clean and simple and easily portable to Postgresql if the should occasionally arise. Sometimes I need easy access to every library function ever written, so I'll drop the purity and go Python. Bottle or Cherrypy is what like to build on, then. No matter what, these days run the whole thing behind a Caddy server and be done with any headaches over configs and https. I realise, of course, that I am completely out of whack with current general consensus. So be it. My stuff works, and works fast, and I can cram amazing amount of it into a fairly low-end VPS.
I use the exact same setup using Go instead of Nim.
It works marvellously well. I use VueJS when I have a page which requires more intensive JS. For dead simple use case (no subdomains), I was even able to embed caddy within my static binary file. Serving hundreds of users on a $5 VPS.
And yes of course, Go. Solid language, good tools, and a much richer set of libraries than Nim. First rate solution, and I have tried. Several times. But for some reason, Go and I always end up in a shouting match, and one of us inevitably slams a door. It's a purely personal thing.
If it's a brochure site, use a static site generator and put your generated stuff on S3. I happen to use Hakyll, but they're all more or less the same and nobody cares what software generated your files.
If it's a web app, my weapon of choice is Haskell/Yesod because I have opinions about how complexity grows over time and how that should be managed. Dynamic languages fall short of my needs. If I need a complex UI (lots of state and interactivity), I use Elm. It works, and in my experience it works better than dynamic alternatives (JavaScript, ClojureScript, etc). TypeScript and Flow are not alternatives to Elm. For storage I just use Postgres, and sometimes Redis if I need it. For infrastructure, I do just about everything with Nix/NixOS/NixOps (although I develop on an Apple Macintosh Book Air).
Comments (441) 141 threads
Earlier commentsThe equivalent would be a site were you could write SQL client side, to define your data for your application then add react code to complete your app
Backend: Go (no framework, just the standard library)
Frontend: Vue
Working great so far. A little longer to get things up than using Rails/Django, but the extra speed and control is really nice.
Using Go's templating engine to assemble Vue components into HTML
I haven't yet seen any concrete tutorials for getting this up and running with Vue and Go. All I've been able to google is augustoroman/V8 and dop251/jago and other derivatives.
My only dependency is Vue (and vuex), and I only send the components that the current page needs (packed into a single
Html and css always via Pug and Sass.
Out back, I really, really like minimalism, usually in the form of a single executable made with Nim. Static link whenever possible, so I can just bang the thing unto anything linuxish. For a reasonably low-volume site (meaning 99.9% of all sites), I go with SQLite for data. Yes, there'll be shouts of outrage that I shouldn't do it. These I know I can safely ignore, but keep my code clean and simple and easily portable to Postgresql if the should occasionally arise.
Sometimes I need easy access to every library function ever written, so I'll drop the purity and go Python. Bottle or Cherrypy is what like to build on, then.
No matter what, these days run the whole thing behind a Caddy server and be done with any headaches over configs and https.
I realise, of course, that I am completely out of whack with current general consensus. So be it. My stuff works, and works fast, and I can cram amazing amount of it into a fairly low-end VPS.
It works marvellously well. I use VueJS when I have a page which requires more intensive JS.
For dead simple use case (no subdomains), I was even able to embed caddy within my static binary file.
Serving hundreds of users on a $5 VPS.
And yes of course, Go. Solid language, good tools, and a much richer set of libraries than Nim. First rate solution, and I have tried. Several times. But for some reason, Go and I always end up in a shouting match, and one of us inevitably slams a door. It's a purely personal thing.
https://crawshaw.io/blog/one-process-programming-notes
If it's a web app, my weapon of choice is Haskell/Yesod because I have opinions about how complexity grows over time and how that should be managed. Dynamic languages fall short of my needs.
If I need a complex UI (lots of state and interactivity), I use Elm. It works, and in my experience it works better than dynamic alternatives (JavaScript, ClojureScript, etc). TypeScript and Flow are not alternatives to Elm.
For storage I just use Postgres, and sometimes Redis if I need it.
For infrastructure, I do just about everything with Nix/NixOS/NixOps (although I develop on an Apple Macintosh Book Air).
All comments shown.
Couldn't load more comments. Check your connection and try again.