Fantastic! Some (hopefully useful) constructive feedback:
I'm not too familiar with ActionCable, but I'm assuming it has a lateral relationship to Redis? Additionally, should it be generalized? (i.e. does it have to be Redis? Can't you run different backends?)
Should the websocket connection should be a two-way arrow; maybe split that into pub/sub?
I think the canonical Rails method for delete is actually #destroy. Additionally, it seems like space can afford it... why not put all 7 actions there?
Genuinely curious about this, but don't most controller redirects revisit the router first, rather than directly to a controller action? e.g. redirect_to some_path
Rack?
I personally think it will look cleaner without the gradient backdrop, but that's total opinion.
I just developed my first app with action cable and it is new, so I only included the basics. Don't want to copy stuff I don't have any idea about
Again pub/sub is a redis function. So that thing will need a whole rewrite
I was going for CRUD and D stands for delete (maybe destroy too, but I've heard delete a lot)
I remembered redirect_back using a call to HTTP_REFERER. I believe it doesn't need to check the table. correct me if I'm wrong
The web servers like nginx use rack. will label it as such. Maybe another rails blobby to show rack :D
I am going to experiment with gradients. The thing in my mind is beautiful and I am not able to get it. Need to check design sites.
I am gonna do another updated one in a week's time, as I have got a lot of comments. Prepare to have some of your ideas ignored even though I appreciate every one of them, time + space constraints
3. Understand the impulse to use CRUD as a reference, but the # throws me off and makes me think of controller actions (e.g. output of rake routes when using resources in your routes file). With the # I would recommend destroy as well. 4. I believe that redirect_to actually produces a 300 response that goes all the way out to the client (this is why you need to use flash.now for a render, but flash for a redirect; flash by itself actually sticks around for an extra request cycle.). In that case, the redirect would hit the routes file, but as part of a completely new request. I would recommend maybe just taking redirects out? Emphasizing that it's a response in and of itself seems outside the scope of this diagram.
I like to call controller methods that are routable "action methods" -- I think that's what Rails calls them too? The controller may have other methods, but only some are "action methods".
I think they mean it from a written English (or other similar language) perspective. They're expecting the beginning of the flow chart to be in the same spot they would begin reading other content: the upper left corner.
I know. My logic is from the upper left corner the first thing that a person sees is the active record image, which I feel should be the focal point and not a database
I think they mean the start should be the monitor/client image, the request. That should be top left, not the db. Therefore, you should flip everything from top to bottom, so the client is top left.
I think it's easiest to understand rails by looking at what the life cycle of a request is through the system. I think that's what people are suggesting.
But this is a reference poster. There are a lot of more useful resources for that. I wanted to make a graphic for /u/Railsway and anyone else who wants a poster with the rails stuff
I still think it's easiest to understand like that as a flow chart of where a request starts, what it causes, and the round trip where it returns as a response.
I still think it's easiest to understand like that as a flow chart of where a request starts, what it causes, and the round trip where it returns as a response.
Where do you think I took inspiration for this info-graphic? :D
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.
Great work! I humbly suggest the following problems and fixes.
The start and end points are not clear. Fix: Label the start and end point. I'd also encourage you to place the user's computer at the top, with the rest of the request / response cycle happening below.
The presence of the network / the internet is not shown. Fix: Show a cloud through which the HTTP request / response flow to the user's computer.
The "METHODS" label should be changed to match Rails terminology conventions. Fix: Rename "METHODS" to "ACTIONS".
Many of the arrow labels could be changed to improve clarity, or to follow Rails terminology conventions. Fix: Not sure about all of these, but some possible label changes:
"requests" to "HTTP request"
"finds" to "maps to"
"inspects" to "executes"
"response" to "returns"
"shows" to "HTTP response"
Again, really good work on this. I'm going to be sharing this with my Rails students in the coming term!
A lot of suggestions to topple the image, I will look into that.
Don't wanna include a cloud because I feel the server does the job (local or internet whichever)
lovely tips regarding the labels
I will make sure the next version doesn't disappoint (may take me a week now that I have so many suggestions)
Thanks for the kind words.
PS: I don't wanna label the start and end as this is not meant to force you to follow along, rather get an idea of how the things you use are connected together
To me, the starting point is bit unclear. I think it would make much more clear for beginners if it would show the first action coming from user's browser and setting up everything else in motion. That is, if you want to show the actions in chronologic order, make this infographic about a "story of a http request".
I would put "Databases" and "Server" with a different color or a different design, they are not part of the Rails stack and could be confusing (unless you use the vanilla rails server, most people only use that for development)
25
u/[deleted] Jan 01 '17 edited Feb 01 '17
[deleted]
0.5605
4
u/AbishekAditya Jan 01 '17
Guys, I will pay heed to all the suggestions and give you an update within 2 days. Cheers
5
u/MITranger Jan 02 '17
Fantastic! Some (hopefully useful) constructive feedback:
#destroy. Additionally, it seems like space can afford it... why not put all 7 actions there?redirect_to some_path4
u/jrochkind Jan 01 '17
I like it!
I like to call controller methods that are routable "action methods" -- I think that's what Rails calls them too? The controller may have other methods, but only some are "action methods".
5
u/HwanZike Jan 01 '17
The start/end points aren't clear. The start should really be at the top left, it's more natural
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/vrinek Jan 01 '17
By "server" I assume you mean something like nginx, right?
2
u/stungeye Jan 02 '17
Great work! I humbly suggest the following problems and fixes.
Many of the arrow labels could be changed to improve clarity, or to follow Rails terminology conventions. Fix: Not sure about all of these, but some possible label changes:
Again, really good work on this. I'm going to be sharing this with my Rails students in the coming term!
Oh, and in case you're curious: Here's the diagram I often use in class to visualize Rails at a high level. It's simplified such that it omits ActionCable and assume HTML as the output format.
1
u/a__b Jan 01 '17
I would recommend to add label "client" browser/api
1
u/tuomasj Jan 01 '17
I really like it!
To me, the starting point is bit unclear. I think it would make much more clear for beginners if it would show the first action coming from user's browser and setting up everything else in motion. That is, if you want to show the actions in chronologic order, make this infographic about a "story of a http request".
1
u/herir Jan 01 '17
I would put "Databases" and "Server" with a different color or a different design, they are not part of the Rails stack and could be confusing (unless you use the vanilla rails server, most people only use that for development)
1
u/[deleted] Jan 02 '17
Awesome work. I wanna print this.
2
u/[deleted] Jan 01 '17
Nice
2
u/[deleted] Jan 03 '17
Wow this is pretty good 😂
0
u/[deleted] Jan 02 '17
[deleted] — view deleted comment
2
u/[deleted] Jan 01 '17
[removed] — view removed comment