Live data from Hacker News

Moving from Go to PHP Again

dannyvankooten.com

21–30 of 371 posts

Re: Moving from Go to PHP Again

#22
post #13

Each PHP file is an endpoint. As opposed to having routers in code or client side SPA routing. PHP files can be deployed independently, swapped out or updated live. No building/compiling of the php files needed. A single layer as opposed to 'modern architecture' where there's client side back/front end layers, api layer, logic, validator, data access, and ORM layers. Can extend itself as it runs. For example Wordpres…

Plain PHP files work that way. But what if you use a framework (even an in-house one)? Does this holds true?

Re: Moving from Go to PHP Again

#24
post #11

Can relate, after 7+ years I am again using WordPress and PHP again. I am impressed by PHP 7.

Hm, I hate to be on the bandwagon, but why WordPress? One of the things that has made PHP become what it is today is a focus on good software engineering and the introduction of language features that are required by that. WordPress did not keep up on the engineering front and there are so many amazing options out there now for well written, well engineered platforms. Even in pre-built blog platforms. You're not alon…

WordPress can't really become better without becoming incompatible with itself. It was written just after PHP acquired classes, but chose to preserve compatibility with a codebase that predated that. It's its own ecosystem at this point.

Re: Moving from Go to PHP Again

#28
post #22
post #13

Each PHP file is an endpoint. As opposed to having routers in code or client side SPA routing. PHP files can be deployed independently, swapped out or updated live. No building/compiling of the php files needed. A single layer as opposed to 'modern architecture' where there's client side back/front end layers, api layer, logic, validator, data access, and ORM layers. Can extend itself as it runs. For example Wordpres…

Plain PHP files work that way. But what if you use a framework (even an in-house one)? Does this holds true?

Yup :) You very much just `git clone` a Laravel project, point Apache/NGINX (with PHP-FPM configured) to the `public` folder and all you need to do is run database migrations (for the majority of basic deployments).

Re: Moving from Go to PHP Again

#29
post #3

Earlier quoted context omitted.

I have not written a new PHP app in years but recently I had a look at the latest and greatest from the PHP community and its pretty good. The frameworks and tooling look about as good as you will get anywhere and PHP appears to be fast now.

Symfony and Laravel are really nice. It's still a horrible abomination of a language that invites bugs and requires A LOT of care to not produce buggy code, though.

It is getting better though. I'm hoping that 8.0 can introduce some real BC breaks that will clean up the mess the language has created over the years.

Re: Moving from Go to PHP Again

#30

[deleted]

To be clear, this just means that PHP has libsodium as an official language extension. Most modern languages have better package management than PHP and make pulling it in as a library trivial.

This has nothing to do with homomorphic encryption, unless I'm missing something.

Post reply on HN