A design pattern is a repeatable solution to solve common problems in a software design. When building apps with the Ruby on Rails framework, you will often face such issues, especially when working on big legacy applications where the architecture does not follow good software design principles. By Paweł Dąbrowski.
The article then explains:
- Advantages of using design patterns
- Commonly used design patterns in Rails applications
- Service
- Value object
- Presenter
- Decorator
- Builder
- Form object
- Policy object
- Query object
- Observer
- Interactor
- Null object
Any design pattern should be used with caution. When using them not correctly, we can harm our architecture and overcomplicate the code, which leads to longer development time and higher technical debt. Interesting read!
[Read More]