19
Rapid PHP Web Development with Symfony Framework Coscup Conference, Taipei 15 Sept 2009

Rapid PHP Web Development with Symfony Framework · Why Symfony • Support complex web applicaons • Ideas adopted from exisng framework ( Mojavi, Prado, Rails, Django) • Clean

  • Upload
    others

  • View
    22

  • Download
    0

Embed Size (px)

Citation preview

Rapid PHP Web Development with Symfony Framework Coscup Conference, Taipei 15 Sept 2009 

Who am I 

•  Paul Ooi a.k.a takizo (黄琮政)  

•  Chief Systems Engineer of Global Transit 

•  Internet Service Provider environment 

•  Systems, Security and ApplicaPons 

We Love Open Source 

•  Almost all applicaPons/systems are powered by Open Source SoSware  

Rapid PHP Web Development with Symfony Framework 

Why Framework? 

•  Speed up applicaPon development •  Easy to maintain •  Structured the code •  Code cleanliness •  Scalability •  Code Reusable / Object orientaPon •  Agile Development •  MVC PaXern (Model, View, Controller) 

Why Symfony 

•  Support complex web applicaPons 

•  Ideas adopted from exisPng framework (Mojavi, Prado, Rails, Django) •  Clean MVC SeparaPon •  Configurability, Flexibility •  Write less code… •  Support Unit and FuncPonal TesPng 

DocumentaPon 

•  The DefiniPve Guide – Free Online •  Support MulPple Languages: EN, CN, IT, JA, VN •  Greet Tutorials: askeet, jobeet, cookbook, prople, dostrine •  API Reference for plugin 

Community 

•  Large community •  Forum •  Wiki •  Snippets •  Mailing List/Group •  Symfony Blogs 

Design 

Design 

•  Clean SeparaPon: Model, View, Controller 

•  Classify: Module> AcPon  •  RestricPve with Structure •  App > Module > AcPon > <configuraPon files> •  Generate default classes, libraries and models 

•  Model: Library, Classes •  View: Template •  Controller: ConfiguraPon 

Database 

•  Object Role Modeling (ORM) •  MySQL and PostgreSQL 

•  Propel as default •  Doctrine is distributed with Symfony •  It doesn’t require external ORM 

Speed and Performance 

•  Cache configuraPon •  Caching on page, funcPon, query •  opcode, memcache, zend •  easy cache management sfViewCacheManager  •  disable/enable plug‐ins, database, modules  

Template and RouPng 

•  Easy to manage template •  template is base on module’s acPon •  RouPng base on configuraPon •  SEO Friendly URL  hXp://coscupdemo/arPcle/123 hXp://coscupdemo/how‐to‐start 

TesPng and Troubleshoot 

•  Turn on development environment •  Assessment on module loading Pme •  Analyze database query •  Friendly logging 

Plugin and Helper 

•  Ajax Enabled Plugins •  jquery, dojo, extjs, yui •  Create your own plugin and reuse •  Helper makes your life easy ValidaPon – using YML Autocomplete – input_autocomplete_tag Drag and drop – draggable_element 

Demo 

Symfony 

•  yahoo! answer •  yahoo! bookmark •  delicious •  Daily MoPon •  CRM, Customer Portal, Intranet Portal 

QuesPon 

Enjoy the rest of the conference