Live data from Hacker News

The new PHP

programming.oreilly.com

101–110 of 203 posts

Re: The new PHP

#101
post #60
post #16

Earlier quoted context omitted.

Just because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a seco…

I don't hear people complaining about Python's builtin webserver. Maybe thats because Python only attracts people who do things correctly right?

Nope, Python attracts plenty of idiots as well. It is especially popular among self taught bioinformaticians, who write really bad code.

Re: The new PHP

#102
post #39

I don't get it. Why people can't just admit the fact that PHP had his time and now, no one with common sense would not start new project (except simple wordpress stuff) in PHP.

In most enterprise environments, you have your choice between .NET and PHP. Given the option, I'll take PHP, thanks.

Twitter's code is "enterprise" code in that it has to satisfy the organization's needs and a huge part of it is not user-facing, but targeting other enterprises (for example, Twitter ads). At Twitter, we use Scala.

So, no, you're not necessarily stuck between these two options (or Java, which is another popular choice in the enterprise scene). Scala was chosen specifically, among other things, because Twitter had a lot of Ruby developers who would cringe at the idea of PHP, Java, or .NET.

Re: The new PHP

#103
post #87
post #69

Earlier quoted context omitted.

> Unless the web server displays a huge red message every time it is run Uhh... this is the first line the web server spits out: PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011 The manual isn't exactly vague on this point either: http://us3.php.net/manual/en/features.commandline.webserver.... So we got the warning already in there, what else would you like?

20 words of that manual were dedicated to letting people know its not for use in production. Un-highlighted and buried at the end of a paragraph that I initially skimmed over and didn't even read. No attention is directed at it in any way. So the server outputs a message. Great. Is it huge, red and says "do not use me in production"? No. Its a standard version banner.

There's no pleasing you, is there?

Maybe we should add some and ?

Re: The new PHP

#105

Earlier quoted context omitted.

1. Why add complexity when it isn't necessary? Inline output is one of the best features of PHP in that it makes it extremely easy to get started using it. If you want templates you can add them. Not everyone wants them. 2. PHP is dynamically typed, like many other languages, and so you just have to know what types something can be and how they behave together. Even in a statically typed language you need to know how…

" Not everyone wants them." And not every project needs them. PHP has been wildly successful precisely because it can fit in entirely small use cases, as well as big cases. Someone who needs to create a dynamic footer with a "copyright $year" in it... has no need for MVC, routing, templates, version control, etc. They just don't. It's precisely because PHP has a default content-type output of 'text/html' that this so…

Kind of like Perl CGI? Not many places using that these days.

Re: The new PHP

#106

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

Codeigniter has been all but abandoned by EllisLab, the community is giving up on it and there are far better frameworks available now. For example Laravel, the growth that Laravel is experiencing right now is huge, it has overtaken Codeigniter as the most popular PHP framework on GitHub and has a growing and active community. Anyone even thinking about Codeigniter any more is doing themselves a disservice, Laravel i…

I recommend FuelPHP [1] - it has amazing documentation, a lot of built-in libraries, takes advantage of PHP5 features, is quite mature and really easy to dive in.

[1] http://fuelphp.com/

Re: The new PHP

#107

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

Sorry, but this is mostly wrong. PHP has two awesome frameworks - Symfony and Laravel. They both have their pro's and con's, but both are very mature frameworks that can both match Rails or Django in their own rights. Both of fully tested, both have full auth libraries.

CodeIgniter does not have the largest community by any stretch, and its falling fast. If it hasn't already died, then it will in the near future.

Sorry, but based on your comment I don't think that you really know much about the PHP framework landscape.

Re: The new PHP

#108

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

I find it hard to believe you're a PHP developer and believe Codeigniter has the largest community. Perhaps you primarily used PHP 3-5 years ago.

If you haven't been following Laravel 4 development, you're entirely missing out on a community that's bringing the love back to PHP.

The core PHP community is extremely knowledgable; you're just not interacting with the proper subset. If you take a look at the conference circuit, you'll see a group of passionate and experienced developers willing to share their knowledge.

Check out some of the works pointing the general populous in the right direction:

http://www.phptherightway.com/ https://phpbestpractices.org/ http://phpsecurity.org/

Re: The new PHP

#109

Whenever I hear "the new PHP" or "its not the old mess anymore", I say to myself, thats hardly the point. The key flaw I find with PHP is with its community and lack of any mature frameworks. Half of the PHP coders are hopeless script kiddies, thanks to low barrier entry it has, and I don't feel a single framework exists that can match Rails or Django. For the matter of fact, the framework with largest community, Cod…

There's a vast array of frameworks for just about any appetite available in PHP.

Just looking for a simple MVC app? Silex (http://silex.sensiolabs.org/)

Want something that's beefier and more rails-inspired? Laravel (http://laravel.com/)

Want MVC but near native PHP performance? PhalconPHP (http://phalconphp.com/en/)

Building an enterprise application with a team of developers? Symfony (http://symfony.com/), Zend Framework 2 (http://framework.zend.com/)

..and I'm only listing the more popular frameworks that I know of that are mature. Every single one of these has full unit test coverage, and most have very clear examples of how to unit test your code.

I like that I can pick from so many frameworks instead. This allows me to choose a framework that fits my problem, instead of fitting a framework around my problem. I find this to be one of the highlights of the PHP community, not one of the downfalls.

Re: The new PHP

#110
post #87

Earlier quoted context omitted.

20 words of that manual were dedicated to letting people know its not for use in production. Un-highlighted and buried at the end of a paragraph that I initially skimmed over and didn't even read. No attention is directed at it in any way. So the server outputs a message. Great. Is it huge, red and says "do not use me in production"? No. Its a standard version banner.

There's no pleasing you, is there? Maybe we should add some and ?

I don't the person is being a pain. People will not heed a warning that is not clear and apparent. It's like the warning on the side a hot cup of McDonald's coffee. It's not paid any attention if it's not really, really, ####-->REALLY CLEAR<--#####.
Post reply on HN