Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Did I miss the reference to the DB in the video? I have watched it twice and didn't hear any DB reference.
I am possibly missing something here but I didn't hear any mention of a DB in the video. I have notes that the Model notifies the controller & view of status changes - is the controller the DB in this question?
Ken AlgerTreehouse Teacher
Great question. The MVC (Model-View-Controller) model can initially be a little challenging to grasp where all of the pieces fit. Here is how I have come to terms with the responsibilities of each piece.
The Model directly manages the data, rules, and logic of the application. This would be where the database falls into place.
The View is what the end user sees, the data represented as viewable output.
The Controller accepts input and then converts those commands for the View or the Model to act upon those commands.
Perhaps this diagram will help:
Does that help at all? Very high level of MVC, but by keeping in mind what and where things are done, it can help to make sure code goes into the right spot.
Thank you! That should help - I've copied this and will keep it as a reference.