Symfony 1.1 - Fabien Potencier

64
Fabien Potencier symfony symfony 1.1 goodness

Transcript of Symfony 1.1 - Fabien Potencier

Page 1: Symfony 1.1 - Fabien Potencier

Fabien Potencier

symfony symfony 1.1 goodness

Page 2: Symfony 1.1 - Fabien Potencier

Who am I? • Founder of Sensio

– Web Agency – Since 1998 – 45 people – Open-Source Specialists – Big corporate customers

• Creator and lead developer of symfony

Page 3: Symfony 1.1 - Fabien Potencier

symfony • PHP Web framework

• Based on – 10 years of Sensio experience

– Existing Open-Source projects

• MIT license

• Documentation is Open-Source

• Great community

Page 4: Symfony 1.1 - Fabien Potencier

Maintainability Standardization Faster & Better

Page 5: Symfony 1.1 - Fabien Potencier

« entreprise » version

Page 6: Symfony 1.1 - Fabien Potencier

Version 1.0 released early 2007

– Maintained for 3 years (early 2010)

– ~1 release a month (1.0.16 now) • Bug and security fixes, compatibility with

new PHP versions fixes

• No new features (even small ones)

• Upgrading is simple and safe

Page 7: Symfony 1.1 - Fabien Potencier

Version 1.1 to be released this month – Maintained for 1 year

– Same release cycle as 1.0

Roadmap – Version 1.2 Q4 2008

– Version 1.3 Q1 2009

Page 8: Symfony 1.1 - Fabien Potencier

symfony is a set of cohesive but decoupled classes

Page 9: Symfony 1.1 - Fabien Potencier

symfony platform

Page 10: Symfony 1.1 - Fabien Potencier
Page 11: Symfony 1.1 - Fabien Potencier
Page 12: Symfony 1.1 - Fabien Potencier
Page 13: Symfony 1.1 - Fabien Potencier
Page 14: Symfony 1.1 - Fabien Potencier

http://localhost/index.php!

http://localhost/index.php?name=Fabien!

Hello Fabien

Hello World

Page 15: Symfony 1.1 - Fabien Potencier
Page 16: Symfony 1.1 - Fabien Potencier

http://localhost/hello /Fabien!

Hello Fabien

http://localhost/index.php?name=Fabien!

http://localhost/index.php/hello /Fabien!

Page 17: Symfony 1.1 - Fabien Potencier

sfEventDispatcher // sfPatternRouting!$callback = array($this, ’filterParameters‘);!

$dispatcher->connect(’request.filter_parameters‘, $callback);!

// sfWebRequest!$event = new sfEvent($this, ‘request.filter_parameters’);!

$dispatcher->filter($event, $parameters);!

•  sfPatternRouting and sfWebRequest are decoupled •  « Anybody » can listen to any event •  You can notify existing events or create new ones

Page 18: Symfony 1.1 - Fabien Potencier

Some events application.log application.throw_exception context.load_factories request.filter_parameters user.change_culture controller.page_not_found response.filter_content view.cache.filter_content *.method_not_found

Page 19: Symfony 1.1 - Fabien Potencier

symfony platform

Page 20: Symfony 1.1 - Fabien Potencier

the symfony MVC framework is based on

the symfony platform

Page 21: Symfony 1.1 - Fabien Potencier
Page 22: Symfony 1.1 - Fabien Potencier
Page 23: Symfony 1.1 - Fabien Potencier
Page 24: Symfony 1.1 - Fabien Potencier

symfony 1.1 new features and enhancements

Page 25: Symfony 1.1 - Fabien Potencier

CLI • Rewritten from scratch

– OOP – Arguments and options management – Extensible – Built-it help

Page 26: Symfony 1.1 - Fabien Potencier
Page 27: Symfony 1.1 - Fabien Potencier
Page 28: Symfony 1.1 - Fabien Potencier
Page 29: Symfony 1.1 - Fabien Potencier

Tests • Better m2m support in fixtures

• File upload support

• CSS3 selectors

• New shortcuts (isUserCulture, isRequestFormat)

Page 30: Symfony 1.1 - Fabien Potencier

m2m fixtures

Page 31: Symfony 1.1 - Fabien Potencier

m2m fixtures

Page 32: Symfony 1.1 - Fabien Potencier

m2m fixtures

Page 33: Symfony 1.1 - Fabien Potencier

File upload support

Page 34: Symfony 1.1 - Fabien Potencier

CSS3 selectors

Page 35: Symfony 1.1 - Fabien Potencier

Forms • OOP

• Flexible and customizable

• MVC based (Validator, Widget, Form)

• Easy to embed forms

• Secure

• Fully integrated with Propel and Doctrine

• Useable without symfony

Page 36: Symfony 1.1 - Fabien Potencier

Propel Form The model is introspected to generate form classes

Page 37: Symfony 1.1 - Fabien Potencier
Page 38: Symfony 1.1 - Fabien Potencier
Page 39: Symfony 1.1 - Fabien Potencier
Page 40: Symfony 1.1 - Fabien Potencier
Page 41: Symfony 1.1 - Fabien Potencier
Page 42: Symfony 1.1 - Fabien Potencier
Page 43: Symfony 1.1 - Fabien Potencier
Page 44: Symfony 1.1 - Fabien Potencier
Page 45: Symfony 1.1 - Fabien Potencier
Page 46: Symfony 1.1 - Fabien Potencier
Page 47: Symfony 1.1 - Fabien Potencier
Page 48: Symfony 1.1 - Fabien Potencier
Page 49: Symfony 1.1 - Fabien Potencier
Page 50: Symfony 1.1 - Fabien Potencier
Page 51: Symfony 1.1 - Fabien Potencier
Page 52: Symfony 1.1 - Fabien Potencier
Page 53: Symfony 1.1 - Fabien Potencier

Native multi-format support • A request has a format (HTML by default)

css, js, xml, atom, json, …

• Same controller and model

• Different templates (layouts/partials/components)

• Easy to implement a new format (iPhone) http://www.symfony-project.org/cookbook/1_1/en/iphone!

Page 54: Symfony 1.1 - Fabien Potencier
Page 55: Symfony 1.1 - Fabien Potencier
Page 56: Symfony 1.1 - Fabien Potencier
Page 57: Symfony 1.1 - Fabien Potencier
Page 58: Symfony 1.1 - Fabien Potencier
Page 59: Symfony 1.1 - Fabien Potencier
Page 60: Symfony 1.1 - Fabien Potencier
Page 61: Symfony 1.1 - Fabien Potencier
Page 62: Symfony 1.1 - Fabien Potencier

xml

json

css

js

text/xml, application/xml, application/x-xml

application/json, application/x-json

text/css

application/javascript, application/x-javascript

Page 63: Symfony 1.1 - Fabien Potencier

Questions?

Page 64: Symfony 1.1 - Fabien Potencier

Sensio S.A. 26, rue Salomon de Rothschild

92 286 Suresnes Cedex FRANCE

Tél. : +33 1 40 99 80 80

Contact Fabien Potencier

[email protected]

http://www.sensiolabs.com/ http://www.symfony-project.org/