Dear coders of the world,

A friend would like to code a homepage for a joint project from scratch with PHP, HTML and CSS. What is a good resource to explain why nearly no one does this anymore?


What do you mean by "no one does this anymone"? Assuming you mean PHP, it is still widely used and there are reasons for that other than just being one of the first server-side languages:

And just for fun:

@mstrohm I mean not many use plain PHP. Your first link claims 79% of homepages use PHP. I presume they include WordPress in that number and homepage made with Laravel, ...

My impression is that nearly everyone uses some sort of platform to develop homepages and only really big sites code it from scratch (or my 20 year old personal homepage 🤡 ).


Regarding the use of platforms, it is a choice between dependence and independence. If your friend wants to stay independent of a specific platform, it would be good to use either a static site generator or something like wordpress.

@VictorVenema because it’s easier and more efficient to use wordpress. normies can administrate WP. you benefit from all the effort the WP devs and plug-in devs go through

@ppercepptionn I code WordPress themes myself. It is not easier in general. You have to learn additionally how WordPress works. So for a really simple homepage plain PHP would probably be easier.

In this case we start really simple, but in the end it would be a database backed system, with users with various user roles, with moderation and an API. It is clear to me that a platform makes this easier, but I find it hard to explain to someone who does not know these platforms.

@VictorVenema yeah think of it this way you are not in the business of building a reliable platform, you are in the business of using that platform to make money for some other business
Using the platform

How far can framework-free, zero-build codebases take you in 2021?

@zap Interesting post. Are you arguing that native tools are good enough nowadays that we no longer need frameworks (for some projects)?

@VictorVenema PHP is still fairly low level. If you write sites that even modestly complex you will find yourself writing the same boilerplate code again and again (or you start reusing your old code and are basically writing your own little framework). Frameworks like Laravel provide all the constructs you typically need for a site. Yes, it does 'force' use to follow a certain approach (MVC), and that can be limiting, but in my experience for most not-to-unusual sites that's totally fine. 1/2

@VictorVenema Plus, I wager that, unless you are an experience PHP coder, you will find that the approach you used to code the first, simple version of your site will be hard to extend and you'll likely end up with a big mess of code. Frameworks like Laravel ensure that, or at least support, you use a certain architecture right from the start and stick with it.
Of course you can code yourself into a corner even then, but I believe it's less likely. 2/2

@VictorVenema Even plain HTML/CSS sites are usually done with a static site generator these days. Using tools like these automates a lot of the work that would otherwise have to be done over and over again, wasting a lot of coding time, for a result that hasn't been audited by as many eyeballs.

Melde dich an, um an der Konversation teilzuhaben ist eine Mastodon-Instanz für Bonn und alle, die Bonn mögen.

Impressum, Datenschutzerklärung