A praise to Symfony2 PHP Framework


I’ve been working with php nearly 7 yrs in different industries and companies. It wasn’t something to proud or sound.

Let me share a bit of the problems We usually encountered as PHP programmer.

  1. Hire php programmer seem easier and cheaper, but they likely to work very differently
  2. They know different framework and some build their own framework and coding standard
  3. When the application down, they will probably blame system admin and system admin blame their framework and another framework war start
  4. Application started small, code small and we code it elegant nicely. But when business change critical rapid or new coder come in and code urgently then code go mad and hackish.
  5. Spageti code are not manageable, thousand lines of dependency codes just to support a tiny function.
  6. PHP programmer feel frustrated and productive drop compare to start a new app. so they quit.
  7. This is exactly how PHP programmer or PHP application got killed.

Summary of the lesson: Think before code. And what an coincident from my finding from Symfony2? It force us to think before code!

Symfony Framework

Symfony Framework

I am impressed, Almost every single details, philosophy, naming and the design. It is a framework, so it is. It is not some framework + library. it is a real framework and generous framework, with composer to manage the dependency of third party library. I would just praise they are bunch of smart people, the choices and the method are smart and elegant.

Namespace and Directory, Vender\Bundles make the codes resident in the right place, they exist with purpose. so your code are with purpose.

Dependency Injection. Not everything is entity, There are some Services and you will need it everywhere in your code. You don’t initiate the object to do the service for you. And to manage the environment configuration of your service for dev, testing, production. I haven’t go deep into DI yet. But this is something definitely save us.

Request and Response Framework. We use MVC in our resume for every interview. This become a standard to show that we know to collaborate with front end and back end developer. But in symfony2, MVC is hiding… we don’t say MVC because it is not worth our mention in application wise. But yet, different developer still working together happily, even better than those who use MVC as their framework marketing keyword. TWIG is so far the best front end engine I have ever used. Doctrine is the most comprehensive back end as well. What could go wrong with them? But yet a good framework not just about that. We have a lot more services and interface to care. But ultimately, the most important two should be emphasis. Request and Response. This focus make symfony2 architect rightly.

In fact, the books are written a lot clearer and I might be miss leading. Testing with PHPUnit, Assertive, Validate, Routing, Cache, PSR coding standard. I think symfony2 give php developer a new way. So that we can code some good stuff and manageable.

Well, It is so far the hardest framework to me to learn.. it take sometimes to make us a good developer. At least, think rightly.

Last but not least, I shall credit one of my friend who recommend me this great symfony framework. Thanks Kun. Or I won’t be like to code for the rest of my life.

Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s