abstract art
play

ABSTRACT ART GETTING ABSTRACTION JUST RIGHT Presented by Jeremy - PowerPoint PPT Presentation

ABSTRACT ART GETTING ABSTRACTION JUST RIGHT Presented by Jeremy Clark www.jeremybytes.com A Good Design is like A Piece of Art Geek & Poke http://goo.gl/ifd53l @jeremybytes ABSTRACTION IS AWESOME! Maintain Test Extend


  1. ABSTRACT ART GETTING ABSTRACTION “JUST RIGHT” Presented by Jeremy Clark www.jeremybytes.com

  2. A Good Design is like A Piece of Art Geek & Poke – http://goo.gl/ifd53l @jeremybytes

  3. ABSTRACTION IS AWESOME! Maintain Test Extend @jeremybytes

  4. ABSTRACTION IS AWFUL! Debugging Complexity Confusion Difficulty Frustration @jeremybytes

  5. https://archive.org/details/goldilocks_and_the_three_bears

  6. GOLDILOCKS THE DEVELOPER Too Little Too Much Just Right Abstraction Abstraction @jeremybytes

  7. TWO TYPES OF DEVELOPERS Over-Abstractor Under-Abstractor @jeremybytes

  8. Over-Abstractor •“We’ll have a good use for this in the future.” • Overly Complex • Difficult to Maintain @jeremybytes

  9. A Good Architect Leaves A Footprint Geek & Poke: http://goo.gl/B4uXa3 @jeremybytes

  10. Under-Abstractor • “Let’s keep things simple.” • Rigid • Difficult to Maintain @jeremybytes

  11. COMMON PROBLEM Over-Abstractor •“We’ll have a good use for this in the future.” • Overly Complex • Difficult to Maintain Under-Abstractor •“Let’s keep things simple.” • Rigid • Difficult to Maintain @jeremybytes

  12. The Default State Quiz Who Are You?

  13. Let’s build a plug - in architecture… Maybe we Awesome! should look at Let’s do it. compile-time options.

  14. We need to share a value between modules… I’ll create an Let’s use a object state global variable. manager.

  15. How should we do the UI? Here’s a new Let’s use the JavaScript same framework framework. we did last time.

  16. Pull data from a database… SELECT * ORMs are FROM Customers awesome! WHERE ID = [@id]

  17. We need an object instance… var logger = var logger = DIContainer new FileLogger() .Resolve<ILogger>()

  18. Neither answer is right or wrong. The correct response is “It depends.” — Jeremy’s Standard Response

  19. Let’s build a plug - in architecture… Maybe we Awesome! should look at Let’s do it. compile-time options.

  20. We need to share a value between modules… I’ll create an Let’s use a object state global variable. manager.

  21. How should we do the UI? Here’s a new Let’s use the JavaScript same framework framework. we did last time.

  22. Pull data from a database… SELECT * ORMs are FROM Customers awesome! WHERE ID = [@id]

  23. We need an object instance… var logger = var logger = DIContainer new FileLogger() .Resolve<ILogger>()

  24. BE HONEST WITH YOURSELF Too Little Too Much Just Right Abstraction Abstraction @jeremybytes

  25. WHO AM I? Under-Abstractor • Hello. My name is Jeremy, and I’m an Under -Abstractor. “Keep Things Obvious” “Don’t Be Tricky”

  26. REPORTING APPLICATION

  27. THE PENDULUM EFFECT Under- Over- Just Right Abstraction Abstraction

  28. THOSE AROUND YOU Over-Abstractor • Jeff loved to build components. • He liked to create code for re-use. • He thought of all possible scenarios.

  29. A SYMBIOTIC RELATIONSHIP The The Over-Abstractor Under-Abstractor helps the helps the Under-Abstractor Over-Abstractor get things get things Just Right Just Right

  30. Environment Team Self Know Your… Business Tools Infrastructure

  31. THE PENDULUM EFFECT Under- Over- Just Right Abstraction Abstraction @jeremybytes

  32. VARIOUS DATA SOURCES Microsoft SQL Server MongoDB SOAP Service CSV WebAPI Amazon AWS Oracle Hadoop JSON Microsoft Azure @jeremybytes

  33. PLUGGABLE REPOSITORIES Service Repository CSV File Application Repository SQL Database Repository @jeremybytes

  34. @jeremybytes

  35. DRY • Don’t Repeat Yourself Under-Abstractor @jeremybytes

  36. DON’T REPEAT YOURSELF Consolidate Avoid Similar Copy/Paste Code Spaghetti Copy/Pasta Code @jeremybytes

  37. SoC • Separation of Concerns Under-Abstractor @jeremybytes

  38. SINGLE RESPONSIBILITY PRINCIPLE Complements The “S” in Separation of S.O.L.I.D. Concerns A class should A class should have only one do one thing reason to (and do it well) change @jeremybytes

  39. YAGNI • You Ain’t Gonna Need It • (You Aren’t Going to Need It) Over-Abstractor @jeremybytes

  40. MORAL OF YAGNI • Code for the features you have now • Add abstraction as you need it • Don’t add abstraction based on speculation We still think about the future, but we don’t implement it yet. @jeremybytes

  41. KISS • Keep It Simple, Stupid • (Keep It Short & Simple) • (Keep It Simple & Straightfoward) Over-Abstractor @jeremybytes

  42. DDIY • Don’t Do It Yourself Over-Abstractor Under-Abstractor @jeremybytes

  43. DDIY Over-Abstractor • Over-Abstractors like to build things to solve specific problems Under-Abstractor • Under-Abstractors shy away from external frameworks and libraries @jeremybytes

  44. EXAMPLES Dependency Injection • Unity, MEF, Ninject, Autofac, StructureMap, Spring.NET Unit Testing Framework • MSTest, NUnit, TypeMock Isolator, xUnit.net, Approval Tests Mocking • Moq, NSubstitute, RhinoMocks, FakeItEasy, JustMock Logging • log4net, Semantic Logging Application Block (SLAB) UI Framework • Prism, Angular, React @jeremybytes

  45. ABSTRACTION IS AWESOME & AWFUL Maintain Extend Test Debugging Complexity Confusion Difficulty @jeremybytes

  46. THE GOLDILOCKS PRINCIPLE Too Little Too Much Just Right Abstraction Abstraction @jeremybytes

  47. GETTING THINGS RIGHT DRY SoC YAGNI •Don’t Repeat • Separation of • You Ain’t Yourself Concerns Gonna Need It KISS DDIY • Keep It Short & •Don’t Do It Simple Yourself @jeremybytes

  48. THANK YOU! Jeremy Clark • http://www.jeremybytes.com • jeremy@jeremybytes.com • @jeremybytes @jeremybytes

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