Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Ruby really have design issues that the design patterns solve?

I recently started digging into design patterns. Generally speaking, I thought the design issues that most of the design patterns solve do not generally occur in Ruby. Most of the design issues were because of datatypes (No dynamic typing and arrays can hold objects belonging to same class at a time etc. and many more.). Being a ruby and ruby on rails developer, I realized that absence of concepts of interfaces, abstract classes, references, pointers etc and presence of concepts like modules, dynamic typing, array with objects of any class together, features like eval really makes life easier for the developers. I also went through the book by Russ Olsen. I however, thought that the book tried to simulate design patterns instead of actually implementing them, reason being, the design issues just do no generally occur in Ruby. Is it that, the Ruby programming language has evolved with time and takes care of the design issues internally making developers concentrate just on the business logic more?

I would like to know views of other Ruby developers on this. Thanks.

like image 867
Chirantan Avatar asked Nov 17 '25 13:11

Chirantan


2 Answers

In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design.. Naturally, the problems that commonly occur vary from language to language and system to system. Ruby may indeed solve some of the problems which occur in other languages but it will have commonly occurring problems of its own.

like image 175
Joe Soul-bringer Avatar answered Nov 19 '25 04:11

Joe Soul-bringer


Considering that the MVC and ActiveRecord Ruby on Rails' core, you've picked a poor example for arguing that design patterns are missing language features.

like image 37
Sean McSomething Avatar answered Nov 19 '25 04:11

Sean McSomething



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!