Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>They are not absolutely needed, but the good definitely outweighs the bad. </p> <p><strong>The good:</strong></p> <ol> <li><strong>Code readability:</strong> They do help you write more understandable code with better names for what you are trying to accomplish. <ul> <li><strong>Code maintainability:</strong> Allows your code to be maintained easier because it is more understandable. </li> <li><strong>Communication:</strong> They help you communicate design goals amongst programmers.</li> <li><strong>Intention:</strong> They show the intent of your code instantly to someone learning the code. </li> <li><strong>Code re-use:</strong> They help you identify common solutions to common problems.</li> <li><strong>Less code:</strong> They allow you to write less code because more of your code can derive common functionality from common base classes.</li> <li><strong>Tested and sound solutions:</strong> Most of the design patterns are tested, proven and sound.</li> </ul></li> </ol> <hr> <p><strong>The bad:</strong></p> <ol> <li><strong>Extra levels of indirection:</strong> They provide an extra level of indirection and hence make the code a little more complex. <ul> <li><strong>Knowing when to use them:</strong> They are often abused and used in cases that they should not be. A simple task may not need the extra work of being solved using a design pattern.</li> <li><strong>Different interpretations:</strong> People sometimes have slightly different interpretations of design patterns. Example MVC as seen by django vs. MVC as seen by Ruby on Rails. </li> <li><strong>Singleton:</strong> Need I say more?</li> </ul></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload