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.

CURIOUS. ??

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.

  1. 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.)
  2. Controller based on request sent by user, asks for information regarding that request to the Model.
    (MODEL: Model is responsible to perform the logical operations, including database operations and is the crux part of M.V.C. Model can be written in multi language based on web-application requirement. But here we will be using JavaScript and the ExpressJS.)

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.

--

--

I love to build,innovate and write about software from its scalability to its design. Also passsionate about Dev-Advocacy. DMs open: twitter.com/imabptweets

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abir (@imabptweets)

Abir (@imabptweets)

57 Followers

I love to build,innovate and write about software from its scalability to its design. Also passsionate about Dev-Advocacy. DMs open: twitter.com/imabptweets