6 ms·
i have seen this one on trending php projects on github quite often. as a side note, the php community is quite good at coming up with cms projects. i wonder w
by blondin 7y ago
i have seen this one on trending php projects on github quite often.
as a side note, the php community is quite good at coming up with cms projects. i wonder what makes the language so nice for writing content management systems in? might be interesting to learn about.
- muglug 7y agoIt’s fairly simple, with a syntax close to JavaScript that’s easy to pick up.
- milankragujevic 7y agoThere are many languages that are as simple or even simpler than PHP in syntax, and if you're comparing it to JavaScript, nodejs is literally JavaScript. PHP's biggest strength is ease of deployment and popularity. Deploying a nodejs app is a nightmare, because of the fact that nodejs isn't a web-first language in the traditional sense. It's a general purpose language that can do many things, but that causes problems for, i.e. hosting multiple apps on a single server (without having to coordinate ports between them, firewall them off, and have a single nginx instance proxying to them based on domain names). PHP is simple to deploy. If you have a shared hosting, just upload files to the FTP server, and open the page in the browser. It works. If you have a root server, just `sudo apt install -y apache2 libapache2-mod-php7.3` and put the files in /var/www/html/ It's a perfect fit for web because that's the only place where it actually works. It does one thing (platform) and it does it well (from the deployment perspective). It has (had) it's warts in the years, but I don't find many things that it doesn't have compared to other scripting languages.
- flir 7y agoThink you're underestimating the array functions. They might be ugly (programmers tend to prefer expressive array syntax), but their learning curve is the best of any language. So much of programming for the web is "do something to an array of stuff", and PHP makes that super-easy.
- wolco 7y agoThe built in standard libruary has everything you need. No packages are really required.
- wpearse 7y agoNot only this, but the Laravel PHP framework (such as used by Monica) makes it particularly easy to build and maintain such apps. Laravel is great for other things too — not just CMS-type-apps. It’s phenomenally good.
- milankragujevic 7y agoAgreed. Laravel is also fixing many of the complaints people have with PHP [developers], because it tries super hard to make you do things properly, and wherever it is possible, it actively prevents doing things the wrong way. It's really a breath of fresh air in the way it's laid out (IMO) and the documentation is mostly very good, with some areas (weird edge cases) that are lacking a bit, but it's quite usable. I'd recommend someone starting PHP to go with Laravel, and learn it's way of doing things. You can't go wrong and you will learn how to do things the right way. That's what I teach people. Also, this is excellent: https://phptherightway.com/ https://phptherightway.com/
- muglug 7y ago> it tries super hard to make you do things properly I don't have much experience with Laravel, but my sense is that Laravel tries to make hard stuff (CRUD operations, MVC) easy, but it doesn't try so hard to make you do things "properly".
- StuffedParrot 7y agoCash.
- milankragujevic 7y agoAs I've said here (in a reply to a reply to your comment) -- https://news.ycombinator.com/item?id=21850539 https://news.ycombinator.com/item?id=21850539 PHP is web-first, built for the web, and it does it's job well for that purpose. In the years before this boom of SaaS web apps and platforms, the only thing you needed on the web, in almost all cases, was some sort of CMS. PHP was traditionally used for CMS', because that's what was needed (and still is) on the web. It's not a glamorous job, but those CRM, ERP, and other data systems are what power the modern business world. And a large number is written in PHP. Case in point: Serbia's largest government-owned telco "Telekom Srbija" used to use a CRM system written in ASP.NET with WPF client software. In January 2019. they started to migrate off of that solution onto a web based platform written in PHP. It's still kind-of in progress, but I think it will bring them more success. SBB, Serbia's largest alternative telco, has been using that same PHP-based solution for years, and has a smooth customer acquisition process, because it can be done from anywhere due to the web UI. Of course, you can have a Web UI with any other language, but PHP is web native and isn't any worse than other languages, but may provide some advantages. Also, before nodejs was invented, the only truly accessible (as in - simple to develop in, with a tolerant dev environment) language was PHP, if you wanted to do web and web only. There was (and is) Python, Ruby, Java, etc., but they were never easy to use, manage and deploy. Most of the new tools we take for granted weren't available in, i.e. 2005., when the standard dev procedure was to upload files via FTP for a large amount of the world. And lastly, nowdays, I don't think PHP is any worse than other scripting languages for web usage, especially for CRUD information system UIs. And if you need more than it offers, you will find luck only in .NET [Core] or Java, not in Node or Python. Ironically, the company I work for is strictly a no-PHP shop, and does no PHP projects for clients, except half of the Intranet that spans many countries (Serbia, Slovenia, Bosnia, USA, Netherlands, Germany, Phillipines, UAE, etc.) and management systems are written in PHP. It's just useful for the task, and there's no need to change it, or waste money on something that works. The company is old-ish (from 1998.) but hasn't outgrown the systems (yet). I said ironically because I really like PHP, but do .NET with Oracle at work.
- aikah 7y ago> i wonder what makes the language so nice for writing content management systems in? might be interesting to learn about. The fact that you just need to drop a file on an Apache server to have a functional web app. It's not so much the language itself but the execution model of the code. No need to stop/start a server when the code changes, no need to actual write a server since Apache fronts everything. so it has nothing to do with the language, it's about the CGI style model and its simplicity.
- dvfjsdhgfv 7y agoI don't know why you're being downvoted. The sheer simplicity of deploying such tools as Adminer is astounding.
- pmontra 7y agoThat's the reason why PHP became popular and still is but does it make PHP special for CMSes? I believe that the reason is that people started creating CMSes in the mid 90s when the only viable choices were Java, Perl and PHP. There was a wave of big and expensive CMS focused on companies and there were the open source ones we're using still now. Open source went PHP and my guess is that people thinking about CMSes now is heavily influenced by that culture, which is mostly based on PHP.
- timwaagh 7y agoit makes hosting cheaper and deployment easier. you don't need to run a separate server program per app. you share your hosting with others. Sure, things like docker have enabled sharing for other languages, but i think there is still more overhead involved, both in terms of system resources and in terms of setup, so other languages can't compete on price. CMS users also (at least in non-enterprise market) don't care about the language things are written in, because they don't use it. but the price of hosting is important to them.
- aikah 7y ago> but does it make PHP special for CMSes? Well because people who don't know anything about programming just need a cheap hosting with an Apache/PHP/Mysql plan and upload the script via FTP. That's it. Again it has everything to do with how easy and cheap it is for an hosting company to provide PHP/hosting and how simple it is to deploy a PHP application for someone without a programming background.
- undreren 7y agoIt’s a CRM, not a CMS.