I really loved @adambray's corporate analogy for MVC, as I don't think how the system worked really clicked for me until he explained it this way to me, so I thought I'd try my hand at writing it out and doing a little walkthrough: https://gist.github.com/starrchen/a3afa1f89cde1b807480
Unfortunately, I went way over my timebox -- as per usual -- and wasn't able to design starter code for an app that a reader could clone down and create to learn MVC. :disappointed:
I would really love feedback just as far as if my explanations and analogy interpretation are right? (Seeing as how that's kind of the whole point of the post... it'd be nice to know that I don't have MVC totally wrong... :cold_sweat:)
I also really got pressed for time this break and was not able to get JekyllRB running on my personal domain, but ideally, this post would end up there eventually. (Have been struggling to get that personal domain up and running for about 2 years now but we'll get there.)
ALSO also, really sorry about how crude my altered MVC flowchart is. I had no idea what Mac users usually use for image manipulation, so I cobbled this together on PicMonkey and it was torturous.
(P.S. @adambray - I wasn't sure how you might best like to be attributed on here? I included your GA instructor profile for now, but please let me know if you'd prefer something different. :smile: )
That was so fun to read. You got the MVC process down. Included some suggestions below but keep this up, and let me know when you make another post - would be happy to read.
Is there anything else Connie can do to demonstrate that she represents the controller? She does more than just instruct the Model, right? How does Connie know what instructions to pass onto Monica?
Might be worth talking about what exactly a model is, what it represents and how it knows what to pull from the database.
Wouldn't hurt to show some router code and talk about how exactly it processes an HTTP request. Don't need to go too deep into the anatomy of an HTTP request, but an example route might help the reader understand what's going on.
I really loved @adambray's corporate analogy for MVC, as I don't think how the system worked really clicked for me until he explained it this way to me, so I thought I'd try my hand at writing it out and doing a little walkthrough: https://gist.github.com/starrchen/a3afa1f89cde1b807480
(It is also available on Medium.)
Unfortunately, I went way over my timebox -- as per usual -- and wasn't able to design starter code for an app that a reader could clone down and create to learn MVC. :disappointed:
I would really love feedback just as far as if my explanations and analogy interpretation are right? (Seeing as how that's kind of the whole point of the post... it'd be nice to know that I don't have MVC totally wrong... :cold_sweat:)
I also really got pressed for time this break and was not able to get JekyllRB running on my personal domain, but ideally, this post would end up there eventually. (Have been struggling to get that personal domain up and running for about 2 years now but we'll get there.)
ALSO also, really sorry about how crude my altered MVC flowchart is. I had no idea what Mac users usually use for image manipulation, so I cobbled this together on PicMonkey and it was torturous.
(P.S. @adambray - I wasn't sure how you might best like to be attributed on here? I included your GA instructor profile for now, but please let me know if you'd prefer something different. :smile: )