implementation
play

Implementation Clean Code och TDD r exempel p verktyg som vi kan - PowerPoint PPT Presentation

Vad innebr Software Craftmanship? > Vi r proffs som vill leverera kod vi kan vara stolta ver. Varfr? Drfr att vi vet att det lnar sig i lngden. Vi spenderar tex 90% av tiden med att lsa kod, 10% skriva. Implementation


  1. Vad innebär Software Craftmanship? —> Vi är proffs som vill leverera kod vi kan vara stolta över. Varför? Därför att vi vet att det lönar sig i längden. Vi spenderar tex 90% av tiden med att läsa kod, 10% skriva. Implementation Clean Code och TDD är exempel på verktyg som vi kan använda. • Software Craftmanship • Clean code • TDD • Röda tråden • Teststrategier • Design patterns • Magic tricks of testing TDD? http://blog.cleancoder.com/uncle-bob/2016/03/19/GivingUpOnTDD.html Den Röda Tråden KRAV • Vi kan välja utvecklingsmodell DESIGN • Vi kan hantera risk och vet varför behövs IMPLEMENT VISION • Vi kan skriva och estimera krav TEST • User stories, -ilities, regler DRIFTSÄTTN • Vi kan ta fram arkitekturkrav KRAV KRAV … KRAV • Vi kan ta fram arkitektur och design • Vi kan skriva Clean Code TEST TEST … TEST … TEST … KOD KOD KOD KOD … KOD KOD … DEPLOYABLE … DEPLOYABLE SYSTEM

  2. Implementation • Software Craftmanship • Clean code • TDD • Röda tråden • Teststrategier • Design patterns • Magic tricks of testing Testing http://lisacrispin.com/2011/11/08/using-the-agile-testing-quadrants/ Pyramiden Utforskande tester 5% Test Automation Pyramid UI-test (Webtest etc.) 10% Integrationstest 20% Komponenttest 50% Enhetstest 100% http://www.minecraftforum.net/forums/mapping-and-modding/ maps/1503376-insanely-enormous-multiplayer-puzzle-pyramid- v0-8

  3. Test Automation Pyramid http://watirmelon.com/tag/testing-pyramid/ http://www.agilecoachjournal.com/index.php/2014-01-28/testing-2/the-agile- testing-pyramid/attachment/agiletestingpyramid-3/ Testing • Acceptance Testing • UI Testing • Conformance Testing • Configuration Testing • Performance Testing • Load Testing • Stress Testing

  4. Implementation • Software Craftmanship • Clean code • TDD • Röda tråden • Teststrategier • Design patterns • Magic tricks of testing Designprinciper – Coupling and Cohesion – Reveal Intent - Naming – SRP: Single Responsibility Principle – DRY: Don’t Repeat Yourself Design pattern “Each pattern describes a problem that occurs over and over again in our environment, and then describes the core of the solution to that problem...” Christopher Alexander

  5. Problem/Solution/Context/Consequences) Design pattern A pattern is a solution to a problem within a certain context that has a set of predictable consequences . Ted Neward https://dzone.com/articles/reclaiming-design-patterns-20-years-later Software Design Pattern • “a general reusable solution to a commonly occurring problem within a given context” http://en.wikipedia.org/wiki/Software_design_pattern GoF – Creational • Builder, • Factory method, … – Structural • Adapter, Decorator, … – Behavioral • Iterator, Observer, … “workarounds for missing features in C++”?

  6. GoF “Design patterns provide a common vocabulary for designers to use to communicate, document, and explore design alternatives. Design patterns make a system seem less complex by letting you talk about it at a higher level of abstraction than that of a design notation or programming language. Design patterns raise the level at which you design and discuss design with your colleagues.” Creational Design pattern example SRP: Separate usage and creation! - Factory - Builder https://github.com/jonananas/teaching Separate usage from creation, example? Static Factory Method Static Factory Method is not Factory, Factory method or Abstract Factory When: Creation is a bit complex for constructor.’ Then: Create a static method that returns an instance of a class “Static factory method is simply a static method that returns an instance of a class” Effective Java by Joshua Bloch Se also: – http://stackoverflow.com/questions/929021/what-are-static-factory- methods-in-java – http://stackoverflow.com/questions/13029261/design-patterns-factory-vs- factory-method-vs-abstract-factory

  7. Builder When: Creation is a bit complex for constructor, and even static factory method; several input parameters and/or several optionals leading to multiple variations of constructors. Then: Create a fluent interface Builder that takes each parameter one by one and then returns an instance of a class in a single step. – http://en.wikipedia.org/wiki/Builder_pattern Builder – http://en.wikipedia.org/wiki/Builder_pattern Data persistence patterns SRP: Separate usage and persistence! • DAO • CRUD for one entity • Repository • CRUD* for aggregate: entity and it’s abstractions • *Not actually CRUD, but methods reflecting domain

  8. Pattern Language “A pattern language is a method of describing good design practices within a field of expertise” http://en.wikipedia.org/wiki/Pattern_language Tactical DDDesign patterns – DDD Pattern language! https://domainlanguage.com/ddd/patterns/DDD_Reference_2011-01-3 Strategic DDDesign patterns – DDD Pattern language! https://domainlanguage.com/ddd/patterns/DDD_Reference_2011-01-3

  9. Implementation • Software Craftmanship • Clean code • TDD • Röda tråden • Teststrategier • Design patterns • Magic tricks of testing The Magic Tricks of Testing

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend