What Is M.V.C ?
Hey, whats M.V.C?
Just another way to make you more cool with web-app/software production.
Lets understand M.V.C with a daily life example-YouTube, you read right, YouTube.
What am I exactly doing ??
Searching Cats and Dogs on YouTube. Well, not exactly.
So here I see..
Side Bars and Menu bars remains as it is.
Just the Space where Video lists are shown, gets changed based on user search.
Is it Common???
You may say, yes!
But what you think, YouTube has written code for every such search result page.
No, that’s not possible.
More Curious, How did they do it??
You will be amazed, getting to know that, they have written the code for the web page only once. And rest is the magic of M.V.C .
Want this Superpower ???
If that sounds interesting.
Connect here: Linkedin
Working Of M.V.C
First of all, Instead of going directly into jargon, lets see what happens when a user search for a query on YouTube.
Lets Demystify M.V.C.
View, in layman terms, is what user sees on the screen.
In technical jargon, we can say it is the data sent by controller to render the user interface.
- User searches a query on YouTube Within speed of light, (if you have good connectivity ;D ) the request is sent to Controller. Hey Pause…
(Controller: In layman’s term, is the middle man between Model and View and is responsible for requesting information and send the response from Model to View. Controller doesn’t perform any logical data operation, it is a medium for communicating between model and view.)
- Controller based on request sent by user, asks for information regarding that request to the Model.
User Searches an item and the request is sent to controller, and controller requests information to model, and receives the information, and the controller sends the data to view which displays the final result to the user.
Coming Soon, with a new video on implementing M.V.C using expressJS…
Till then, gotsome wonderful resource to learn more.
Express "Hello World" example
Embedded below is essentially the simplest Express app you can create. It is a single file app - not what you'd get if…
What is MVC, and how is it like a sandwich shop?
by Adam Wattis What is MVC, and how is it like a sandwich shop? In today's Internet, websites tend to be interactive…
If any mistakes in grammar, please forgive, this is first article of mine. Will Improve the next time.