Sunday, July 13, 2008

Surchur.com - How symfony leverage application upgrades

Part 2.
In part 1. I explained why symfony was a good choice for the implementation of surchur.com
now I will try to expose the advantages of symfony while in upgrade mode.

The MVC separation gives huge advantages over spaghetti php code developement, so when the redesign was a mandatory issue the whole problem was to change the VIEW, this meant changing the html, css and images that were remade from scratch.

The templates change didn't required any changes over the other 2 segments (MODEL and CONTROLLER) , making the redesign more a HTML battle for crossbrowser capabilities fought on every known fronts: Safari, Firefox, IE7, Opera and mostly IE6.

By the way, for those of you who are still using IE6, please upgrade to IE7 or better change your browser(to firefox, safari or opera) and help the world(and the internet) being a better place, also you will contribute to the internet's evolution and our civilization.

The symfony tree directory structure makes easy to find templates you need to change or replace, giving you all the power over you html code.

People working on templates are usually web designers, who may not know symfony very well and may have difficulties finding template fragments, since they can be scattered all over the application. These few guidelines will make them more comfortable with the symfony template system.

myproject/
apps/
application1/
templates/ # Layouts for application 1
modules/
module1/
templates/ # Templates and partials for module 1
module2/
templates/ # Templates and partials for module 2
module3/
templates/ # Templates and partials for module 3


The above structure is the default directory structure of every symfony application,
BUT this is not mandatory!
Symfony will allow you to change this structure and easily configure where the
templates and other resources are, it's a matter of choice and requirements, I personally
love the existing structure and planning to use it as much as possible as is.

The great feature of template fragments makes even easier to keep different parts of html
in the files you want, you can reuse code and be as flexible as you want, once again,
it's a matter of choice and imagination(but mostly architecture) how you organize your pieces of
code, the point here is that symfony allows you to play with the html in the way you want and
keeps you save by don't messing with the logic of the application.

There's more to tell about the way symfony made my life easy when developing surchur.com
but time is limited, so I will tell you this, if there's any reason why you(a developer) should
switch to symfony when developing php web application, then that would be the symfony community,
you'll get assistance, pluggins and snipets, everything what a php developer dream about!

Cheers, and happy symfony coding.



1 comment:

End to End Solution Provider said...

I benefit reading this article. I demand to learn more on this topic
Cake PHP Entwicklung