Symfony Live Conference, Paris 2010 (Day One)

« Interpreting your analytics with eyes wide open | Symfony Live Conference, Paris 2010 (Day Two) »

Today was the first day of Symfony Live, the biggest symfony conference of the year and there has been a LOT going on. For day two of Symfony Live 2010, click here.

All of the presentation slides can be viewed online on the Symfony Live Event page on Joind.in.

sfPot

I don’t know if this event was named after Fabien Potencier (the leader of the symfony project) or what, but it was a good chance to drink some locally brewed beer with other serious members of the symfony community before the actual conference at Le Frog’s pub in a charming part of Paris.  I learned that Fabian thinks “Symfony 2 isn’t really an MVC framework in the typical sense”, but I’ll just wait until Wednesday’s unveiling of Symfony 2 to get the juicy details. Note: This event coupled with jet lag induced me to miss the first presentation the following day on internationalization.

Working with the Admin Generator

John Cleveley gave a useful and witty presentation on working with the symfony admin generator which included tips that are not in the documentation.  I did not know that the admin generator automatically created REST routes for your modules or the best techniques to go about creating your own admin theme.  Here are his “Ten Commandments”:

  1. Understand the client’s workflow
  2. Think about security from the start
  3. Look through and understand the auto-generated, cached PHP files
  4. Change the table_method call to reduce database calls
  5. Use a custom (bespoke in U.K. english) form class for the admin if its different from your app(s)
  6. Keep form configuration in the form classes (as opposed to the generator.yml) where possible
  7. Create a theme or plugin to reuse your work
  8. Consider users with small screens
  9. Create functional tests to guard against regression
  10. Maintain good MVC and decoupling practices

He also recommended the sfAdminDashPlugin and sfAdminThemeJsRollerPlugin.

Microsoft Presentation

Two representatives from Microsoft gave a pitch on the history of supporting PHP within Microsoft, the Open Source Techonology Center (OSTC) and using Windows Azure for cloud applications.

Symfony Internals

Geoffrey Bachelet quickly walked the audience through symfony’s execution of a request in a french accent so thick you could cut it with guillotine.  This was a review for advanced developers but a very useful reminder of the relevant design patterns that symfony implements such as the Observer and Chain of Responsibility.  It was enlightening to learn that returning the “Error” template is not often used since the new form framework was introduced and that the proper way to serve ajax requests for HTML is with the “None” return value in your action.

Doctrine Migrations

Dennis Benkert, the orgnizer of Symfony Day in Germany, shared his knowledge of Doctrine migrations which are largely inspired by Rails migrations.  I was pleased to learn that Doctrine now has command line tasks that will compare your new schema.yml file to your existing model classes and generate a “migration file” for you.  This migration file is associated with a numbered and timestamped version of the database and consists of an up() and down() method which you run on your production database at deploy time.  This will replace the risky, error-prone and annoying process of having each developer maintain a SQL file with schema changes.  It is worth noting now that rollbacks don’t often work if a failure occurs during the migration and that Doctrine 2 will use a totally new migration technique.

Doctrine 2

The most exciting presentation of the day was given by Jon Wage on Doctrine 2.  With all of the talk recently about the Propel project being reinvigorated of late, this was Jon’s chance to show that Doctrine is still in the leading spot as far as PHP ORMs (Object Relational Mappers) go.  Given the features that Jon showed and that Fabien and Sensio are currently supporting Doctrine, I would agree that Doctrine is definitely the ORM to choose when starting a new symfony project or choose which one to learn.

The codebase has been completely rewritten to take advantage of PHP 5.3 and performs a LOT faster according to the benchmarks reported. Fabien requested that they “Remove the magic”, so there will be a bit more work for developers to do, but a better understanding of what is really happening and more control for advanced queries. A key feature is the separation of the ORM and the DBAL (Database Abstraction Layer). This will allow for the DBAL to used as a standalone component if desired and will allow for schema-to-database comparisons and improved migrations.  DQL (Doctrine Query Language) will be a true language with a recursive parser that builds queries and throws useful, informative exceptions.  A more explicit relationship between your model classes (based on PHP comments) will vastly improve entity inheritance, performance and the ability to write raw SQL and still get hydrated objects back as a result.

Worst case timeline for a stable release is six to twelve months.

Offline Admin Generator with HTML5 and Gears

Thomas Parisot’s offline admin generator is a peek into the future of running web applications offline.  Neither HTML5 nor Google Gears (which is discontinued) is supported enough to make this a reality for a consumer application yet…perhaps if you can force people to use a particular browser.  He did make some interesting observations about how it is possible make a javascript listener on every form that posts to the server to generically capture and locally store all of the transactions in the local SQLite database.  There are two models to choose from when designing an offline app.  The simpler approach is to have the user explicitly request to switch to “offline” mode before they lose connectivity.  The preferable, yet more complex approach is to always store transactions locally and then check if the connection is still up when moving from the local copy to the database.  Admittedly, the sample offline admin generator was more of a proof-of-concept than anything we can expect to actually use in the near future.

The Symfony Community

Finally, Stefan Koopmanschap, the current symfony community manager, gave a talk about how to properly get involved in the symfony community.  There are the Google Groups (symfony-userssymfony-docssymfony-devs and symfony-community).  If you can’t find what you want there, then there are the IRC channels or sending out a tweet with the #symfony hashtag.  There are many local groups as well.  For example, the San Francisco Symfony Meetup group where I’ll be giving a recap of Symfony Live in the near future.  He stressed that if no one contributes, then there is nothing to be gained from the community, so please submit bugs to Trac if you find them, answer people’s questions, speak at a meetup or conference and introduce yourselves to your fellow developers!

For day two of Symfony Live 2010, click here.

This entry was posted on Tuesday, February 16th, 2010 at 12:57 pm and is filed under Community & Social Media, Digital Marketing, Technology, Web Development Process. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Symfony Live Conference, Paris 2010 (Day One)”

  1. Pablo Godel Says:

    Damien, thanks for the great summary.

  2. Geoffrey Says:

    Hi Damien,

    sfPot is named after the word “pot” that is french slang for “having a drink” :-)

    As for my terrible accent, the guillotine reference is much appreciated, and I’m working hard to improve it, hopefuly it’ll be ok for symfony camp :s

  3. JP Says:

    Nice write up Damien! Congrats for the prize ;)

Leave a Reply

* indicates required information