O'Reilly logo

Test-Driven Development with Mockito by Sujoy Acharya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Design patterns

Design patterns are lessons learnt over the years. A pattern is a solution to the recurring problems. Every pattern has four parts:

  • Name: It is the common vocabulary. By using a name, we can describe a problem, its solution, and consequences.
  • Problem: It tells us when to apply the pattern.
  • Solution: It shows us how the problem is resolved.
  • Consequences: It shows us the results and trade-offs of applying the pattern. This is the most important part of a pattern, and is critical for making the design decision. For example, if a problem can be solved using either pattern A or pattern B, how would you select the one you need? Read the consequences of applying pattern A and B and then choose the one that suits your need.

Classification of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required