Thursday, 15 November 2007

Symfony - what and why???

Bluhalo has moved over to using the symfony web application framework. After historically developing and maintaining a variety of platforms including Perl, mod_perl, Mason, ColdFusion, ASP and PHP, the development team made a choice to use the symfony framework. This enables us to develop web-sites in a focused, coordinated way; the framework uses many of the best ideas set forward by Ruby on Rails, without the complexity of learning another language. The framework is based on PHP5, and uses the enhanced object oriented features that this brings. We encourage developing reusable components; this speeds up code development, and reduces bugs through the reuse of tested and trusted code.Two of the key features that aid the structuring, readability and maintainability of object-oriented code are MVC and ORM.

MVC

The Model View Controller architecture enables us to create well designed code that allows the programming and html teams to focus on their specialist areas.The model layer encapsulates the data layer, which may consist of databases (MySQL, Microsoft SQLServer or others), WSDL/SOAP data providers, XML/RSS/Atom feeds. This layer also contains the business logic for the web applicationThe controller layer connects the view layer to the business logic; generally this consists of handling requests from the visitor, retrieving or storing information using the business logic in the model layer, and preparing data for display by the presentation layer.The presentation, or view, layer provides the layout for the data in the website. Usually this consists of HTML/CSS, but equally this could be targeted for mobile phones in WML or similar.

ORM

The object relational mapper allows us to write code without directly accessing the database; no knowledge of SQL is necessary. Of course, performance optimisations can still be carried out to ensure the site is highly responsive; but ease of development is improved through the global use of objects.Microsoft are adding both of these features to Silverlight 1.1 alpha; symfony already has it!

Other Features

The list of features available within the framework is very comprehensive:* Ajax support* Routing (smart URLs)* Caching* Templating* i18n (internationalisation)* Unit testing* a book

Community

The strength of the framework lies in the large community of developers now writing applications in the language. The framework is constantly being improved, and features that do not fit directly within the framework are contributed as plugins that can be added to an application to enhance functionality. The list is too long to include here, but includes everything from payment gateway APIs, user management, CMS, search, RSS feeds, News, Blog, Forum, SEO, fancy javascript effects, and many more. Many of these will be featuring in the bluhalo website - coming soon!

Rob S.

No comments: