Tuesday, November 3, 2009

What is ASP.NET MVC

So you heard of it: MVC. What is it, what does it stand for and why I need to use it, that’s what we are going to know right now !.
ASP.NET MVC is a new web development framework from Microsoft that combines the effectiveness and tidiness of model-view-controller (MVC) architecture, the most up-to-date ideas and techniques from agile development, and the best parts of the existing ASP.NET platform. It’s a complete alternative to the WebForms platform, delivering considerable
advantages for all but the most trivial of web development projects.

Why MVC ?
well its a question I asked my self when I heard about MVC. Why should I use it instead of developing with tradional asp.net ?
After reading the msdn article and by experience I found that I encounterd the following situations:
  • If you're working in an agile development environment, where the customer or your manger requires modifications or new features to your software module. when new requirements evolve, it becomes such a pain to modify your work- especially if there is a modification to the database you're working on.
  • Many datastore applications require good organization of the User-Interface parts so they can be modified easly in response to database modifications
  • In traditional asp.net the developer may have to handle the user-interface design and the database development, whick consumes a lot of time and distract the developer. So separating the user-interface design and database development efforts produces better performance of the final product.
  • You want to reuse the database access code so you don't have to write the same code in each page.
  • Migrating your application to a newer framework would be easy if there is a separation between the user-interface and the business logic.
  • reducing code tied to user interface enhances testability.
  • The actual mechanism of maintaining state across requests
    (ViewState) often results in giant blocks of data being transferred between
    client and server. It can reach hundreds of kilobytes in many real-world
    applications, and it goes back and forth with every request, frustrating site
    visitors with a long wait each time they click a button or try to move to the
    next page on a grid.
  • ASP.NET MVC–generated pages don’t contain any ViewState data, so
    they can be hundreds of kilobytes smaller than typical pages from
    ASP.NET WebForms. Despite today’s fast broadband connections, this
    bandwidth saving still gives an enormously improved end user experience.
  • It supports a new routing system that produces clean url. Instead of writing App_Pages/page1/aspx?action=show%20prop&prop_id=345 it becomes something like products/technology/Laptops. This doesn't expose your application folder and pages names and the file structure of your application, so you are free to change them as you want without changing the public internet url which users may like to keep it in their favourites for later reference.

Finally ASP.NET is built on the ASP.NET Platform so you won't feel strange when dealing with it and it won't take a long time to get your hands on ASP.NET MVC

No comments:

Post a Comment