Who is this bloke?
•   Graham Weldon
•   PHP: 9 years
•   CakePHP Core Developer
•   http://grahamweldon.com
•   Cake Development Corporation
•   http://cakedc.com
•   @predominant
•   Workshops                •   Conference

•   Learn from the core      •   Presentations from core
    developers                   developers

•   Get one on one support   •   Community presenters
    for existing code
                             •   Lightning talks
•   Comfortable, easy to
    learn environment        •   Prizes

•   Cheaper than ever!       •   Networking
Concept

• Software Requirements
• Impact Analysis
• Documentation
Concept

• Projects
• Sections
• Requirements
• Dependencies
• Tests
Concept

• Projects
• Sections
• Requirements
• Dependencies
• Tests
Defining Standards

• Models
• Views
• Controllers
• Libraries
• Database
Standards: Models
•   Class name: Singular

    •   Project

    •   SoftwareProject

•   Filename: Singular (lowercase, underscored)

    •   project.php

    •   software_project.php

•   Path: /app/models/
Standards: Views


• File name: Match Controller action name
• Path: /app/views/<controller>/<action>.ctp
Standards: Controllers

• Class Name: Plural
 • ProjectsController
• File Name: Plural (lowercase, underscored)
 • projects_controller.php
• Path: /app/controllers/
Standards: Database
• Tables: Plural (lowercase, underscored)
 • projects
 • software_projects
• Foreign Keys: Singlular (lowercase, id suffix)
 • project_id
 • software_project_id
Designing the Database
User
User   Project
User   Project   Project
User   Project     Project


         Section     Section
User   Project     Project


         Section     Section

         Section     Section

         Section     Section
User   Project     Project


         Section     Section

         Section     Section

         Section     Section


            R
User       Project         Project


             Section         Section

             Section         Section

             Section         Section


                R

       R               R
User       Project               Project


               Section             Section

               Section             Section

               Section             Section


                 R

       R                     R


           R             R
User       Project               Project


               Section             Section

               Section             Section

               Section             Section


                 R

       R                     R


           R             R
User       Project               Project


               Section             Section

               Section             Section

               Section             Section


                 R

       R                     R


           R             R
Baking
Models




Controllers




 Views
Models
Representation of data, and
provision of operations to be
performed on data


Controllers




 Views
Models
Representation of data, and
provision of operations to be
performed on data


Controllers
Application flow control. Pass model
data to views, prevent unauthorised
access.


 Views
Models
Representation of data, and
provision of operations to be
performed on data


Controllers
Application flow control. Pass model
data to views, prevent unauthorised
access.


 Views
Output from application. XHTML,
JSON, XML, etc.
Models




Controllers




 Views
Models
$   cake    bake   model   user
$   cake    bake   model   project
$   cake    bake   model   section
$   cake    bake   model   requirement


Controllers




    Views
Models
$   cake    bake   model   user
$   cake    bake   model   project
$   cake    bake   model   section
$   cake    bake   model   requirement


Controllers
$   cake    bake   controller   users
$   cake    bake   controller   projects
$   cake    bake   controller   sections
$   cake    bake   controller   requirements


    Views
Models
$   cake    bake   model   user
$   cake    bake   model   project
$   cake    bake   model   section
$   cake    bake   model   requirement


Controllers
$   cake    bake   controller   users
$   cake    bake   controller   projects
$   cake    bake   controller   sections
$   cake    bake   controller   requirements


    Views
$ cake bake view all
Models
$    cake   bake   model      user
$    cake   bake   model      project
$    cake   bake   model      section
$    cake   bake   model      requirement


Controllers
$    cake   bake   controller      users
$    cake   bake   controller      projects
$    cake   bake   controller      sections
$    cake   bake   controller      requirements


    Views
$ cake bake view all

    There are shortcuts for
         most things
Models
$    cake   bake   model      user
$    cake   bake   model      project
$    cake   bake   model      section
$    cake   bake   model      requirement


Controllers
$    cake   bake   controller      users
$    cake   bake   controller      projects
$    cake   bake   controller      sections
$    cake   bake   controller      requirements


    Views
$ cake bake view all

    There are shortcuts for        Console help:
         most things             $ cake bake help
Models
$    cake   bake   model      user
$    cake   bake   model      project
$    cake   bake   model      section
$    cake   bake   model      requirement


Controllers
$    cake   bake   controller      users
$    cake   bake   controller      projects
$    cake   bake   controller      sections
$    cake   bake   controller      requirements


    Views
$ cake bake view all

    There are shortcuts for        Console help:
         most things             $ cake bake help
What was generated?
Associations
Has One

  1 .. 1
