Some symfony tips for beginners

I started using symfony by taking a single workday to walk through the first seven steps of the Askeet tutorial. After that, as time was scarce, we dived into the project we were planning to use symfony on. Here I'll present you with some tips that I either found or experienced myself.

1. Prevent XSS, take a look at your settings

This is one that my friend and colleague Peter found. It seems the escaping settings in symfony by default are not good enough to prevent XSS. Check here for more info. 

2. Use plugins! (1)

There is a huge list of plugins already available for symfony. First thing to do when planning functionality is to check the list of available plugins for one that will fit your needs. This is Don't Repeat Yourself (DRY) at it's best.Why spend hours or days of your time implementing something that is already available with a simple plugin-install.

3. Use plugins! (2)

When implementing functionality into an application, use the plugin structure. This is one mistake I made when starting, I put all my functionality into a module. And sure, modules can be copied to other projects as well, but they definitely don't have the same flexibility. Plugins are made for portability to different projects. Use them for as much functionality as possible.  

4. Use the symfony CLI

The symfony CLI is a very powerful tool. Not just for clearing your cache, but also for creating module skeletons, installing plugins, running your tests and loading your database structure and fixtures. But, also, you can write your own tasks! Use that power. Automate those tasks that you have to do regularly in a symfony task. Implementing a task in your data/tasks of your project or your plugin will enable this task immediately in your CLI.

5. Use the symfony community

The symfony community is one of the most active and most friendly I have ever encountered in open source. Little trolling, no hostility, no stupid responses to "beginner questions". Instead, you get help. A lot of help. #symfony on irc.freenode.net is a fantastisch channel, the symfony-users google group and the symfony forum are all excellent resources. Add to that the excellent documentation (both official and community-driven on the wiki ) makes the learning experience of symfony one of the easiest and best learning experiences ever. 


Add comment

Comments

gravatar Craigslist Sacramento: i think these tips are awesome and much important for symfony.this post is so good.you discus a good point in this post.your experience is wonderful.thanks for sharing with us..

June 13, 2011
gravatar Article for promotional tools: Symfony is quite an amazing framework for the language developers. You must try to upload some user guides so that people could get great stuff regarding this specific platform.
June 15, 2011
gravatar Craigslist Sacramento real estate: interesting post.
i think these tips are awesome and much important for symfony.this post is so good.you discus a good point in this post.your experience is wonderful.thanks for sharing with us..
June 16, 2011
gravatar Pool tables: The tips are so good with this. I am definitely using the plugins here. You will definitely benefit from it.
October 29, 2011
gravatar discount uggs boots: Your first-class knowledge about this good post can become a proper basis for such people. nice one! 8-O
February 1, 2012

Php5_zce_logo

Upcoming events

I will be speaking 06-02-2012: D-Day
I will be speaking 17-02-2012: Techademy Trainingday February
I will be speaking 23-02-2012: Zend Webinar: Git for Subversion Users

Tags

1337 2008 2010 2011 4developers access modifiers accessibility AdaLovelaceDay09 advent agavi agile alfred amsterdam apache api apple article articles atk atkMetaNode audioscrobbler automation azure backwards compatibility barcelona barcodes bash bbc bbq beatstad belgium best practices bittorrent blogging blogs boards of canada book books bughuntday bundle caching cake cal evans calendar career cat cerf certificate cfp clear cms cologne common sense communities community components conference conferences contest continuous integration contribute contribution crisis css custom d-day datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex docblox doctrine documentation download dpc dpc09 dpc10 dpc11 DPC2008 dreamhost drupal dv7 eclipse ed editors efficiency enterprise errors event events expertise ezcomponents facebook finland flickr fork framework frameworks freelance freeze frontend fun game games geoip germany getting real git github gnome-do google google calendar googletalk graceful degradation hack hackers hidden gem hiphop howto hp HR html http i386 ibuildings icann ide ideasofmarch idm imovie indy ingewikkeld integration international php conference internet interview ipad IPC ipc ipc08 ipc10 ipc11se iterm2 javascript jenkins jenkins-php job job openings jobeet john peel joomla joomladays kiva kubuntu launcher launchy left on the web libraries library lighttpd lime linktuesday linux live london loudblog m2ts mac magazines malware mambo marjolein mediterra meeting meme meta methodology micro-financing microframework microsoft migration movie music mysql namespace namespaces netbeans netherlands newsfire nllgg nos odmarco open source opinion ORM osx paradiso paris partnership pavilion pear pecl performance personal pfc10 pfc11 pfcongres pfcongrez pfz photo php php5.3 phpabstract phpazure phpBB phpbb phpbelgium phpbenelux phpbnl10 phpday phpdoc phpdocumentor phpgg phpitalia phpnw phpnw08 phpnw11 phpstorm phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations private projects protected prototype PSR-0 public python qa qr codes re2c recruiting refactoring review rewrite ruby on rails san francisco schedule scifi script security sensio seven things sfdaycgn sflive2011 shell scripting silex simplexml slides smfony software sogeti solar sound speakers spl ssh standard standards star trek static steer strings stylesheets subversion symfony symfony live Symfony2 symfonycamp symfonyday symfonylive symfonyUnderControlPlugin talk talks techademy technology techportal tek09 telecommuting terratec terrorism testfest testing textmate textpattern the right tool timeout tips tld todo tomas tools training twig uncon unet usability usergroup validation vhost video vim vinyl virus warp webinar weblogging webservices wiki windows winphp women wordpress work workshop world world of warcraft wpi writing wunderlist xml xpath xsd yara year youtube zc11 ZCE zemanta zend zend framework zend server zend studio zendcon Zend_Form zite
© 2004 - 2012 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1