Live data from Hacker News

PHP in 2023

stitcher.io

271–280 of 285 posts

Re: PHP in 2023

#271
post #181

If you are thinking about building a web application, take a look at Laravel. I not a huge PHP user, but Laravel is always on the top of my list for building web applications. It's the greatest web framework to ever exists, even better than Rails IMHO. The ecosystem around Laravel is really incredible and unlike any other framework. They have libraries for every stage of a web application from taking payments all the…

Laravel is a decent web framework, that comes with batteries included and _often_ has sensible ways to override and avoid things if you don't want them. For example, you don't need to use the ORM at all and can just use their query builder (which is pretty good). It's there if you want it, but the framework works happily without it and doesn't get in your way in that regard. I inherited a Laravel codebase from a prev…

What other ecosystems and frameworks are you talking about? I've tried many things across many ecosystems in the last 20+ years and so far, despite any drawbacks it could have Laravel is the best one by a long shot. So I'm curious what those other better solutions you mention are and what are its trade offs.

Re: PHP in 2023

#272
post #159

If you are thinking about building a web application, take a look at Laravel. I not a huge PHP user, but Laravel is always on the top of my list for building web applications. It's the greatest web framework to ever exists, even better than Rails IMHO. The ecosystem around Laravel is really incredible and unlike any other framework. They have libraries for every stage of a web application from taking payments all the…

Laravel is great if you just want to get something simple done as fast as possible with the simplest, most elegant (at a glance) code possible and don't care at all about understanding how it works, what's going on under the hood, performance, doing anything the devs didn't expect, etc. Everything in Laravel is as obscured, "magical" and opinionated as possible for the sake of making the code "beautiful" (again, at a…

So I suppose you also write your own compiler, your own operating system, and built its computer from bare transistors as well? Because all of that looks like magic to me too.

At some point you have to accept the foundation you have as something that works, it's battle proven, and it's built by experienced and reliable developers and you build on top of the shoulders of giants. Reinventing everything from scratch so that you understand it makes you the only one that understands it.

There was a famous phrase by Arthur C. Clarke that I think applies here along the lines of "Any sufficient advanced technology is indistinguishable from magic".

Re: PHP in 2023

#273

I started my career with PHP. Created my own apps, created client websites etc. Full of footguns, but I didn't know any better. Once I learned more languages, I never used PHP again. I actually started to feel like I'd been fooled into using PHP. Now the small PHP community keeps trying to justify their language choice with articles like these and comments like the ones on this submission. They claim it's a no braine…

Found the haskell programmer

Re: PHP in 2023

#274

If you are thinking about building a web application, take a look at Laravel. I not a huge PHP user, but Laravel is always on the top of my list for building web applications. It's the greatest web framework to ever exists, even better than Rails IMHO. The ecosystem around Laravel is really incredible and unlike any other framework. They have libraries for every stage of a web application from taking payments all the…

Just to offer an alternate opinion for anyone reading -- check out Next.js

Next.js is great as long as what you're building is not much more than a landing page, or you're proxying to a real backend system (by another team, etc).

Trying to build a "full stack" application with just Next.js is suiciding everyone that comes to the project after you leave.

Re: PHP in 2023

#275
post #105

Earlier quoted context omitted.

Maybe PHP can add a "stricter" mode that gets rid of all the cruft? Enable it per-file, allow it to simmer for 10 years, remove legacy support in PHP 12.

It already has one

I called it "stricter", not "strict" for a reason.

Re: PHP in 2023

#276
post #239

Earlier quoted context omitted.

The only benefit you've mentioned is writing less code. Which just proves my original point about Laravel being for people who want to get things done as fast as possible with the minimum effort possible, regardless of how much sense it makes. >Consider Django. There, you explicitly define properties, but link them to the type of database column they'll use. Then, you can generate a migration based upon the model, an…

When I work in Django, instead of other frameworks I use, I think "I like this more, I like this less; this works better for me in these circumstances, this does not." But I've never felt it made any sense at all to pronounce one as objectively better than another. In most cases, it is a matter of taste and tradeoffs that vary based upon circumstance. You can keep saying "this is the correct way" with all the convict…

It's not a matter of personal opinion, it's a fact that the data mapper pattern (like doctrine) allows for a better and more maintainable architecture than active record.

Separating the data access layer, the models and the business logic (basically a 3-tier architecture) is a widely used and proven industry standard to keep a sane, maintainable and testable codebase.

Active record ORMs like Eloquent mixes everything in a single layer (business logic in the model events, data accesses are done by the models), but as soon as you reach a significant level of complexity, it is unmaintainable.

Even Laravel codebases that grow in complexity often ends-up wrapping Eloquent in a repository layer.

Re: PHP in 2023

#277
post #263

Earlier quoted context omitted.

> The only thing WP really has over them is it's expansive plugin librar The expansive plugin library that WP has is due to its ease of use, stability and the extent it goes to acommodate users, developers and businesses at the same time. Its no small factor, its no small feat.

I do agree, which is why I think WordPress would go away pretty quickly of they ever invalidate their legacy of plugins through a major change.

Yep. That's why WP has always prioritized backwards compatibility.

Re: PHP in 2023

#278
post #57

Earlier quoted context omitted.

Javascript already set the precedent. If you don't like the way a language works, it's preferable to have a proxy language that does work the way you want that compiles to it, rather than accept the language for what it is and learn to work with it.

what do you suggest to achieve this? electron?

just a downvote then. helpful.

Re: PHP in 2023

#279
post #181

Earlier quoted context omitted.

Laravel is a decent web framework, that comes with batteries included and _often_ has sensible ways to override and avoid things if you don't want them. For example, you don't need to use the ORM at all and can just use their query builder (which is pretty good). It's there if you want it, but the framework works happily without it and doesn't get in your way in that regard. I inherited a Laravel codebase from a prev…

What are your preferred alternatives to Laravel?

Symfony is more explicit, configurable and has way less magic.

Re: PHP in 2023

#280
post #231

Earlier quoted context omitted.

If you actually think that you dont know the language very well. It's baked into Composer, all the major frameworks fully use it as to almost every major opensource project that isn't prevented from doing so by legacy code. And honestly if you're a PHP dev intentionally avoiding the widely adopted standards and know someone else is going to have to maintain your code then shame on you.

Composer is trash, semver sucks and I'd tell PSR to go jump but it'd get stuck in a class file somewhere.

You must be a joy to work with. I feel sorry for the rest of your team, having to deal with that kind of view on everything.
Post reply on HN