Hacker News new | ask | show | jobs
by camus 4844 days ago
while i get the joke , i'm sorry , but serious PHP development means bloated frameworks. You cant avoid it.

Frameworks code looks ugly because PHP looks ugly . But has anybody seen Rails source code ?Django's ? or even Sinatra's ? it is bloated too, but because Ruby and Python a well designed , when using them , you dont feel they are bloated.

That's why you end up ( in PHP ) writing yaml config files for DI, ORM , etc more than actual PHP.

If php looked more like Ruby or Python , using symfony 2 or ZF 2 would be less painfull.

Now let's consider something else. in Python you have WSGI , Ruby Rake ,etc ... which are really good stuff , universal in the way you plug into them to write your own framework.

Up until now, PHP devs felt they did not really need it. But as the PSR effort improves , we need frameworks to implement the same http kernels so we can plug any middleware no matter what the lib is , that's very important. You cant use raw PHP anymore. You need middleware you can use ACCROSS frameworks.

So should php devs use frameworks ? yes. just like Ruby , Python devs dont do raw CGI programming. Should i use guzzle instead of CURL ? yes because it has a beautifull and fluent API , and CURL is just plain ugly. Should i use Silex/Slim/Laravel instead of raw PHP ? yes because your application will scale with these simple frameworks. Writing raw PHP without PSR-0 autoloading , and no framework doesnt scale , period.

PHP has a real problem. I admit. It needs a real deep , breaking redesign, a clear separation between the core and libraries , and fat trimming. But framework designers did a great job trying to correct its flaws and making PHP development bearable.

1 comments

>we need frameworks to implement the same http kernels so we can plug any middleware no matter what the lib is , that's very important.

This is great news - it means PHP is going down the same route that very nearly lead Java to its death and still makes it the laughing-stock of the Dev world. PHP does not have this much traction with enterprisey enterprises, so following Java here probably means PHP is heading for a painful and ugly end.

"Good news, everyone" - Prof. Farnthworth

All web solutions use pluggable middleware ( Ruby Rake , Python WSGI , NodeJS Connect ). So PHP getting some abstraction is JAVA-ISH ?
I notice that all of those things are internally simple. No bloat required.
s/Rake/rack