| This idea seems like a pretty normal way of seeing the world among PHP developers. Please allow me to vent/rant -- I'm finishing up a project where your comment resonates loudly with my frustrations. I'm a journeyman freelance programmer trying to move from doing WPress marketing sites more interesting programming/development problems, and I just got out of a 2 month Magento project (Magento is an MVC-patterned store software that is based on the Zend PHP framework): extending it to allow users to sign in and create their own product listings. This was my first time building MVC/OOP modules in the context of a framework, and it took a little bit to connect the OOP principles that I've studied to the actual implementation within the larger framework... but the last month has been like "WOW... I can finally see in a pragmatic way why OOP and MVC are both such a powerful tools!" Not to mention that, since we were working with extending the system, studying that stuff seemed like an essential learning process if we were going to create the system, even if I was only tasked with the "front-end" side of templates and visualizing the things from the database. However, the senior guy in charge of creating the functionality to manage products for users thought I was from mars-- his application, which was wholly separate from the Magento install and used a separate database, was patterned around directories, with a set of configuration and include files shoved into the head. He intend me to integrate his functions by shoving his (single, large) functions file into the head of (each of) my template files, and then calling functions to return arrays of information that I could then push into markup. Apparently, this is "the right and normal" way to do this stuff in the PHP world, and my process of writing modules, extending existing objects, creating routes to view the data through the framework's template system was all stupidly overcomplex. I learned a lot out of doing that, and the module that I'm building for another client (aMember/Zend) is both smooth and fun because all of the database interactions and template stuff is already in place and just works... and I can focus on the UI Javacript stuff... but I feel really badly for the project owner of the Magento project, as I feel the codebase is... well mostly a bunch of functions in a single file and a bunch of single-form .php files that make SOAP calls and depreciated mysqli_ calls... Now, I dunno-- I'm definitely the less experienced programmer, but if this is the norm in PHP programming (surely it can't be), I will be spending my summer trying to build enough projects in other languages that I can transition out of doing PHP. Sorry for the rant, but it was cathartic for me :D |
You don't need to try other languages, do it only if you want to. If you wanna save time just take my word, Symfony2 has nothing to envy to Django or Rails (I have used them and also digged into their architecture). In fact, it's more modern and better designed.
I'll leave these links here, you might find them useful:
- http://www.phptherightway.com/ (general advice)
- http://getcomposer.org/ (composer, the dependency manager)
- https://packagist.org/ (the main composer repository)
- https://github.com/php-fig/fig-standards/tree/master/accepte... (accepted conventions)
- http://www.slideshare.net/fabpot/dependency-injection-with-p... (if you liked MVC, DI will blow your mind)
- http://fabien.potencier.org/article/50/create-your-own-frame... (an amazing tutorial on how to create a framework, it will let you understand it inside out)
- http://symfony.com/download (what should become your next framework)
- http://silex.sensiolabs.org/ (minimalistic version of Symfony2, it's called Silex, and might be useful for small websites)
If you still want to try something else, try something that has nothing to do with all this, like Clojure. For example, Ruby/Rails is the same as PHP/Symfony2, you won't learn much. I jumped into Rails and just started coding, because I already knew web development, I wasn't impressed, the differences were mostly syntactic sugar, monolithic vs decoupled, and issues like the lack of interfaces and type hinting. But Clojure? Mind blown. I'm gonna spend my next summer learning more Clojure, because I already know it's my perfect language, but it's hard and full of new concepts. Meanwhile, php/Symfony2/nginx is my perfect stack for web development.