Visualizzazione post con etichetta miller. Mostra tutti i post
Visualizzazione post con etichetta miller. Mostra tutti i post

giovedì 15 novembre 2012

The Open/Closed Principle

Inversion of Control with the Plugin Pattern | Jeremy D. Miller: "The Open/Closed Principle   “Software entities (Classes, Modules, Functions, etc.) should be open for extension but closed for modification.”    As explained by Robert Martin here,"

Inversion of Control with the Plugin Pattern | Jeremy D. Miller

Inversion of Control with the Plugin Pattern | Jeremy D. Miller: "Inversion of Control is also known as the “Hollywood Principle” – “don’t call me, I’ll call you.”  In short, this principle applies when you create classes that are passive, i.e. they do not direct the executing flow of the code. "

The Dependency Injection Pattern

The Dependency Injection Pattern – What is it and why do I care? | Jeremy D. Miller: "In a nutshell, dependency injection just means that a given class or system is no longer responsible for instantiating their own dependencies."

Inversion of Control

What’s so great about Inversion of Control? | Jeremy D. Miller: "is an essential tool for any software designer’s design toolbox because it’s often a great way to break dependencies between classes and promote loose coupling.  IoC is vital for doing Test Driven Development without pulling out all of your hair in frustration. "

How to Learn about Patterns

Learning about Design Patterns | Jeremy D. Miller: "Write code.  Do some sort of nontrivial, personal coding project where you can freely experiment with design patterns."

Strategy pattern

Six Design Patterns to Start With | Jeremy D. Miller:
"Repeated switch statements can easily lead to duplicated code, and longish switch statements, in my experience, can lead to code that is hard to read and buggy.  Seeing a repeated switch statement on a type code is a sign that there is an abstraction in your code that’s trying to come out."

Template Method

Six Design Patterns to Start With | Jeremy D. Miller:
"I’ve learned that it’s often easier to introduce the superclass/Template Method combinations only after the second or third similar class."

Facade Pattern

Six Design Patterns to Start With | Jeremy D. Miller:
"It’s exactly what it sounds like, an attractive covering over a complex structure."