Read Blog

MVC - What and Why

MVC is a popular and widely used architectural pattern that gives variety of advantages in software development. The word MVC comes from three different words Model, View and Controller where all the codes of a software project are distributed in Model, View and Controller. Note that, developers get the main advantage of MVC since it's easier to maintain few steps of SDLC 

What is MVC?- As I was saying earlier, this a architectural pattern where all the codes of a project are kept in Model, View and Controller while coding the project. In short-

  • Model deals with data. All the codes and queries related to data retrieve or insert, update, delete are placed in Models.
  • View deals with code that user need in front of him to present. No business logic, algorithm or queries are suggested to place in Views. Only data that are needed and codes that represents those data as user expectation(e.g: html tags in web apps) are kept in a View.
  • Controller is responsible to coordinate with Model and View. All the business logics, algorithms and functions are placed in Controllers. When a user request something from View, it's handled by the Controller first. If the request needs data from the database, controller retrieves it from the database through Model and then throws it to View after necessary process. By this process user can view the response according to his/her request.

Why MVC? - If someone ask me such a question that "Why would I use MVC?", I'd rather ask him back that "Why won't I use MVC?". When a large project is planned to develop, then it's an immense need to consider about its maintenance, version controlling and future development. It's easier to adorn all the codes in accordance with the modules and even the codes can be changed easily if the project is being followed by the MVC pattern. There are few more, let's have an at a glance look-

  • With this pattern, codes are easy to adorn since all are distributed according to category. So, the coding standard can be maintained precisely.
  • It's easier to review or change all the codes when it comes to deal with requirement or version changes or future development since the codes are already distributed in Model-View-Controller.
  • It is important to modularize all the features inside when the project is large. There are cases where all the features are not important for all the users. In those cases, Model View and Controllers are created according to particular modules so that it can be easier to give or revoke features as per the user need.
  • A level of system security can be maintained by following the MVC pattern. Though there are so many things to consider for ensuring system security, MVC helps developer control access violation by restricting user from accessing Model directly from View. So data access and manipulation is bit secure here. In the meantime, database queries, all the logics and algorithms according to software features and all other codes are arrange precisely which ensures the code security.

Note: You may have heard about MVC framework. MVC is not actually a framework, rather it's a architectural pattern. When a framework is implemented by following the MVC pattern, it's often called MVC framework. For example, Laravel, Django, Spring are the MVC frameworks of php, python and java.

Image Source: Internet



  1. Ikram Ud Daula Oct 11, 2017 02:06 PM

    Sir, wonderful article on MVC. Here I have learned a lot of things. Thank you such.

  2. Shohaglive Oct 12, 2017 10:32 AM

    Thank you Ikram Ud Daula!

  3. K M Abu Hanif Oct 12, 2017 01:07 PM

    Great post. I think it will be helpful to software designer and developer. Thanks Shohag

  4. Shohaglive Oct 12, 2017 04:09 PM

    Thank you K M Abu Hanif bro!

  5. MD.MOHIUDDIN NAZMUL Oct 15, 2017 11:14 AM

    balo dosta

  6. Shohaglive Oct 15, 2017 04:53 PM


  7. Jamesmiz Aug 03, 2018 01:36 PM

    Help Jack please:

  8. FrankFag Aug 10, 2018 10:42 PM

    What do you think about it? This person is selling the secret of eternal youth:

  9. FreemanKip Sep 21, 2018 07:54 AM

    Hey. I want to share with all the great news! A month ago an anonymous source sent me 7 bitcoins of wallets that double the bitcoins you sent and send back your purses twice as much. I am familiar with blockchain technology and therefore did not believe it. But my curiosity has gone up. I sent at my own risk and 0.5 bitcoins to one of these wallets and in just 2 hours, exactly 1 bitcoin came to my wallet. I was shocked! Then I started working with these bitcoins wallets and revealed the regularity that one wallet can send 0.5 to 5 bitcoins per day from one purse. At the moment I have 350 bitcoins of wallets from which I send 350 - 700 bitcoins daily and get twice as much. For a month, I became a multimillionaire. Another month I will work and become a billionaire. I already got what I wanted, I quit my job, paid off all my debts, bought a good house and a car from the Audi RS4. Now I feel like a human being and live for my own pleasure. These are the good bitcoins of wallets I earn: 16mKn71otoYgAxij3y6MuCkWKco7MEa7Rn 18WWctFEVNhLJKcg14wmykymx3kySuyTLy 1BC2uQHHUdJzgRog7JMVE5cgWh37NCxwJc 1L2NgRwBXb5kiQ4uNDT5iKHN1As6kkt4rL 17dvrJFxoXA6dDxeGoLx3iVp7ogcbvr2nN 1CnZgLpuPhr9e5PhPEJnDS8fh8HCM5w5oz 1MaRdde6X7SGuoCdFNL2fmgpLomdx7peGC Now many people improve their financial status with these wallets but keep it a secret from everyone. I hate poverty, so I share with you all this method of earning, grab a piece of this huge and juicy cake. I will remind you once again. Send from one bitcoin your wallet strictly from 0.5 to 5 bitcoins per wallet per day, otherwise you will receive the same amount that you sent without doubling. This scheme of work is completely safe. You can work like me, create a lot of wallets and send them from each of them to the above wallets.

  10. Armandkak Oct 23, 2018 12:25 PM

    Free Dating Site for UK Singles: Free Dating Site for USA Singles: Free Dating Site for USA Singles: Online Dating Site & Dating App with 40 Million Singles: dating websites for 17 year olds ukgps dating app iphonerocker dating ukemily osment dating wdwdating brotipssouth africa best dating siteonline dating cupidbay commale dating profilemarried guys dating sitedating antique jewelryhook up dehumidifier to draindating trinidadian mandating hunter valleymarried and dating sitessda church dating sitebad online dating pick up linesdating swedish mansam dating sitetips dating someone with herpeshalo matchmaking newsdating icebreakers questionsdating a recently divorced man advicedating your ex yangki christine akitengsan e raina datingdating a short guy redditmobile dating sitedating sites ratingrevolution dating palm beach gardensbest place to go for datingdating website for iitiansdating virtual worlds onlinebest dating site in vancouverdating site criminalscraigslist dating eastbournedating as a christian single parent

Leave a comment