79 points · by based2 · 5y ago · 83 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.
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".
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?
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.
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.
I know that everyone uses nginx now and that in the end it has more scalable - event based architecture. But for my scale httpd was never a bottleneck.
It’s just like an “old friend” you can always rely on.
It does look like they've added a few nice little features (i wonder if per listen options means we'd be able to listen on a unix socket?)
* https://httpd.apache.org/docs/trunk/en/new_features_2_6.html
Or just:
The Apache httpd project uses even/odd versioning, much like the Linux kernel. 2.5 is the development branch for 2.6.
Personally I've found apache is more fully featured for niche use cases. For example you can do client cert authentication, then further look up a username from the certificate in ldap for authorisation - all from your apache configuration. For Nginx many of these niche use cases seem to be gated behind Nginx Plus.
2.) Sticky Sessions (and various other features) without having to pay $$$ to F5
I end up reaching for Nginx before Apache these days, but I have a lot of production that uses Apache.
My servers mostly proxy requests to a backend (PHP-FPM, but this is applicable to all other server-side languages). If m requests come in for /foo and all requests have the same cookies, Apache will pass all m requests through to the backend.
nginx instead will pass one request to the backend and then serve the response to all m requesters, reducing backend load. The setting is called proxy_cache_lock (https://nginx.org/en/docs/http/ngx_http_proxy_module.html#pr...)
With Apache I have to put other software in front of the web server (Varnish usually) that does this for me. So switching to a server where I can reduce installs to support by 50% is appealing.
Still no enhanced error code messages for improper use of `.htaccess` files?
(sigh)