Infolink

 

Search This Blog

Nov 29, 2012

Basic MVC

The Model

Models are the main component of your app, which is usually; what is stored and retrieve from the database, in our app, it will the tweet info and text.

The View

Views are the date in formatted form, delivered to the user. Here it will be the HTML pages.

The Controller

Controllers are the components that respond to all user requests, decide the appropriate response; which might be render a view, redirect to other URI or many other things.

Pros and Cons
  • Pros
It has many pros, but these are the most remarkable:
  1. Full control over the HTML, CSS, and JavaScript code, helping you to write clean, standards-compliant markup
  2. It's Extensible which means that you can use a default component, or reconfigure it, or even use another component
  3. HTTP friendly, it gives you total control over the requests passing between browser and server
  4. Testability of MVC makes it simple to unit test the logic that is specific to a page, by testing controller methods
  • Cons
It does not really have many cons compared to its pros:
  1. The lake of drag and drop component in WebForms, despite that JQuery and other JavaScipt library overcome this problem
  2. It's not as easy as WebForms, you should understand the role of each component individually and all of them together.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...