Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Barely Enough Design

15,797 views

Published on

Test Driven Design really helps us learn about the design of our code and how to improve on it. It is also true that the more we know about design, the more our code can actually benefit from TDD. This talk will cover just enough to give you the design inspiration you need to appreciate TDD. We will see responsibility driven design, "Tell don't ask", the law of Demeter, Dependency Inversion and other very key design principles and how they change the way we look into coding and testing

Published in: Design, Engineering, Software
  • The Scrambler Unlock Her Legs | 95% Off by Bobby Rio-Rob Judge? ●●● http://scamcb.com/unlockher/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Sex in your area is here: www.bit.ly/sexinarea
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • How to Grip Her Attention - Unlock Her Legs  http://scamcb.com/unlockher/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Barely Enough Design

  1. by@_md Barely Design * Enough
  2. Iworkhere Icontributehere Itweethere @_md MarcelloDuarte
  3. bigdesignmotivators principlesbehindsimplicity responsibility-drivenprocess{
  4. IT’SHARDTOCHANGELATER.
  5. WENEEDTOTHINKABOUTTHINGSBEFOREDEVELOPING.
  6. WENEEDTOMAKESUREWEDON’TMISSANYTHING.
  7. THISISJUSTTHEWAYWEDOIT.
  8. proceduralprogrammersarecomfortable withdata-drivendesign
  9. class SomethingPeopleCallEntity { public function getABitOfThis() { return $this->aBitOfThis; } public function getABitOfThat() { return $this->aBitOfThat; } public function getABitOfTheOtherThing() { return $this->aBitOfTheOtherThing; } public function getSomeOfThis() { return $this->someOfThis; } public function getSomeOfThat() { return $this->someOfThat; } public function getSomeOfTheOtherThing() { return $this->someOfTheOtherThing; }
  10. demeter For all classes C, and for all methods M attached to C, all objects to which M sends a message must be instances of classes
 associated with the following classes: 1.The argument classes of M (including C.) 2.The instance variable classes of C.
  11. $this->person->getCar()->getEngine()->ignite();
  12. leadsustonamingafterstructure
 fragility viscosity disregardtoencapsulation{ data-driven
  13. onlytalktoimmediatefriends demeter
  14. minimisetheinteractionbetweenobjects tell don’t ask
  15. $this->person->startCar();
  16. putthebehaviourwherethedatais tell don’t ask
  17. simplicity
  18. “Getitdoneintenminutesandmoveon.Savethebig sortimplementationforwhenthegoldownersdecide thesystemistooslow. Encapsulationwillsaveyou.” Ron Jeffries simplicity
  19. abstraction |əәbˈstrakʃ(əә)n| noun [ mass noun ] 1 the quality of dealing with ideas rather than events: topics will vary in degrees of abstraction. • [ count noun ] something which exists only as an idea: the question can no longer be treated as an academic abstraction. 2 freedom from full representation in art:geometric abstraction has been a mainstay in her work.
  20. class TestRunner { public function __construct(ProgressFormatter $formatter) { $this->progressFormatter = $formatter; } public function run(Test $test) { try { $test->run(); $this->progressFormatter->markPass(); } catch (Exception $e) { $this->progressFormatter->markFail($e); } } }
  21. “Customersknow! Conferenceroomwithevillittleminds:muahaha!” Uncle Bob change
  22. WENEEDANYANCATFORMATTERNOW!
  23. class NyanCatFormatter extends ProgressFormatter { }
  24. http://mmw-blog.blogspot.co.uk/2010/07/happy-women-joyful-freedom-happiness.html
  25. class TestRunner { public function __construct(Formatter $formatter) { $this->formatter = $formatter; } public function run(Test $test) { try { $test->run(); $this->formatter->markPass(); } catch (Exception $e) { $this->formatter->markFail($e); } } }
  26. class NyanCat implements Formatter { }
  27. abstractrolesthatcanchange
  28. «interface» Formatter + markPass() + markFail() interface=role+responsibilities
  29. messaging
  30. «interface» Formatter + markPass() + markFail() Test Runner + run(:Test) Progress NyanCat …
  31. whendowedecidetoaddanabstraction
  32. "Makethecommitmentatthelast
 responsiblemoment" Preston Smith decide later
  33. designsoyoucancommitlater
  34. fabric
  35. objects values { concepts
  36. identity state behaviour {objects
  37. entitieshaveidentitiesandstate
 whynotusetheminyouOOdesign?
  38. process
  39. “ThefullbenefitofOOcanonlyberealizedif encapsulationismaximisedduringthedesignprocess.
 
 RDDspecifiesobjectbehaviourbeforeobjectstructure andotherimplementationconsiderationsaremade.” Rebecca Wirfs-Brock responsibilities
  40. “Wehavefoundthatthemosteffectivewayofteaching theidiomaticwayofthinkingwithobjectsistoimmerse thelearnerinthe"object-ness"ofthematerial.” Ward Cunningham CRC
  41. identifyscenarios listresponsibilities identifyroles,values dreamtheboundaries { CRC
  42. CRC
  43. Course Students LessonsEnrol students Display outline/info Keep track of vacancies CRC
  44. “Knowinadvancewhereyouaregoingtoputcertain behaviours. […]Inshort,beforeyouwriteyourfirst test,youhavetodreamupthe[boundaries]thatyou wishyouhad.” Uncle Bob boundaries
  45. Dependency Inversion Principle [Martin 02] Behaviour Collaborator Collaborator Role Role
  46. class CompetencyFinder { private $learner; private $finder; public function __construct(Learner $learner, CompetencyDictionaryFinder $finder) { $this->learner = $learner; $this->finder = $finder; } public function findDictionary() { return $this->finder->findByLearnerRole($this->learner->getLearnerRole()); } }
  47. interface CompetencyDictionaryFinder { /** * Gets the dictionary for a particular role * * @param LearnerRole $role * @return InviqaLearningCompetencyDictionary */ public function findByLearnerRole(LearnerRole $role); }
  48. /** * @Route(service="controllers.skills") */ class SkillsController { private $competencyFinder; private $raterFinder; public function __construct(CompetencyFinder $competencyFinder) { $this->competencyFinder = $competencyFinder; } /** * @Route("/skills", name="skills") * @Template() * Show the skill for the learners role */ public function indexAction() { return ['competencies' => $this->competencyFinder->findDictionary()]; } }
  49. class Skill { private $skillChanges; public static function rate($skill, Learner $learner, Rating $rating) { $skillChange = new SkillChangeEvent($skill, $learner, $rating); $skill = new Skill(); $skill->skillChanges[] = $skillChange; } public function getSkillChanges() { return $skill->skillChanges; } }
  50. tdd
  51. usescenariosandexamples tobuildyourdomain
  52. considerinvertingdependencies
 aroundtheboundaries
  53. firstlearndesign thentest-drivendesign
  54. usetherighttoolsfortherightjob
  55. concluding
  56. bigdesignmotivators principlesbehindsimplicity responsibility-drivenprocess learndesignthenTDD{
  57. Iworkhere Icontributehere Itweethere @_md MarcelloDuarte
  58. Thankyou joind.in/13373
  59. Credits http://earthymoon.deviantart.com/art/Elephant-png-122633500 http://mmw-blog.blogspot.co.uk/2010/07/happy-women-joyful- freedom-happiness.html

×