PHP MVC Frameworks and Symfony - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

PHP MVC Frameworks and Symfony

Description:

Auto-generated based on schema. Object Relational Mapper (ORM) List, show, edit, & add. 4 pages, 30 LOC. Admin Generator. i18n and l10n. English: (LTR) ... – PowerPoint PPT presentation

Number of Views:1416
Avg rating:3.0/5.0
Slides: 19
Provided by: syllogisti
Category:
Tags: mvc | php | frameworks | symfony

less

Transcript and Presenter's Notes

Title: PHP MVC Frameworks and Symfony


1
PHP MVC Frameworksand Symfony
2
What is MVC?
  • Model-View-Controller
  • Separates
  • M Data model
  • V Presentation (UI)
  • C Business logic
  • Can change any of these three without affecting
    the others (in theory)

3
Why use an MVC framework?
  • Avoid reinventing the wheel
  • Use proven, tested code
  • Automation (ORM, generators)
  • Maintainability
  • Plugin functionality

4
Flow Traditional vs. MVC
Query
Controller
Model
Processing
Output
Output
Query
Output
Processing
View
Final Output
5
Popular PHP MVC Frameworks
  • CakePHP
  • Documentation is somewhat lacking
  • Apparently difficult for beginners
  • Symfony
  • Great documentation and community
  • Easy to get started
  • Zend
  • Supported by Zend (official PHP company)
  • More of a library than complete framework

6
Why did we choose Symfony?
  • Steep learning curve, but
  • Great documentation
  • Great community
  • Well-written and tested code
  • Nice deployment system (PEAR / SVN)
  • Extensive use of existing projects, instead of
    rewriting everything from scratch

7
http//www.symfony-project.org
8
Model
View
Controller
9
Command line interface
  • Has a command line interface
  • Creates the basis for the module
  • Helps with maintenance
  • Easy to check if everything worked

10
Object Relational Mapper (ORM)
YAML (Used in RoR)
  • Propel gives database independence
  • Id, created_at, foreign key fields are
    autogenerated

11
Object Relational Mapper (ORM)
  • Database tables classes table rows objects
  • Auto-generated based on schema

12
Admin Generator
  • List, show, edit, add
  • 4 pages, lt 30 LOC

13
i18n and l10n
English (LTR)
Arabic (RTL)
14
Symfony Plugins
  • 100s of plugins
  • Easy integration
  • AJAX, CSS, CMS, SEO, Security, Flash, etc.

15
  • Diagnose Problems
  • Check Execution Time
  • Optimize SQL Queries

16
Should you use an MVC framework for your next
project?
  • Are there complex hierarchical relationships in
    your data?
  • Will this project need to be maintained by more
    than one person for more than a year?
  • Do you need the ability to add advanced features
    like AJAX without writing the code from scratch?
  • Probably Yes. (unless its a throwaway)

17
Which MVC Framework?
  • .NET (official)
  • Ruby on Rails
  • PHP
  • CakePHP
  • Symfony
  • Zend
  • Use a well-established framework with good
    documentation and a large community

18
More information
  • Symfony Project
  • http//www.symfony-project.org
  • Syllogistic Software
  • http//www.syllogisticsoftware.com
  • Questions?
  • Contact Jason Hanley jhanley_at_sylsft.com
Write a Comment
User Comments (0)
About PowerShow.com