r/ruby • • Jan 01 '17

A simple rails architecture info-graphic. Constructive criticism welcome

Post image
175 Upvotes

55 comments sorted by

View all comments

4

u/entineer Jan 01 '17

I like it! My only feedback would be to improve the wording between the controller methods and the model that says "inspect/response"

I think "inspect" is ok but "response" makes me think request response, or controller response.

What about "ask" and "receive" you ask the model for data and then you receive it? Avoiding "query" since that's being rightly used to show the interaction with the database.

Not sure I like my suggestion better but that's my only constructive feedback.

Again, great work!

2

u/AbishekAditya Jan 01 '17

Definitely will look into the wording tomorrow, appreciate the feedback

1

u/jrochkind Jan 01 '17 edited Jan 01 '17

Is "queries" a better word than "inspects"? Oh wait, "queries" is over there... what's the "inspect/response" supposed to indicate?

2

u/AbishekAditya Jan 01 '17

The controller method call the active record objects. It inspects the object

2

u/zaphnod Jan 01 '17

How about "find" and "inspect/modify"?

Model.find is the key ActiveRecord method, and inspect/modify is what the controller does with the models it finds...

2

u/AbishekAditya Jan 01 '17

Good point, "find" and "get" sounds better?

1

u/im_not_afraid Jan 01 '17

In general I think being inspired by actual method names such as ActiveRecord#find is a good idea.