5 ms·
The thing that hurts PHP the most is lack of structure and patterns used in the most popular projects. These popular projects are usually where the bulk of work
by cdnsteve 10y ago
The thing that hurts PHP the most is lack of structure and patterns used in the most popular projects. These popular projects are usually where the bulk of work lies, where developers point to when they're considering PHP. When juniors start they're typically working on WordPress or Drupal. The problem is that WordPress and Drupal are terrible guides of how to write a web app and that knowledge is completely useless when you go to write something in an actual framework. I was expecting a lot with Drupal 8 but I decided against using it entirely after reviewing the codebase and testing it out, 7 is in no way compatible with 8 and you have to start over.
When you step outside these mini ecosystems and look at PHP as a vanilla tool to work or to use a proper micro/full framework you start to question why use PHP at all? One possibly acceptable framework, in my opinion, is Laravel. The problem is PHP outside of these mini ecosystems isn't nearly as popular. It looks like people migrate to an entire new language like Python, Ruby, Node, etc. If we're talking about sheer people hiring Ruby, Node and Python typically trump PHP every time and are using frameworks - not Drupal or WordPress. Granted there are custom PHP apps out there and some very good ones but they're not the norm.
I switched full-time to Python using Flask and Django. It's like a breath of fresh air. My 2 cents is if you're on the fence, figure out how to work on one project using this new language full-time. Then you can make a better decision.
- staticelf 10y agoI used to like Laravel, but lately it feels so enterprisy. There is a lot of boilerplate in Laravel today and it was changing too fast for me to keep up with it.
- supbpeerr 10y agoUsed to love Laravel, until I learned the hard way it is utterly impossible to debug when shit do hit the fan. Some related discussion here: https://laracasts.com/index.php/discuss/channels/general-discussion/how-the-hell-do-you-debug-properly-in-laravel?page=1 https://laracasts.com/index.php/discuss/channels/general-dis...
- ryanlm 10y agoIf I were to build enterprise software in PHP, I'd use Zend Framework. Not sure why it's not as popular.
- Gigablah 10y agoProbably because if you're using Zend Framework, you might as well go all the way and just use Java Spring.
- ryanlm 10y agoIf I were to build enterprise software in PHP, I'd use Zend Framework. Not sure why it's not as popular.
- serg_chernata 10y agoHonest question, didn't they switch to focus on enterprise and slower release schedule? Wouldn't that be easier to keep up with?
- staticelf 10y agoI have no idea since I don't use Laravel or PHP anymore, but I tried it a couple of months ago and it seemed completey different from a year ago or more.
- arenaninja 10y agoThe more I used Laravel the less I liked it. I like Laravel Elixir (the npm package) and Eloquent (the ORM). Laravel itself is overly complex and the learning curve keeps getting higher. I'm much happier with Slim 3
- kyriakos 10y agoThat's what I do as well. I mix and match components such as eloquent, guzzle, pux router, twig and stay away from monolithic frameworks.
- acomjean 10y agoI think with the composer package manager mixing and matching components fais what makes modern PHP so effective. I'm using the mini-framework Silex and a bunch of components I find useful (twig, phpexcel ). It works pretty well.
- cdnsteve 10y agoThe thing that kept me away from it for actual enterprise use was the fact the project is run by a single person. Where would it be without Taylor? Django and others have actual foundations that will keep it going for the long-term, more mindshare and more committers as part of the core project team.
- ceejayoz 10y ago> Where would it be without Taylor? The flip side of that question, though, is "where would Laravel be if it were built by committee rather than benevolent dictator?" I'd wager Taylor's "I'm doing shit my way" has been at least part of what has made Laravel so successful.
- Navarr 10y agoHave you tried Yii at all? In my most recent (side) project, I'm doing a Yii2 website and I'm feeling like it's not enterprisey enough. I have to go out of my way to figure out the best way to split things apart (which, I guess is good because it doesn't actually make that difficult for me at all - it's just something I have to choose to do)
- staticelf 10y agoNo I haven't and I probably won't, since I don't do php anymore :)
- andyphillips 10y ago+1 for Yii2, I've used it for many big projects, it's rock solid and faster than most libraries of a similar size.
- dpcx 10y agoI used Yii2 at a previous job. The way that it splits things out feels horrendous. The documentation is sub-par, and I feel like I spent more time trying to figure out why something didn't work the way I expected (from reading the code) than I did fixing things. I'm sure at least some part of that was the previous developer who built the application. But there is absolutely no reason for documentation to not answer the basic questions that seem to come up many times per day in their IRC channel.
- Navarr 10y agoMy experience has been 100% different from yours. I commonly recommend Yii and laud it's extensive documentation and "Definitive Guide" that covers basically everything. In my current experience as a developer, Yii's documentation is the best I've ever utilized. Much better than any Javadoc I've googled or even php.net's
- porker 10y agoWhat are forms and form validation like in Yii? [Have looked at the docs, but after real-world usage] I've used form libraries from the PHPClasses one back in 2003 through Symfony forms now (which has cognitive overload, and is so flexible as to be restrictive). Most business systems I write are data focused so forms play a massive role in them - and in my developer happiness.
- porker 10y ago> I used to like Laravel, but lately it feels so enterprisy. You think that feels enterprisy? Try Symfony, and listen to the community, with its "way to do things" that change every 6 months depending what's in vogue - and each time are invariably more abstract and complicated.
- segmondy 10y agoThe thing that hurts PHP is also the very thing that makes it popular and creates the demand. it's easier to build things with it. It's damn near the BASIC of backend programming.
- Domenic_S 10y ago> 7 is in no way compatible with 8 and you have to start over There's an upgrade path, sort of, but more importantly major versions of Drupal live for years. I think we'll keep seeing new D7 projects for at least 2 more years.