4 ms·
I can empathize with your lament that it used to be easy to spin up a quick website. It sounds to me like your experience as a software developer blocks you fro
by philihp 4y ago
I can empathize with your lament that it used to be easy to spin up a quick website. It sounds to me like your experience as a software developer blocks you from willfully making mistakes we've all learned the hard way.
SSI still works, and you can turn it on with Nginx. It's still quite limiting and fragile.
PHP still works, but as your project grows, unless you have equally experienced PHP developers, you'll see things get out of hand quickly with scope issues.
CGI will still work, but similar to PHP, it's a headache to setup the sandbox so a malicious or naive committer doesn't clobber the environment. At least PHP's defaults were pretty sane until someone does something cute and bypasses magic quotes and introduces some SQL injection.
Let's give AWS Lambda some credit though, it's virtualized and containerized CGI and can scale to handle loads that you'd think your backend was written in Elixir.
- ad404b8a372f2b9 4y agoFor what it's worth, since you mentioned it, I've found Elixir & Phoenix to be incredibly easy to setup for that purpose. In an hour I had a website running plain HTML and CSS and a few pages with server-side dynamism. In two I had a database, secure auth and stripe integration, it is insanely fast. I think the issue is more cultural than technical to be honest. If you want to learn how to make a website the first thing you're told to do is install node and spin up npm, it's nonsensical. You can't even buy an HTML template anymore, I wanted some nice looking CSS for my website, I searched all over, even bought a few and they all came with 20 scripts out of the box. Even the supposedly pure CSS libraries that advertise themselves as JS-free come with Javascript (just try to make a responsive header in Bulma). It is an insane culture that seems to have forgotten that HTML and CSS are sufficient to implement 99% of what's online today.
- ryanbrunner 4y agoI think while this is true, one thing that was lost with PHP style development is a model that's an easy stepping stone from "a directory full of HTML files". With PHP (and other things like classic ASP) the model was the exact same - it's just that instead of an HTML file, you would request a PHP file and then that would be what was run. The output of that file is what the user would see. With modern-day backend frameworks, that relationship is severed. Your user makes a request, it goes through a bunch of "stuff", and ends up executing a function. How that happens isn't nearly as obvious. It's learnable for sure, but it takes what is a 5 second explanation to something that most brand new developers chalk up to magic for a while.
- ad404b8a372f2b9 4y agoDefinitely, it's been a source of annoyance for me with Phoenix. While the default request flow is fairly simple (router -> controller -> view), they have the concept of "plugs" which are functions applied conditionally at different steps and which can be defined in a whole bunch of places far away from the functions meant to handle a specific page. It makes the whole request lifecycle very confusing and when an error arises you find yourself in a completely different part of the callstack than you expected, calling some magic function you didn't even know existed.
- philihp 4y agoA good framework hides all of this, and gradually reveals how it works to the user/coder. I think Next.js does this very well, although I'll admit that their "getting started for total beginners" documentation spends way too much time explaining the magic. If I were to throw someone into the deep end to make their own mistakes, as I assume we all did with PHP, I would tell them to git clone https://github.com/vercel/next-learn/tree/master/basics/learn-starter https://github.com/vercel/next-learn/tree/master/basics/lear..., and then experiment with "pages/index.js". Hot reloading that you get out-of-the-box with most JS frameworks is a massive improvement over static HTML, or PHP.
- ryanbrunner 4y agoNext does a really good job of emulating what worked about the PHP model while still having a framework behind it.
- philihp 4y agoCSS frameworks are the worst. It's a lot of effort for a cookie-cutter look and feel, and I'd rather have something functional first. It is a badge of pride to have blue underlined hyperlinks that turn purple if you've been to them before.
- kayodelycaon 4y agoPersonally, I've found bootstrap extremely useful in this regard. Since it's widely used, people have written themes for it. If you stick to the simpler ones, it's not a lot of work to customize after you start with it.
- pwdisswordfish9 4y ago> I wanted some nice looking CSS for my website, I searched all over, even bought a few and they all came with 20 scripts out of the box. Even the supposedly pure CSS libraries that advertise themselves as JS-free come with Javascript (just try to make a responsive header in Bulma) Borrowing liberally from the CSS Zen Garden (still online), or taking a look at the rise of "classless CSS" "frameworks" might be of some benefit to you.
- superkuh 4y agoHow is SSI fragile? It's a wonderful, extremely simple and minimal attack surface way to do templating and some mildly dynamic stuff. I love SSI and nginx for static sites.