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

Php5_zce_logo

not tested in IE


Upcoming events

I will be attending 17-04-2010: Pfcongres

Tags

1337 2008 2010 4developers accessibility AdaLovelaceDay09 advent agavi agile amsterdam apache apple article articles atk atkMetaNode audioscrobbler backwards compatibility barcelona bbc bbq beatstad belgium best practices bittorrent book books bughuntday caching cake cal evans cat cerf certificate cfp clear cms cologne common sense community conference conferences continuous integration crisis css custom datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex documentation download dpc dpc09 DPC2008 dreamhost dv7 eclipse ed efficiency enterprise event events expertise ezcomponents facebook flickr framework frameworks freeze frontend fun games germany getting real google googletalk graceful degradation hack hackers hidden gem hiphop howto hp html http ibuildings icann ide imovie indy internet IPC ipc ipc08 javascript jobeet john peel joomla kubuntu left on the web lighttpd lime linux live london loudblog m2ts mac malware mambo marjolein meeting meme meta methodology microsoft movie music mysql namespace namespaces netbeans netherlands nllgg odmarco open source opinion ORM osx paradiso pavilion pear performance personal pfcongrez photo php phpabstract phpBB phpbb phpbelgium phpbenelux phpbnl10 phpgg phpitalia phpnw phpnw08 phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations public qa recruiting refactoring review rewrite ruby on rails schedule script security seven things sfdaycgn simplexml slides smfony software sogeti solar sound standard standards static steer strings subversion symfony symfonycamp symfonyday symfonyUnderControlPlugin talk talks technology techportal tek09 telecommuting terratec terrorism testfest testing textpattern tips tld tomas unet usability usergroup validation vhost video vinyl virus warp weblogging wiki women work world world of warcraft writing xml xpath xsd yara year youtube ZCE zemanta zend zend framework zend server zend studio Zend_Form
© 2004 - 2010 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