I know a couple of Java programmers that will find this helpful. Thanks.
What Java really needs is a KitcheSink class. I'm pretty sure there's already one in PHP.
Addition of 1 and 1 in PHP
61–70 of 89 posts
Re: Addition of 1 and 1 in PHP
#62Pretty much sums up how I feel about most of the big frameworks (Zend in particular, but also Symfony and CakePHP). The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby. At its core, web development is about taking some user input, validating it, throwing it in a database, and displaying it again (perhaps slightly modified) to users. That's a fairly…
I've seen some horrible cases where simple blogs done in wordpress were incrementally extended to the point where they're absolutely unmaintainable, un-updatable monsters.
Re: Addition of 1 and 1 in PHP
#63Earlier quoted context omitted.
No, but it has a bunch of kitchensnk_ functions in the kitchensnk extension.
Those have been deprecated, you really need to be using the real_ksink functions. Be careful, though, the argument order swapped.
Re: Addition of 1 and 1 in PHP
#64Pretty much sums up how I feel about most of the big frameworks (Zend in particular, but also Symfony and CakePHP). The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby. At its core, web development is about taking some user input, validating it, throwing it in a database, and displaying it again (perhaps slightly modified) to users. That's a fairly…
I think the main issue is that alot of things just don't remain static. You choose the right tools for the job and then the moment you're finished a new set of requirements are bolted on and suddenly it's no longer the right tool for the job. So instead you start off doing the "simple" things with over powered (and hence more complicated) frameworks. Zend, symphony, cake, drupal you pick your poison in the sure knowl…
The marketing manager who says today "I just want a blog" IS going to come back next week and say "I want to a white paper on the blog, for which people have to register, and then it automatically subscribes them to a newsletter".
After enough feature requests, you've built yourself a crap framework anyway. At least, by starting with a decent framework, the foundation of your code is solid.
Re: Addition of 1 and 1 in PHP
#65Frameworks 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.
Re: Addition of 1 and 1 in PHP
#66Re: Addition of 1 and 1 in PHP
#67Earlier quoted context omitted.
> The problem of over-engineering isn't just related to the big PHP frameworks - the same problem exists in Python and Ruby. OTOH, the "complexity" may also be "configurability" or "pluggability" with missing shortcuts. And quite often the "simple" version ends up being insufficient when one needs to tweak something: http://lucumr.pocoo.org/2013/2/13/moar-classes/ > That's a fairly simple concept When going for pithy…
I know what you mean, and I realize there's more to web development than what I just wrote. Nonetheless, I think frameworks such as Zend add a level of complexity that is rarely justified. Zend fans would probably claim that doing things the "right" way in the beginning means less work when you need to maintain the app three years later. I'm not so sure. To be honest, three years from now I'd rather be maintaining a…
Re: Addition of 1 and 1 in PHP
#68The functional unit tests made me laugh: https://github.com/Herzult/SimplePHPEasyPlus/blob/master/tes...
Re: Addition of 1 and 1 in PHP
#69while 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 , e…
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
Re: Addition of 1 and 1 in PHP
#70while 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 , e…
>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…