The MVC design pattern
The Model View Controller Pattern is mainly used for separating the presentation logic from the business model. This Pattern was first introduced in the Smalltalk way back in the 1970s, since then it has played an important role in most UI Frameworks. Why MVC? In Object oriented program, UI, database and other support code often gets written directly into the business object or the domain code (like business rules, policies, database manipulation etc.) and the UI code are coupled together in a single object. This practice has been followed for one simple reason, it is easier to make things work in the short run. This is a reasonable approach for quick prototyping and if the program is small in size and there is no plan for further enhancement. The problem arises when the program grows in size, it becomes more difficult to add/extend new features, the readability of the code is lost, the developer ends up writing duplicate code and it’s not easy to test the domai...