LectureN

LectureN - CakePHP CakePHP A framework for developing applications in PHP Inspired by Ruby on Rails Follows MVC design pattern Convention over

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CakePHP
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CakePHP A framework for developing applications in PHP Inspired by Ruby on Rails Follows MVC design pattern Convention over configuration No wheel reinventing required!
Background image of page 2
MVC Model Data layer View Presentation layer Controller Logic layer
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CakePHP Framework app/ config/ controllers/ models/ plugins/ tmp/ vendors/ views/ webroot/ cake/ config/ docs/ libs/ vendors/
Background image of page 4
Naming conventions http://book.cakephp.org/view/328/Cake- Conventions Table names: “notes”, “my_notes” Model: “mynote.php”->“MyNote” Controller: “my_notes_controller.php”-> “MyNotesController” Views named after actions, organised in folders according to the related controller: views/my_notes/index.thtml views/my_notes/add.thtml
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Paths + parameters Cake uses url to pass parameters Apache mod_rewrite converts url into scriptname and parameters http://www.example.com /controllername/action/param1/param2/… Uses paths to figure out views Views stored in “controllername” folder
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
OOP in PHP Limited support in PHP <5 Much better support in PHP >=5 Simpler than Java OOP  class SomeClass {   function func() {       ….   } } SomeClass s = new someClass(); s->func();
Background image of page 8
Hello world… again Remember application is separated into model / view / controller Model: <?php /* /app/model/hello.php */ class Hello extends AppModel {     var $name     = 'Hello';   var $useTable = false; } ?>
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/02/2012 for the course C S 360 taught by Professor Clement,m during the Winter '08 term at BYU.

Page1 / 26

LectureN - CakePHP CakePHP A framework for developing applications in PHP Inspired by Ruby on Rails Follows MVC design pattern Convention over

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online