CakePHP 2.0 - It'll rock your world
Upcoming SlideShare
Loading in...5
×
 

CakePHP 2.0 - It'll rock your world

on

  • 10,654 views

A talk given to the New York CakePHP usergroup, discussing the specifics of changes within the CakePHP 2.0 feature set, motivations for those changes, and upcoming changes as development continues.

A talk given to the New York CakePHP usergroup, discussing the specifics of changes within the CakePHP 2.0 feature set, motivations for those changes, and upcoming changes as development continues.

Statistics

Views

Total Views
10,654
Views on SlideShare
10,438
Embed Views
216

Actions

Likes
10
Downloads
175
Comments
4

36 Embeds 216

http://phpdevposts.blogspot.com 60
http://ammasajan.blogspot.com 29
http://ammasajan.blogspot.in 23
http://phpfworks.blogspot.com 15
http://phpfworks.blogspot.com 15
http://ammasajan.blogspot.sg 12
http://coderwall.com 5
http://phpdevposts.blogspot.in 5
http://twitter.com 5
http://www.mefeedia.com 5
http://ammasajan.blogspot.fr 4
http://ammasajan.blogspot.co.uk 4
http://ammasajan.blogspot.com.es 3
http://paper.li 3
http://ammasajan.blogspot.jp 3
http://ammasajan.blogspot.co.nz 2
http://ammasajan.blogspot.co.il 2
http://ammasajan.blogspot.ro 2
http://ammasajan.blogspot.com.au 2
http://phpdevposts.blogspot.kr 1
http://ammasajan.blogspot.it 1
http://ammasajan.blogspot.mx 1
http://ammasajan.blogspot.be 1
http://ammasajan.blogspot.nl 1
https://twitter.com 1
http://ammasajan.blogspot.de 1
http://ammasajan.blogspot.ca 1
http://phpdevposts.blogspot.com.br 1
http://s.deeeki.com 1
http://ammasajan.blogspot.com.br 1
http://ammasajan.blogspot.cz 1
http://slideclip.b-prep.com 1
http://phpdevposts.blogspot.de 1
http://ammasajan.blogspot.kr 1
https://si0.twimg.com 1
http://www.verious.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Great job guys! Looking forward to using CakePHP 2.0!
    Are you sure you want to
    Your message goes here
    Processing…
  • Hi Graham, do you have a pdf-version too? I don’t have keynote on my mac.
    Are you sure you want to
    Your message goes here
    Processing…
  • Here are the videos:

    http://tv.cakephp.org/video/CakeFoundation/2011/04/07/la_meetup_2011_part_one
    http://tv.cakephp.org/video/CakeFoundation/2011/04/07/la_meetup_2011_part_two
    http://tv.cakephp.org/video/CakeFoundation/2011/04/07/la_meetup_2011_part_three
    http://tv.cakephp.org/video/CakeFoundation/2011/04/07/la_meetup_2011_part_four
    http://tv.cakephp.org/video/CakeFoundation/2011/04/07/la_meetup_2011_part_five

    Enjoy!
    Are you sure you want to
    Your message goes here
    Processing…
  • Is der a vdo available for this presentation??
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • startTest and endTest are deprecated- > now use setUp() and tearDown()\n\n
  • startTest and endTest are deprecated- > now use setUp() and tearDown()\n\n
  • startTest and endTest are deprecated- > now use setUp() and tearDown()\n\n
  • startTest and endTest are deprecated- > now use setUp() and tearDown()\n\n
  • \n
  • startTest and endTest are deprecated- > now use setUp() and tearDown()\n\n
  • \n
  • Sane-ified\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • No.\nWell, you are free to grab a clone of the repository\nBut we’re not committing to a release date, theres so much to do!\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

