Live data from Hacker News

Go with PHP

gowithphp.com

471–480 of 532 posts

Re: Go with PHP

#471
post #221

Earlier quoted context omitted.

What do you put as the distinguishing feature between "core language standard library" and "comes with the language at installation"? Some example: https://www.gnu.org/software/guile/manual/html_node/Reading-... (no installation of anything third party required)

Alright, let's go with widely-used programming languages for now - I've been programming for over 20 years and never heard of Guile. I am not against the idea of having native protections built into stdlib, we can agree there, but it's disingenuous to suggest that this problem is unique to PHP as the parent comment suggested. It's the same in all of the major programming languages used to spit out HTML as far as I ca…

Oh, very much so. I don't doubt it. Most of them are doing it wrong, fiddling with strings, instead of structured data, which HTML would lend itself really nicely to. Especially PHP, with its "output HTML" in-built mentality should have gotten it right, but did not. Many others did not do any better.

Re: Go with PHP

#472
I always dislike the "requests per month" metric because it seems like a transparent attempt to impress with a larger absolute number: 500k requests/month is 5sec per request, which feels pretty underwhelming

Re: Go with PHP

#473
post #462

Earlier quoted context omitted.

https://symfony.com/doc/current/page_creation.html Apparently there's now something called annotation routes. Which appear to be inferring functionality from comments. You made me look though. I suppose I had it coming.

They are not comments they are php8 attributes

PHP8 attributes are comments with a special format.

Re: Go with PHP

#474
post #316
post #93

Earlier quoted context omitted.

Don't you dare to tell me that my isomorphic Node trpc graphql with redux and sagas on top of next.js with SSG and SSR and parts in server components with my home grown validation and ORM framework and still no translations because they don't work together with everything else and deployed on serverless docker lambdas to a kubernetes cluster is over engineering a landing page with a contact form. So fast! That's a st…

Don’t forget to deploy all that code to the edge. Your $5 VPS in NY running both nginx and MySQL is going to be a huge bottle neck when somebody in Texas tries to view your simple website and it takes .10 seconds longer to load. You’re going to want that contact form code on at least 1,000 servers worldwide for maximum benefits and conversions.

10 seconds? Slight exaggeration, surely.

Re: Go with PHP

#475
post #338

Earlier quoted context omitted.

Please see the sister comment. If this is what “modern design” looks like — no wonder things are so bad. Instead of clear text sizes and simple messaging like in https://qbix.com/communities , there are texts of at least 5 different sizes jumbled in. Instead of contrast so you can read text — there is white text on black over white text on black. There is also text that is gray and low contrast until you scroll it in…

While some of what you say is correct (e.g. about the scrolling text and the messiness in parts of the Payload site), overall your criticisms show that your view of what's easy to follow is pretty out of sync with developers here. What you perceive as "bad" isn't really taken as bad by most others here, and I'd guess they're more likely to have positive impressions of Payload than Qbix. The Qbix Communities page is d…

I do question it. I am happy to have substantive conversations, and improve things. You may not realize it but the current site(s) other than the Development page are the result of years and hundreds of iterations with people who expressed criticism just like yours. Including professionals. And thus what you say at this point is one data point — but you can’t please everyone.

People often point out problems in design aesthetics, and imagine that the opposite solution somehow can be realized in a consistent way that makes everyone love the result and will make the difference in platform usaage, but no. That’s not how it works at all. It’s like the people who say “your app doesn’t work” to a developer (with no details on a solution should be), and imagine that somehow this will lead to a much better app with no bugs that everyone will use.

At the end of the day, adoption matters far more. Facebook is cluttered and ugly compared to many other clean beautiful apps, but people are super used to it. Discord is totally bewildering, with tiny gifs for flair and many controls are extremely hard to discover and operate, but people are used to where things are. Craigslist is ugly but at least it’s straightforward. Many more beautiful sites fell by the wayside as they tried to take it on (remember kajiji? others?)

