Remember Me
forgot your password?

Mvc Design Pattern

MVC Design Pattern

MVC Design Pattern

 

Model-view-controller

 

Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (View) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface. The model-view-controller solves this problem by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller.

 

Pattern description

 

It is common to split an application into separate layers: presentation (UI), domain, and data access. In MVC the presentation layer is further separated into view and controller. MVC encompasses more of the architecture of an application than is typical for a design pattern.

 

Model
The domain-specific representation of the information on which the application operates. It is a common misconception that the model is another name for the domain layer. Domain logic adds meaning to raw data (e.g., calculating if today is the user’s birthday, or the totals, taxes and shipping charges for shopping cart items).
Many applications use a persistent storage mechanism (such as a database) to store data. MVC does not specifically mention the data access layer because it is understood to be underneath or encapsulated by the Model.
View
Renders the model into a form suitable for interaction, typically a user interface element.
Controller
Processes and responds to events, typically user actions, and may invoke changes on the model.

 

MVC is often seen in web applications, where the view is the actual HTML page, and the controller is the code which gathers dynamic data and generates the content within the HTML. Finally the model is represented by the actual content, usually stored in a database or XML files.

 

Though MVC comes in different flavors, control flow generally works as follows:

 

1. The user interacts with the user interface in some way (e.g., user presses a button)
2. A controller handles the input event from the user interface, often via a registered handler or callback.
3. The controller accesses the model, possibly updating it in a way appropriate to the user’s action (e.g., controller updates user’s shopping cart).
4. A view uses the model to generate an appropriate user interface (e.g., view produces a screen listing the shopping cart contents). The view gets its own data from the model. The model has no direct knowledge of the view.
5. The user interface waits for further user interactions, which begins the cycle anew.

TuVinhSoft .,JSC

TuVinhSoft - Software Development Company from Vietnam provides Offshore software development, Software Outsourcing, Staff augmentation, Application Software Development, Web Design and Development, Business Process Outsourcing, Search Engine Optimization to USA, UK, Japan etc.

Rate this Article: 5 / 5 stars - 1 vote(s)
Print Email Re-Publish

Add new Comment



Captcha

  • Latest Programming Articles
  • More from TuVinhSoft .,JSC

Create website using PHP as Scripting Language

By: Rightway Solution | 16/11/2009
Eager to know who’s the brain behind this big-bang theory in the development world? He’s Rasmus Lerdorf the developer utilized the first version to run his own home page, while his collection of Practical Extraction and Report Language (Perl) code snippets created by him in 1994 were named Personal Home Page (PHP).

iPhone Web Applications for Pure Fun

By: Arun Kumar | 16/11/2009
Every time Apple launches something, it releases enough gust telling consumers about its unending possibilities. With the launch of the high-end mobile cum entertainment gadget called the iPhone, Apple has proved once again what it takes to be the ruler leading the roost. The Apple iPhone is surely a gadget for the new generation. It’s a device that comes equipped with a plethora of communication as well as utility and fun features.

Packt Publishing's new 'Ext JS 3.0 Cookbook'

By: Amit Sharma | 13/11/2009
Authored by Jorge Ramon, the Ext JS 3.0 Cookbook contains step-by-step recipes for building impressive rich internet applications using the Ext JS JavaScript library.

GROUP BY IN XQUERY

By: Anuj Tripathi | 13/11/2009
This article will provide you to implement GROUP BY clause in XQUERY with the code.

Java Developers and the power of Java

By: jacklin | 13/11/2009
Article explaining the security steps Java developers can take for JAR files while developing application with Java platform.

Sending SMS Alerts in SharePoint 2010 over Office Mobile Service Protocol (OMS)

By: Virtosoftware | 12/11/2009
Finally it's possible to send SMS directly from SharePoint to mobile phones. This feature was only available in some add-on components before.

Forbidding the Clipboard for the specified process

By: Apriorit Inc. | 11/11/2009
Though the Clipboard is one of the fundamental parts of the Windows operating system, there is little information about how it works, especially in the low level. In this article, I’m going to tell you something about the Clipboard internals by showing how you can forbid access to it.

LAMP Application Development Vietnam

By: TuVinhSoft .,JSC | 22/10/2009 | Outsourcing
TuVinhSoft provides offshore development and Outsourcing services based on several years of experience in executing projects based on Linux, Apache, MySQL and PHP (LAMP) technologies.

What Should Your Outsourcing Vendor Provide You?

By: TuVinhSoft .,JSC | 18/10/2009 | Outsourcing
A lot has been said about the global economic meltdown and its impact on the offshore outsourcing industry. And it is the time to look forward to economic recovery now. And businesses are just gearing up for that. However, cost cutting remains to be a prime strategy employed by companies in order to make sure they remain in a key position in the market.

Web 2.0 Development in Vietnam

By: TuVinhSoft .,JSC | 15/07/2009 | Web Design
Web 2.0 standards are being accepted across the globe to facilitate creativity, information sharing, collaboration among web users in the World Wide Web technology and web design. Web 2.0 has lead to the concept of new generation for web oriented communities like social-networking sites, Wikis, Blogs, and folksonomies.

Offshore Outsourcing Development in Vietnam

By: TuVinhSoft .,JSC | 03/07/2009 | Outsourcing
If you share the world opinion that Vietnam is the outsourcing hot spot we will prove it to you. Ours becomes an extension to your office via the internet and E-mail. Your offshore project world seem to be happening right outside of your cabin.

The best software development center and software outsourcing in Vietnam

By: TuVinhSoft .,JSC | 30/05/2009 | Outsourcing
An offshore development center(ODC) offers clients enormous benefits. ODCs consist of a dedicated pool of software professionals who form a virtual extension of the client's team. ODC (http://www.tuvinh.com ) offer the best of both worlds - the benefits of one's own team without the difficulties of managing it. In addition, offshore development centers enables clients to scale up their teams, in terms of numbers or skill sets.

Acl and Phpgacl

By: TuVinhSoft .,JSC | 02/02/2009 | Programming
What is an Access Control List: An Access Control List (ACL) is a system that can be used to control access to specified resources. In this context we are mainly concerned with resources such as Web pages, application classes and sections, for example administrators or members sections of a Web application.

Mvc Design Pattern

By: TuVinhSoft .,JSC | 14/11/2008 | Programming
Model-view-controller (MVC) is an architectural pattern used in software engineering. In complex computer applications that present a large amount of data to the user, a developer often wishes to separate data (model) and user interface (View) concerns, so that changes to the user interface will not affect data handling, and that the data can be reorganized without changing the user interface.

Submit Your Articles Free: Signup
Article Categories




Use of this web site constitutes acceptance of the Terms Of Use and Privacy Policy | User published content is licensed under a Creative Commons License.
Copyright © 2005-2008 Free Articles by ArticlesBase.com, All rights reserved. (0.05, 1, w1)