Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you identify a design pattern when reading source code? [closed]

Is there way to better identify design pattern in source codes, esp. if you are not familiar with all of the patterns? What's the best way to identify them?

like image 788
jasonline Avatar asked Mar 04 '10 01:03

jasonline


People also ask

What are design patterns in code?

In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.

What are the 3 types of patterns?

Three Types of Design Patterns (Behavioral, Creational, Structural) Distinguish between Behavioral, Creational, and Structural Design Patterns.


1 Answers

What do you mean? You identify them by knowing them, and then seeing the signs of one, and putting the pieces together.

Sometimes the name is indicative, FooFactory, etc.

There's no "magic". I don't quite understand the point of this question ...

like image 157
Noon Silk Avatar answered Oct 23 '22 02:10

Noon Silk