As for Yang 2020… your criticisms are fine but you should realize the design wasn’t ours. It was, in fact, following the design guide here since each community designs their own portal:

https://cdn.hackaday.io/files/1665227124477248/Yang%20Gang%2...

You see, when you are designing a tool can be reused in many different environments with hundreds of variations that could go either way, and still has to work, then you realize that the design decisions aren’t so simple and that these may be the least bad after having gone through exactly the process you described.

Look, if Payload’s GIANT SCROLLING TEXT and white text in black over white text on black was the unavoidable result of hundreds of iterations, then I’d accept it. I personally think there are good reasons for what we have done, having tried tons of other variations. But I don’t think the GIANT SCROLLING TEXT, or making all links look exactly like the text, is necessary or the inevitable result of iterating. We HAVE been listening to criticism and THIS is the result.

Re: Go with PHP

#476
post #474
post #316

Earlier quoted context omitted.

Don’t forget to deploy all that code to the edge. Your $5 VPS in NY running both nginx and MySQL is going to be a huge bottle neck when somebody in Texas tries to view your simple website and it takes .10 seconds longer to load. You’re going to want that contact form code on at least 1,000 servers worldwide for maximum benefits and conversions.

10 seconds? Slight exaggeration, surely.

0.10 seconds

Re: Go with PHP

#477
I don't like that in the code validation rules are applied to a "request" (and written in a controller) but not to a model. This means that if you want to create a model somewhere else, you cannot reuse validation code.

Re: Go with PHP

#479

Why do most PHP related posts on HN read like repentance ? If you want to promote the language -to the point of buying a domain and making a webpage-, please show interesting stuff, not something that is equally trivial to solve in gazillions of web frameworks written in gazillions of languages.

I don’t get that feeling. And I like that people are doing their best to try to improve the reputation of the language. The reality is that modern php is very decent, but a lot of people that have never used it or have used a very old version mock or look down upon it for no apparent reason.

It’s important to try to improve the reputation so that it gets new developers interested in it in order for the language to keep being relevant.

If you want a concrete reason why I think php is great and has many things that are very useful compared to its competition:

Extensive native support for classes and types.

Php does class-based OO better than its competition (JavaScript, python).

Designing a traditional object oriented system using classes and interfaces is better in PHP than in JavaScript and python, if we limit ourselves to the native features of the language.

For example, you cannot define a native interface or an abstract class in python or JavaScript. JavaScript classes, since they’re just syntactic sugar, have a lot of unexpected behavior.

In python you have to accept the this/self object in every method definition.

Here are a couple of links about php classes, interfaces and types for anyone interested:

https://www.php.net/manual/en/language.oop5.variance.php

https://www.php.net/manual/en/language.oop5.interfaces.php

Re: Go with PHP

#480
post #316
post #93

Earlier quoted context omitted.

Don't you dare to tell me that my isomorphic Node trpc graphql with redux and sagas on top of next.js with SSG and SSR and parts in server components with my home grown validation and ORM framework and still no translations because they don't work together with everything else and deployed on serverless docker lambdas to a kubernetes cluster is over engineering a landing page with a contact form. So fast! That's a st…

Don’t forget to deploy all that code to the edge. Your $5 VPS in NY running both nginx and MySQL is going to be a huge bottle neck when somebody in Texas tries to view your simple website and it takes .10 seconds longer to load. You’re going to want that contact form code on at least 1,000 servers worldwide for maximum benefits and conversions.

Joking aside, as someone who runs their entire saas off a single bare metal server in Las Vegas, I have been toying with the idea of pushing some stuff to the edge. The reason being, sometimes those average load times are not giving you the real picture. If my average load time is 560ms per request because 90% of requests are 400ms and 10% are 2 full seconds, that might be a problem. Fixing those 10% requests and bringing them down in line with the rest would equate to an average speed up of only around 100ms.

However, I'm not yet sure a complicated edge deployment would actually fix the 10% problem.

Post reply on HN