18. Cake Development Corporation
GetAGRASPOfYourCodeGetAGRASPOfYourCode General Responsibility
AssignmentSoftwarePatternsGeneral Responsibility
AssignmentSoftwarePatterns
22. Cake Development Corporation
KeepThingsInContextKeepThingsInContext
TheLawOfDemeter,Don'tTalkToStrangersTheLawOfDemeter,Don'tTalkToStrangers
23. Cake Development Corporation DoesItScale?DoesItScale?
IgnoreThePerformanceBenchmarksIgnoreThePerformanceBenchmarks
24. Cake Development Corporation
Scalemeansmanythings...Scalemeansmanythings... >
Dataprocessing> Dataprocessing > Requestconcurrency>
Requestconcurrency > Cachingstrategy> Cachingstrategy >
Storageengine> Storageengine > Development effort>
Development effort > Maintenancecost> Maintenancecost
25. Cake Development Corporation
ThinkAboutYourDataThinkAboutYourData YourDatabaseSchema
IsYourAchillesHeelYourDatabaseSchema IsYourAchillesHeel
26. Cake Development Corporation
ThinkAheadWithYourDataThinkAheadWithYourData
AvoidStaleData,UseQueuing,CronTasksAnd Data
WarehousingAvoidStaleData,UseQueuing,CronTasksAnd Data
Warehousing
27. Cake Development Corporation AvoidTheHypeAvoidTheHype
Don'tFollowTheHerd,BeGuidedOnlyBy
ResultsDon'tFollowTheHerd,BeGuidedOnlyBy Results
28. Cake Development Corporation
RespectTheProfessionRespectTheProfession
TheCheaperAlternativeIsAlwaysMoreExpensiveLaterTheCheaperAlternativeIsAlwaysMoreExpensiveLater
29. Cake Development Corporation
ReduceTechnicalDebtReduceTechnicalDebt BeRealisticAboutCornersYou
Cut AndShortcutsYou TakeBeRealisticAboutCornersYou Cut
AndShortcutsYou Take
30. Cake Development Corporation
BudgetConstraintsAreRealBudgetConstraintsAreReal
ContemplateFutureDealingOfAccumulated
DebtContemplateFutureDealingOfAccumulated Debt
31. Cake Development Corporation VersionControlVersionControl
ThereIsThereIs NONO ExcuseToNotVersion
YourSourceCodeExcuseToNotVersion YourSourceCode
32. Cake Development Corporation Test,Test,TestTest,Test,Test
ReduceCoverageReduceCoverage BeforeBefore
YouAvoidTestingAnythingYouAvoidTestingAnything
33. Cake Development Corporation PracticePractice
34. Cake Development Corporation
CakeDCGitWorkflowCakeDCGitWorkflow
http://cakedc.com/git-workflowhttp://cakedc.com/git-workflow
35. Cake Development Corporation
GitDevelopmentStrategyGitDevelopmentStrategy
36. Cake Development Corporation Stability,Quality&
ConsistencyStability,Quality& Consistency
37. Cake Development Corporation Debug KitDebug Kit
https://github.com/cakephp/debug_kithttps://github.com/cakephp/debug_kit
38. Cake Development Corporation
CakeDCMigrationsCakeDCMigrations
https://github.com/CakeDC/migrationshttps://github.com/CakeDC/migrations
39. Cake Development Corporation CakeDependencyCakeDependency
https://github.com/jameswatts/cake-dependencyhttps://github.com/jameswatts/cake-dependency
46. Cake Development Corporation Object-Oriented
ViewsObject-Oriented Views class IndexView extends CtkView { public
$factories = ['Ctk.Html', 'Ctk.Js']; public function build() { //
create a HTML div $div = $this->Html->Div(); // create a HTML
button $button = $this->Html->Button([ 'value' =>
__('Click Me') ]); // add the button to the div
$div->add($button); // add the div to the view
$this->add($div); } }
47. Cake Development Corporation
ViewExtensibilityViewExtensibility class IndexView extends CtkView
{ public $factories = ['Ctk.Html', 'Ctk.Js']; public function
build() { $div = $this->Html->Div();
$div->add($this->buildButton()); $this->add($div); }
public function buildButton($value) { return
$this->Html->Button([ 'value' => __($value) ]); } }
48. Cake Development Corporation AttachingEventsAttachingEvents
// create a HTML button $button = $this->Html->Button([
'value' => __('Click Me') ]); // bind an event to the button
$button->bind('click', $this->Js->Alert([ 'text' =>
__('Hello World') ]));
49. Cake Development Corporation
ReusingObjectsInLegacyViewsReusingObjectsInLegacyViews
50. Cake Development Corporation
CakeMarkupLanguageCakeMarkupLanguage
https://github.com/jameswatts/cake-markup-languagehttps://github.com/jameswatts/cake-markup-language