CakePHP 2.0 - It'll rock your world Presentation Transcript

  • 1. CakePHP 2.0 It’ll rock your world
  • 2. Kawasaki Ninja
  • 3. Arduino
  • 4. Games
  • 5. Captain Jack
  • 6. CakePHP Community
  • 7. MotivationsLove CakePHPHate doing repetitive codeLove to teach
  • 8. ... its been a year
  • 9. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009
  • 10. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009 Instead of releasing CakePHP 2.0 that “just works” with PHP5
  • 11. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009 Instead of releasing CakePHP 2.0 that “just works” with PHP5 Refactoring the core
  • 12. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009 Instead of releasing CakePHP 2.0 that “just works” with PHP5 Refactoring the core Exciting changes instead of a quick fix
  • 13. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009 Instead of releasing CakePHP 2.0 that “just works” with PHP5 Refactoring the core Exciting changes instead of a quick fix Look at code that has been around for 4+ years
  • 14. ... its been a year We talked about CakePHP 2.0 at CakeMatsuri in 2009 Instead of releasing CakePHP 2.0 that “just works” with PHP5 Refactoring the core Exciting changes instead of a quick fix Look at code that has been around for 4+ years Remove a lot of code thats no longer needed
  • 15. Challenges
  • 16. ChallengesRetain older users and backwardscompatibility
  • 17. ChallengesRetain older users and backwardscompatibilityMove forward and adopt new features
  • 18. ChallengesRetain older users and backwardscompatibilityMove forward and adopt new featuresStay true to the projects goals and ideals
  • 19. ChallengesRetain older users and backwardscompatibilityMove forward and adopt new featuresStay true to the projects goals and idealsRattle some cages
  • 20. ChallengesRetain older users and backwardscompatibilityMove forward and adopt new featuresStay true to the projects goals and idealsRattle some cages... not too many.
  • 21. PHPSupport Adios PHP 4
  • 22. PHP Support
  • 23. PHP SupportDropping PHP 4 support
  • 24. PHP SupportDropping PHP 4 support
  • 25. PHP SupportDropping PHP 4 supportSupporting PHP 5.2.6 and above
  • 26. PHP SupportDropping PHP 4 supportSupporting PHP 5.2.6 and above Later.. PHP 5.3 and above
  • 27. Err.. PHP 5.2 is Dead
  • 28. Err.. PHP 5.2 is DeadUsers / community are more important thanadopting latest technology
  • 29. Err.. PHP 5.2 is Dead “Be mindful of the future, butnot at the expense of the moment.”
  • 30. Err.. PHP 5.2 is Dead
  • 31. Err.. PHP 5.2 is DeadPush forward where we can, but retain theusers.
  • 32. Carefully balanced
  • 33. Carefully balanced Current Code
  • 34. Carefully balanced Deprecate AddRemove Dream Current Code
  • 35. Carefully balanced Deprecate AddRemove Dream Current Code Current Code
  • 36. Carefully balanced Deprecate AddRemove Dream Current Code Current Code Current Code
  • 37. Carefully balanced Deprecate AddRemove Dream Current Code Current Code Current Code Current Code
  • 38. Don’t move too fast AddRemove
  • 39. Don’t move too fast AddRemove Migration?!
  • 40. Shortcuts
  • 41. ShortcutsRemoved: file_put_contents()e() => echo uses() => Appa() => array array_combine()aa() => assoc array cache() => Cacher() => str_replace array_diff_key()ife() => if / ternary array_intersect_key()params() http_build_query()up() => strtoupperlow() => strtolower PHP5 constant
  • 42. Shortcuts
  • 43. ShortcutsRemoved:getMicrotime()r() => str_replace$TIME_START
  • 44. Unit TestingOut with the SimpleTest In with the PHPUnit
  • 45. Unit Testing
  • 46. Unit TestingArguably one of the bigger changes
  • 47. Unit TestingArguably one of the bigger changesPHPUnit
  • 48. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest
  • 49. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest More actively maintained
  • 50. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest More actively maintained Easily integrated with CruiseControl
  • 51. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest More actively maintained Easily integrated with CruiseControl De-facto standard for Unit Testing in PHP
  • 52. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest More actively maintained Easily integrated with CruiseControl De-facto standard for Unit Testing in PHPInstall with PEAR
  • 53. Unit TestingArguably one of the bigger changesPHPUnit Provides better PHP 5 support over SimpleTest More actively maintained Easily integrated with CruiseControl De-facto standard for Unit Testing in PHPInstall with PEARFaster
  • 54. Unit Testing
  • 55. Unit TestingMore powerful
  • 56. Unit TestingMore powerfulMore awesome
  • 57. Unit TestingMore powerfulMore awesomeMore...
  • 58. Unit TestingMore powerfulMore awesomeMore...
  • 59. Unit TestingMore powerfulMore awesomeMore...More info?
  • 60. Unit TestingMore powerfulMore awesomeMore...More info? http://phpunit.de
  • 61. Unit Testing
  • 62. Unit TestingPHPUnit, at what cost?
  • 63. Unit TestingPHPUnit, at what cost?Rewritten test suite from the ground up
  • 64. Unit TestingPHPUnit, at what cost?Rewritten test suite from the ground upMocks are different.. but awesome++
  • 65. Unit TestingPHPUnit, at what cost?Rewritten test suite from the ground upMocks are different.. but awesome++startTest() and endTest() deprecated
  • 66. Unit Testingassertions slightly differentBackwards compatibility providedExample:$this->assertEqualNow:$this->assertEquals
  • 67. Unit TestingNo more group tests But theres a PHP Unit way to achieve this
  • 68. Collections Organising
  • 69. CollectionsBehaviorsComponentsHelpersShells
  • 70. Components
  • 71. Components
  • 72. Components
  • 73. ComponentsWhat does this mean in the scheme ofthings?
  • 74. ComponentsWhat does this mean in the scheme ofthings?We’ve standardised the manner in whichobjects inherit
  • 75. ComponentsWhat does this mean in the scheme ofthings?We’ve standardised the manner in whichobjects inheritMakes more sense
  • 76. ComponentsWhat does this mean in the scheme ofthings?We’ve standardised the manner in whichobjects inheritMakes more senseIntuitive
  • 77. ComponentsWhat does this mean in the scheme ofthings?We’ve standardised the manner in whichobjects inheritMakes more senseIntuitiveLess need to search documentation
  • 78. SPLReplacing what we can
  • 79. SPLStandard PHP LibraryProvides awesome File and FolderoperationsClasses handy for a whole range of thingsNo need to re-implement in the coreCakePHP 1.x was ahead of its timePHP has caught upTime to cut the fat
  • 80. Non-SPLAgain, don’t reinvent the wheelRemoving duplicate code like JSONencodingCan now rely on this functionality shippingwith PHP
  • 81. Exceptions
  • 82. ExceptionsUsing exceptions to indicate errors in thecoreEasier to controlMore “OO”Removing cakeError
  • 83. ExceptionsCreate custom handlers for each exceptionControl what happens after an exceptionExample:MediaViewIf file not found: Handle intelligently
  • 84. RequestResponseRefactoring, centralising.
  • 85. Request / Response Request represents an incoming request It replaces functionality through Controller, Dispatcher, RequestHandler and $this- >params everywhere ArrayAccess implementation for backwards compatibility
  • 86. Request / Response Protect users form themselves Protect developers from users Protect developers from stupidity Encapsulate both the request and response in order to provide a central location to handle requests and responses, but retain flexibility
  • 87. Sessions
  • 88. SessionsRemove duplicated code (DRY)Shouldn’t be always included (1.3 fix)Modelise data handlingAccess anywhereAllow simple customisationSeparate Caching, Database, etc.
  • 89. Sessions
  • 90. Sessions SessionHandlerDatabase Cache PHP
  • 91. Sessions SessionHandlerDatabase Cache PHP
  • 92. Sessions SessionHandlerDatabase Cache PHP Your Crazy Engine
  • 93. Sessions SessionHandlerDatabase Cache PHP Cake Session Your Crazy Engine Handler Interface
  • 94. Hang on! That looks familiar
  • 95. Javascript (v1.3) JavascriptHelperjQuery Prototype Mootools
  • 96. Javascript (v1.3) JavascriptHelperjQuery Prototype Mootools
  • 97. Javascript (v1.3) JavascriptHelperjQuery Prototype Mootools Your Super Engine
  • 98. Javascript (v1.3) JavascriptHelperjQuery Prototype Mootools Your Super Engine JsBaseEngineHelper
  • 99. LazyLoading
  • 100. Lazy LoadingNested Objects (some of them) Components Helpers Tasks FixturesCheap OptimisationLoad only what you need
  • 101. XMLMaking it make sense!
  • 102. XML
  • 103. XMLAs much as one can make XML make sense..
  • 104. XMLAs much as one can make XML make sense.... we’re doing it
  • 105. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XML
  • 106. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integration
  • 107. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integrationDidn’t handle namespaces well
  • 108. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integrationDidn’t handle namespaces wellDidn’t allow for ordered nodes
  • 109. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integrationDidn’t handle namespaces wellDidn’t allow for ordered nodes
  • 110. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integrationDidn’t handle namespaces wellDidn’t allow for ordered nodesBuild on top of SimpleXML
  • 111. XMLAs much as one can make XML make sense.... we’re doing it1.x was very CakePHP specific with XMLWasn’t handy for integrationDidn’t handle namespaces wellDidn’t allow for ordered nodesBuild on top of SimpleXMLFaster
  • 112. ConsoleThe shell is more popularthan we initially planned
  • 113. Console
  • 114. ConsoleEasier help generation
  • 115. ConsoleEasier help generation Better for users of plugins, as well as plugin developers
  • 116. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text
  • 117. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errors
  • 118. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errorsSupport output verbosity
  • 119. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errorsSupport output verbosityShells are being used:
  • 120. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errorsSupport output verbosityShells are being used: restructure: app/console/
  • 121. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errorsSupport output verbosityShells are being used: restructure: app/console/ Moved from: app/vendors/
  • 122. ConsoleEasier help generation Better for users of plugins, as well as plugin developersColourised console text Easy identification of issues and errorsSupport output verbosityShells are being used: restructure: app/console/ Moved from: app/vendors/Enable better console path configurability
  • 123. ViewsEnabling more control for plugins, and reordering
  • 124. ViewsCallbacks changedAs the framework matured: People built new plugins Plugins need control Want to alter outputOrder of operation changed
  • 125. Viewsevaluate scriptsevaluate contentbeforeLayout()beforeRender()render()
  • 126. ViewsbeforeLayout()beforeRender()evaluate scriptsevaluate contentrender()
  • 127. EmailEmail from anywhere! Its the future!
  • 128. Email
  • 129. EmailUsed to be restricted to Controller use witha Component
  • 130. EmailUsed to be restricted to Controller use witha Component ... or a terrible hack to enable it elsewhere
  • 131. EmailUsed to be restricted to Controller use witha Component ... or a terrible hack to enable it elsewhereNow its a core lib
  • 132. EmailUsed to be restricted to Controller use witha Component ... or a terrible hack to enable it elsewhereNow its a core libUse it anywhere
  • 133. EmailUsed to be restricted to Controller use witha Component ... or a terrible hack to enable it elsewhereNow its a core libUse it anywhereWrappers to provide model / controller use
  • 134. EmailUsed to be restricted to Controller use witha Component ... or a terrible hack to enable it elsewhereNow its a core libUse it anywhereWrappers to provide model / controller useSimple, and effective
  • 135. New Features
  • 136. PDOIts about time!!
  • 137. PDOYes, dear God yes!PDO datasources now available in 2.0Working with Microsoft to get MSSQLsupport finalised with new PDO drivers
  • 138. PDOAll databases work the sameEasily switch between enginesProvides assurance for context switching: Development Environment Production Environment
  • 139. Rewriting URLsSimplifying request data
  • 140. Rewriting URLs
  • 141. Rewriting URLsPreviously:
  • 142. Rewriting URLsPreviously: /index.php?url=controller/action/data
  • 143. Rewriting URLsPreviously: /index.php?url=controller/action/dataNow:
  • 144. Rewriting URLsPreviously: /index.php?url=controller/action/dataNow: /index.php/controller/action/data
  • 145. Rewriting URLsPreviously: /index.php?url=controller/action/dataNow: /index.php/controller/action/data
  • 146. Rewriting URLsPreviously: /index.php?url=controller/action/dataNow: /index.php/controller/action/dataWhat does that mean for developers?
  • 147. Rewriting URLs
  • 148. Rewriting URLsSimplifies internal structure for rewriting
  • 149. Rewriting URLsSimplifies internal structure for rewritingEasier cross-server operation
  • 150. Rewriting URLsSimplifies internal structure for rewritingEasier cross-server operation Various rewriting mechanisms
  • 151. Rewriting URLsSimplifies internal structure for rewritingEasier cross-server operation Various rewriting mechanisms Non-apache installs
  • 152. Named ParamsNow allows arrays to be passedEven allows nested arrays
  • 153. Named Params
  • 154. Auth
  • 155. Authentication
  • 156. AuthenticationCompletely refactored
  • 157. AuthenticationCompletely refactoredNo longer automatically hashes allpasswords
  • 158. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlers
  • 159. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objects
  • 160. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objectsManually login a user
  • 161. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objectsManually login a userBasic Authentication
  • 162. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objectsManually login a userBasic AuthenticationDigest Authentication
  • 163. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objectsManually login a userBasic AuthenticationDigest AuthenticationStateless Authentication
  • 164. AuthenticationCompletely refactoredNo longer automatically hashes allpasswordsAuthentication handlersCustom authentication objectsManually login a userBasic AuthenticationDigest AuthenticationStateless AuthenticationFull details:
  • 165. FileStructure and class loading
  • 166. File StructurePSR-0 https://groups.google.com/group/php- standards/web/psr-0-final-proposal? pli=1App::import => App::usesThis enables loading in a lazy manner
  • 167. DebuggingYou’ve been waiting for this one... at least, we have.
  • 168. DebuggingNo more HTML output in console debuggingUses Ascii blocks to distinguish itself
  • 169. Full Details
  • 170. Full DetailsLighthouse app
  • 171. Full DetailsLighthouse apphttp://cakephp.lighthouseapp.com/projects/42648-cakephp
  • 172. Gettingfeedback
  • 173. I can has?
  • 174. CakePHP Release Cycle
  • 175. Dev
  • 176. DevAlpha
  • 177. DevAlphaBeta
  • 178. ReleaseDev Candidate #1AlphaBeta
  • 179. ReleaseDev Candidate #1 ReleaseAlpha Candidate #2Beta
  • 180. ReleaseDev Candidate #1 ReleaseAlpha Candidate #2 ReleaseBeta Candidate #3
  • 181. ReleaseDev Candidate Stable #1 ReleaseAlpha Candidate #2 ReleaseBeta Candidate #3
  • 182. ReleaseDev Candidate Stable #1 Release PatchesAlpha Candidate #2 Patches Patches ReleaseBeta Candidate ... #3
  • 183. ReleaseDev Candidate Stable #1 Release PatchesAlpha Candidate #2 Patches Patches ReleaseBeta Candidate ... #3
  • 184. Grab the codehttp://cakephp.orghttp://github.com/cakephp/cakephp Branch: 2.0
  • 185. Questions?Comments?Free hugs?Slides will be available here:http://www.slideshare.net/predominant