Has Many
Has Many

  1 .. n
Belongs To

   1 .. n
Has And Belongs To Many
Has And Belongs To Many


         n .. n
Has And Belongs To Many


         n .. n




     HABTM
Authentication
Alternate Content




    RSS, JSON, XML
Training
Training
•   Beginners            •   Cake Development
                             Corporation
•   Experienced users
                         •   Employs most of the
•   Code Review              CakePHP Core dev’s

•   Project Management   •   Largest supporter of the
                             CakePHP Framework
Thanks!

Cake php 1 3 concept to deployment presentation

  • 2.
    Who is thisbloke? • Graham Weldon • PHP: 9 years • CakePHP Core Developer • http://grahamweldon.com • Cake Development Corporation • http://cakedc.com • @predominant
  • 3.
    Workshops • Conference • Learn from the core • Presentations from core developers developers • Get one on one support • Community presenters for existing code • Lightning talks • Comfortable, easy to learn environment • Prizes • Cheaper than ever! • Networking
  • 5.
    Concept • Software Requirements •Impact Analysis • Documentation
  • 6.
    Concept • Projects • Sections •Requirements • Dependencies • Tests
  • 7.
    Concept • Projects • Sections •Requirements • Dependencies • Tests
  • 8.
    Defining Standards • Models •Views • Controllers • Libraries • Database
  • 9.
    Standards: Models • Class name: Singular • Project • SoftwareProject • Filename: Singular (lowercase, underscored) • project.php • software_project.php • Path: /app/models/
  • 10.
    Standards: Views • Filename: Match Controller action name • Path: /app/views/<controller>/<action>.ctp
  • 11.
    Standards: Controllers • ClassName: Plural • ProjectsController • File Name: Plural (lowercase, underscored) • projects_controller.php • Path: /app/controllers/
  • 12.
    Standards: Database • Tables:Plural (lowercase, underscored) • projects • software_projects • Foreign Keys: Singlular (lowercase, id suffix) • project_id • software_project_id
  • 13.
  • 14.
  • 15.
    User Project
  • 16.
    User Project Project
  • 17.
    User Project Project Section Section
  • 18.
    User Project Project Section Section Section Section Section Section
  • 19.
    User Project Project Section Section Section Section Section Section R
  • 20.
    User Project Project Section Section Section Section Section Section R R R
  • 21.
    User Project Project Section Section Section Section Section Section R R R R R
  • 22.
    User Project Project Section Section Section Section Section Section R R R R R
  • 23.
    User Project Project Section Section Section Section Section Section R R R R R
  • 24.
  • 25.
  • 26.
    Models Representation of data,and provision of operations to be performed on data Controllers Views
  • 27.
    Models Representation of data,and provision of operations to be performed on data Controllers Application flow control. Pass model data to views, prevent unauthorised access. Views
  • 28.
    Models Representation of data,and provision of operations to be performed on data Controllers Application flow control. Pass model data to views, prevent unauthorised access. Views Output from application. XHTML, JSON, XML, etc.
  • 29.
  • 30.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers Views
  • 31.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers $ cake bake controller users $ cake bake controller projects $ cake bake controller sections $ cake bake controller requirements Views
  • 32.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers $ cake bake controller users $ cake bake controller projects $ cake bake controller sections $ cake bake controller requirements Views $ cake bake view all
  • 33.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers $ cake bake controller users $ cake bake controller projects $ cake bake controller sections $ cake bake controller requirements Views $ cake bake view all There are shortcuts for most things
  • 34.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers $ cake bake controller users $ cake bake controller projects $ cake bake controller sections $ cake bake controller requirements Views $ cake bake view all There are shortcuts for Console help: most things $ cake bake help
  • 35.
    Models $ cake bake model user $ cake bake model project $ cake bake model section $ cake bake model requirement Controllers $ cake bake controller users $ cake bake controller projects $ cake bake controller sections $ cake bake controller requirements Views $ cake bake view all There are shortcuts for Console help: most things $ cake bake help
  • 36.
  • 37.
  • 38.
    Has One 1 .. 1
  • 39.
  • 40.
    Has Many 1 .. n
  • 41.
  • 42.
  • 43.
    Has And BelongsTo Many n .. n
  • 44.
    Has And BelongsTo Many n .. n HABTM
  • 45.
  • 46.
    Alternate Content RSS, JSON, XML
  • 47.
  • 48.
    Training • Beginners • Cake Development Corporation • Experienced users • Employs most of the • Code Review CakePHP Core dev’s • Project Management • Largest supporter of the CakePHP Framework
  • 49.