Skip to content

vishnuatrai/design_patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A design pattern is a reusable software solution

A design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software. Over the many years of practicing software development, experts have figured out ways of solving similar problems. These solutions have been encapsulated into design patterns. So:

patterns are proven solutions to software development problems
patterns are scalable as they usually are structured and have rules that you should follow
patterns are reusable for similar problems

SOLID is a collection of five object oriented design principles that go nicely together. Here’s a super brief summary pulled from the wikipedia page on the topic:

  • Single responsibility principle: a class should have only a single responsibility and should have only one reason to change.

  • Open/closed principle: software entities like class, module, function should be open for extension, but closed for modification.

  • Liskov substitution principle: objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program. Derived types must be completely replaceable for their base types.

  • Interface segregation principle: many client specific interfaces are better than one general purpose interface. Clients should not be forced to depend upon interfaces that they don't use.

  • Dependency inversion principle: depend upon abstractions, do not depend upon concretions. High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions

References

  1. http://sourcemaking.com

  2. http://www.questpond.com/demo.html#dp

  3. http://blog.rubybestpractices.com

  4. https://practicingruby.com

  5. http://rorandme.blogspot.in/2012/02/some-simple-design-patterns-in-ruby.html

  6. http://www.sitepoint.com/design-patterns-in-ruby-observer-singleton/

  7. http://rubylearning.com/blog/2010/11/02/how-does-one-use-design-patterns-in-ruby/

  8. http://blog.rubybestpractices.com/posts/gregory/055-issue-23-solid-design.html

  9. http://blog.rubybestpractices.com/posts/gregory/059-issue-25-creational-design-patterns.html

  10. http://blog.rubybestpractices.com/posts/gregory/060-issue-26-structural-design-patterns.html

  11. http://java.dzone.com/articles/design-patterns-uncovered-1

About

Design Patterns Ruby samples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages