by HNTA_1 · 5y ago · 0 comments
Some have never even heard of it, or seen it in the wild.
EVERY page (or site) seems to need a full blown NodeJS server install and tons of React/Vue etc.
Younger folks are blown away at how quickly I can develop a fully functional site with just Flask, good ole' HTML, basic CSS and VanillaJS using only a couple flat files as a backend database.
I could make a similar argument about complex Python or Golang scripts that are basically the equivalent of multiple bash commands piped into a one liner.
I genuinely don’t understand it.
So many small things are just now better - aligned with what we really needed to start with. Whether it's the automatic reactive updating dev server, the fact I can embed CSS directly with my component and have it scoped there, or that I can use properly DRY CSS, or that I can unit test my code separate to the DOM, that I can build my pages in a truly "functional" way such that they are free from complex state bugs ... all these things are small ... but big.
The toolchains now to just do the most basic form with a submit button - it's wild.
Oh how I long for a submit button and a form. I’ve worked on code where there’s just a bunch of divs and input fields: no form no action, no fieldsets, no labels, no submit button. I do not have words for the emotions it causes.
Compare to all those Kubernetes clusters on the cloud for all those microservices that are totally needed today to operate such a large site for one third of a million users correctly.
And maybe it would make even sense to talk about build and deployment times back than.
There is no need to. It is insanity. Maybe using truckloads of complex tooling makes one feel smarter never mind that the final outcome is something akin to "Hello World".
Maybe we just experience now the same people back than experienced seeing the new generation using for example C++ instead of some "straight simple lines of assembly". On the other hand's side there is for sure complexity which you actually want to pay for. Whether such call is or isn't justified can't be known upfront often times.
Given that, my personal opinion on the state of web-development is that it's partly outright insanity for sure. Especially front-end things. Boy, it's just a GUI in the end!
Nobody should care about the code as it should be generated by proper design tools anyway. Coding such things by hand shouldn't feed a whole industry branch instead. Creating GUIs is a job for graphics and interaction designers. They should have gotten the proper tools to get their work done (mostly) on their own. If the alleged "GUI stack" used is so over-complex that it can't be handled effectively by design tooling it's a valid question whether that technology is actually the right tool for the job. But it seems almost nobody is asking this question any more. That's the insane part.
1) HTML + CSS + JS
2) HTML + CSS + Templating system
I would pick 2) for sure.
This is basically why we are building kit55 (https://stack55.com).
FWIW, there are many JS templating engines as well that work with NodeJS too. There are pretty obvious downsides to templating engines that libraries like React and Vue improve upon.
Using flat files as a backend database is great, but not scalable. Does everything need to scale, not always, but it's a lot nicer to have that option and to build it that way from the beginning. It's also ridiculously easy to do so today.
You'd probably be blown away how quickly someone can get a full stack website set up complete with user authentication/accounts management (including reset flows, magic links etc), database integration, front end system, CMS, component design system, and any other goodies.
All this is easily doable in relatively short amounts of time, and makes working with other teams - designers, product owners, marketing teams - so much easier.
Not to mention being able to do everything in a single language. That's a huge win. Engineers can hop around easily and have access to the same dependency management system, language features, etc.
> You'd probably be blown away how quickly someone can get a full stack website set up complete with user authentication/accounts management (including reset flows, magic links etc), database integration, front end system, CMS, component design system, and any other goodies.
> Not to mention being able to do everything in a single language.
I’m interested in learning more about this, especially user authentication and and account management. Also, the single language appealing is appealing.
I’m from the PHP world of things and need to get experience with what the modern stuff you’re describing. Are there platforms or projects that provide the foundation of what you’re describing?
I do agree that you can pump out sites quickly with a modern JS stack, but I definitely think there is room for improvement and it should be idolized as "good" or the way it _should_ be.
In terms of learning that and anything else, the best thing to do is have a project you can work on that supports these and other features. Pick a database (either sql or nosql), a login mechanism (maybe via GitHub to start if you’re building something aimed at developers), and build a simple todo app to start or something else you’re interested in.
The documentation for open source JS libraries tend to be excellent. There are many blog posts and articles as well.
Just go slowly. There’s a lot to learn on both sides (front end and back end) so don’t try to learn everything at once.
If you want to focus on the front end find client side libraries that maybe don’t need a server (googles firebase comes to mind).
If you want to do back end work, don’t focus on the front end tooling as much and just get enough running to hit your server and see data.
Clojure and ClojureScript is probably the best real-world and actually practical example of this in the wild. .cljc files can be loaded by any Clojure runtime, while .clj files are for Clojure and .cljs are for ClojureScript. Many of the libraries in the ecosystem all use .cljc, so you can use the same libraries both in the backend and in the frontend.
Personally I think JS is a much better language. Python is still recovering from the 2 to 3 migration. Meanwhile JS will always be backwards compatible and with TS is a great language to work in. Python still doesn't have a good type system.
But Python code is also not as dynamic as JavaScript, so you can get most of the way with what's already in the standard library. (again, disregarding the missing pervasive typings for the ecosystem)
what file formats in particular?
Lesser number of software to run on the server has resulted in predictable performance and larger savings on cloud costs.
For me the reason to use nginx is ease of configuration. Recreating that kind of configuration in code is possible, but tedious and time-consuming.
In Go you can use default http server, multiplexer and router to serve your http requests directly to your application logic. It also has support built-in for Lets Encrypt SSL certificate via autocert covering all fundamental reasons you'd want a standalone web server for your web application.
After all, we also have a lot of IBM mainframes being used too and, most likely, other exotic stuff in areas I don’t even know about that exist way above my security clearance.