
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.
About the Author
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.
Google I/O 2008 – Design Patterns in an Expressive Language
|
|
Vinyl Wall Art Decal Sticker Swirl Flower Floral Design #262 (100 X 29) $34.95 This Vinyl Wall Decal comes with: (3 sets of flower patterns) 30″H x 29″W, 11″H x 40″W, & 21″ H x 29″W. –100″ x 29″ Big When position together along top of ceiling corners.– The newest interior design trend is adding vinyl art on interior walls. It’s easier than hiring an artist and a lot cheaper. The smaller pieces can be put up within minutes. The larger pieces takes a little longer. The decal… |
|
|
Milescraft 1298 3D-Pantograph Router Stencil Tracing Jig $39.48 The 3D-Pantograph from Milescraft is a stencil tracing jig for routers that allows you to carve nearly anything you can imagine. Use the included templates and line drawings (yields carved letters and drawings from 3.2-inches to 4.8-inches), or trace anything that you can print with your computer. We find that childrens coloring books provide a great source of ideas and line drawings. Universal de… |
|
|
Pantone CAPSURE Color Matcher $519.98 Created for professionals in fashion, home, and graphic design, as well as for contractors, paint retailers, and do-it-yourselfers, the PANTONE CAPSURE saves you time and money by capturing a color from any material and instantly matching it to PANTONE colors in less than three seconds. CAPSURE can match multiple colors from smaller and intricate patterns, as well as from a variety of surfaces. Ac… |
|
|
Energizer XP1000 Universal Rechargeable Power Pack with 1000 mAh Black $14.99 1000 MAHRECHARGEABLE POWER PACK FOR CELLULAR PHONES SMART PHONES IPOD & MP3 PLAYERSUP TO 6 HOURS OF BATTERY LIFEDIM: 3.3″L X 2.1″W X .28″HWEIGHT: .08 LBSUPC : 851621002122Shipping Dimensions : 6.70in X 4.20in X 1.50inEstimated Shipping Weight : 0.2543… |
|
|
Clarion Mobile Electronics FZ501 – Bluetooth USB Receiver $139.99 Clarion’s FZ501 is a mechless digital media receiver receiver packed full of connectivity options, with a unique single multi-way controller, direct iPod/iPhone control, front USB and AUX with sliding cover, and built-in Bluetooth for hands-free operation and audio streaming. It also offers room to grow, with two pairs of 2V preamp outputs on top of its 50W x 4 MOSFET amplifier, and the ability … |
|
|
Contour Wearable Camcorder (Black) $299.99 Wear it, Shoot it, Share it… Think the world doesn’t need more video? Wrong, it needs YOUR video, and VholdR (vee-holder) is the go-anywhere do-anything wearable camcorder that SHOOTS your life in motion. you can SHARE it with an entire world of action life stylists just like you. VholdR mounts to nearly anything, from helmets to handlebars, roll cages to bullhorns. It captures TV quality audio … |
|
|
Evening Bead Spangle Embroidery Vanity Purse White $29.20 ·One main compartment and a inner slip-in pocket on the inside of the back for small accessories ·A top snap closure with bronze balls on it ·A removable chain strap included ·Soft material with a gentle sheen ·Embroidered with beads/ sequins/ spangles in beautiful flowery patterns ·Can be used in 2 ways as handbag or as a shoulder bag/messenger bag with the metal chain strap ·Classic… |
|
|
Learn How to Fashion Design with Bob Martin 3 DVD Set & FREE Pattern $29.99 Learn a complete lesson on Fashion Design, Experience the Exhilaration of designing your own clothes, develop and expand your design skills and abilities, Try “How To Fashion Design with Bob Martin” Today!Professional Designer Bob Martin has opened up his vault of design secrets and is not holding anything back! His personable, Fashion forward approach allows anyone who desires to learn about fash… |
|
|
Logitech M305 Wireless Mouse (Black) $17.98 The contoured shape and soft rubber grips keep your hand comfortable, even after long hours at the computer. Automatic sleep mode turns the mouse off when you’re not using it Power indicator light eliminates surprises… |
|
|
Wacom Techno Cintiq 21UX 21-Inch Interactive Pen Display PC Tablet With Pen and Software $1,999.00 Wacom’s Cintiq 21UX interactive pen display provides the best-of-class pen experience for working directly on the screen. It combines the advantages of a large-format LCD monitor with the control, comfort, and productivity of Wacom’s most sophisticated patented cordless, battery-free pen technology. With an active 21.3 diagonal display, the Cintiq 21UX delivers a highly sensitive pen-on-scre… |
