PART I: What is MVC?
MVC stands for "Model-View-Controller" which is a well-known term in software development with respect to software design & architecture.
For the last many years, web developers & vendors have been trying to develop or offer MVC pattern based frameworks in order to efficiently develop standard web applications; e.g STRUTS, JSF (in Java).
Basically, an MVC based framework targets separation of code into three tiers: Data-Presentation-BusinessLogic. This helps decouple (separate) your software modules and hence make them more re-usable & more easily extensible.
Microsoft has now offered 'its' MVC based web application framework after a long time called Microsoft MVC 2.
M= Model
= Your objects/classes that represents data ; e.g Employee, Person, etc
= Entities (in terms of Entity Framework)
= Model classes help decouple our business logic from UI code (View)
V= View
= User Interface(UI) or presentation layer like webforms which offers CRUD (Create/Read/Update/Delete) operations
= Views in Microsoft MVC2 are actually "HttpResponse" on a "HttpRequest"
C= Controller
= Our custom classes which handle requests by taking certain actions of database
= Controllers in Microsoft MVC2 have "action" methods which finish by responding via some "View" page
= Controllers help decouple our database related business logic from UI code (View)
Watch & Learn from Scott Guthrie's awesome video demo on MVC 2 at:
http://channel9.msdn.com/posts/matthijs/Scott-Guthrie-ASPNET-MVC-2/
Part I: What is ASP.NET Dynamic Data?
ASP.NET Dynamic Data is a framework which generates UI pages of our database tables with built-in / auto-implemented CRUD (View, Edit & Delete) operations. This results in generation of a full-blown data entry web application without writing a single line of code.
Here are some bold features of ASP.NET Dynamic Data:
- Dynamic controls make sorting, paging, editing, and filtering easier
- Validation and business rules specified on data model flow through to UI (i.e. you just 'annotate' your Entity classes with these rules and they are automatically applied to the corresponding UI input fields)
- Flexible UI routing
- UI is completely customizable through custom templates, input fields and pages
Apparently looking very powerful, ASP.NET Dynamic Data still arises some question marks as to:
- how much flexible it is to inject your business logic?
- what amount of re-factoring it will cost to customize your UI screens if you don't want to use its 'scaffolding' feature offered for free?
My 1st impressions say that:
- ASP.NET Dynamic Data is only good for simple Data Entry web apps
- A Hybrid (mixture) of ASP.NET Dynamic Data + ASP.NET MVC 2 will result in a valuable 'toolset' for building my future business webapps
No comments:
Post a Comment