what is MVC in general & what is asp.net MVC ?

Last post 07-05-2009 7:59 PM by michael.lukatchik. 4 replies.

Sort Posts:

  • what is MVC in general & what is asp.net MVC ?

    07-05-2009, 3:07 AM
    • Member
      103 point Member
    • Haansi
    • Member since 12-28-2008, 9:21 AM
    • Faisalabad
    • Posts 175

    hi,

    I am not getting sense what is MVC and what is asp.net MVC? what are these basically and what is difference. Plz guide me on this issue.

    Haansi

    Thanks in anticipation,

    Best Regards,
    Yawer Iqbal

    Software Engineer, Vigeo International Pvt Ltd
    Faisalabad, Pakistan
  • Re: what is MVC in general & what is asp.net MVC ?

    07-05-2009, 9:17 AM
    Answer
    • Contributor
      5,965 point Contributor
    • gerrylowry
    • Member since 07-02-2008, 9:46 PM
    • alliston ontario canada
    • Posts 2,162

    MVC is a way of designing a computer application.

    Model          View         Controller

    The Model is a black box.  It manages things like files, databases, and business rules.

    Think of the Model as the manager or boss.

    The View is that part of the application that presents information to the eyes of the end-user.

    The Controller is the courier for the boss.  Messages from the boss to the View are delivered by the Controller.

    Since the Controller is the servant of the Model, a better name would be:

                McV:    Model - controller - View

    Rather that one giant program that does everything, an MVC application separates responsibilities.

    This is good because, for example, one could change the black box that is the Model is some way and not have to change other parts of the application.

    Read this classic paper on GUI Archictecture:

    http://martinfowler.com/eaaDev/uiArchs.html "GUI Architectures"

     

    ASP.NET MVC

    ASP.NET MVC is a framework that facilitates implementing the MVC paradigm for .Net web applications.

    I suggest that you read Rob Conery's "I Spose I’ll Just Say It: You Should Learn MVC"
    at http://blog.wekeroad.com/blog/i-spose-ill-just-say-it-you-should-learn-mvc/.

    Learn more about ASP.NET.MVC  here:  http://www.asp.net/mvc/

    Regards,
    Gerry Lowry

    References:


    http://martinfowler.com/articles/mocksArentStubs.html "Mocks Aren't Stubs"

    http://forums.asp.net/p/1378375/2906878.aspx
    "Questions about MVC"

     

     

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes by Susan
  • Re: what is MVC in general & what is asp.net MVC ?

    07-05-2009, 9:34 AM
    • Contributor
      5,965 point Contributor
    • gerrylowry
    • Member since 07-02-2008, 9:46 PM
    • alliston ontario canada
    • Posts 2,162

    In the Microsoft world, there are currently two main paths to building web to building advanced web applications:

    ASP.NET WebForms and ASP.NET MVC

    One of the greatest advantages of ASP.NET MVC is that it has been designed to facilitate unit testing.

    Read this important article:

    http://msdn.microsoft.com/en-ca/magazine/dd942838.aspx

  • ASP.NET MVC
  • Building testable solutions
  • Dependency injection
  •  

    Tooling

    Even though ASP.NET MVC provides many of the tools developers need to create testable applications, you cannot rely on it to guide you in the right direction. Instead, you must design your applications deliberately to support testing, and a few additional tools help with this:

    • Unit Testing Framework. xUnit.NET by Brad Wilson and Jim Newkirk. xUnit provides a way to run automated unit tests. Many people use MSTest, but many other unit testing frameworks are out there, and I encourage you to take a look at some of them. I chose xUnit.NET because it is simple, easily extended, and has a very clean syntax. I'm using the xUnit test runner for Resharper, but the xUnit GUI test runner is in the Tools folder of the sample application.
    • Dependency Injection Framework. Ninject 2 by Nate Kohari. Ninject provides a way to wire up classes in your application. I'll describe this approach in more depth later in the article.

    • Mocking Framework. Moq by Clarius Consulting. Moq provides a framework for mocking interfaces and classes during testing.
  •  

    Regards,
    Gerry (Lowry)

  • Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes by Susan
  • Re: what is MVC in general & what is asp.net MVC ?

    07-05-2009, 9:38 AM
    • Contributor
      5,965 point Contributor
    • gerrylowry
    • Member since 07-02-2008, 9:46 PM
    • alliston ontario canada
    • Posts 2,162

    Here is another important Martin Fowler paper for you to read:

    http://www.martinfowler.com/articles/injection.html
    "Inversion of Control Containers and the Dependency Injection pattern".

    Please note that the learning curve for ASP.NET MVC is much steeper than ASP.NET WebForms.

    As the saying goes, no pain, no gain!

    g.

     

    Gerry Lowry, Principal
    Ability Business Computer Services ~~ Because it's your Business, our Experience Counts!
    68 John W. Taylor Avenue
    Alliston · Ontario · Canada · L9R 0E1 · gerry.lowry@abilitybusinesscomputerservices.com

    Websites:
    http://abilitybusinesscomputerservices.com
    http://gerrylowryprogrammer.com ~~ résumé & testimonials
    http://veganoccasions.com ~~ recipes by Susan
  • Re: what is MVC in general & what is asp.net MVC ?

    07-05-2009, 7:59 PM
    • Member
      111 point Member
    • michael.lukatchik
    • Member since 11-17-2008, 11:54 PM
    • Northeast Pennsylvania
    • Posts 29

    Haansi,

    MVC is a design pattern that has been around since 1979.  It was originially introduced at XEROX PERC to simplify the complex ways that object-oriented software was being developed at the time.

    Fast forward to 2009, and you see different web-oriented frameworks like Ruby on Rails, Struts, Spring, Zend, and most recently Microsoft's own ASP.NET MVC framework promoting "Model 2" variations of the MVC pattern to make everyday application development easier.

    Unlike the traditional ASP.NET WebForms development model that we've been used to for the past several years, ASP.NET MVC Model 2 prides itself on SoC (Separation of Concerns), Test-Driven Development, REST-friendly URL's, more granularity over the HTML that is rendered to the browser, and so much more.

    Compared to the original MVC pattern of 1979, today's MVC Model 2 pattern specifically focuses on handling and dispatching full page WebForm posts and reconstructing the full page via a Controller.  In the Model 2 pattern, Controller's are centric parts to your web applications.  They receive client requests and translate those requests into application-specific instructions for the Models (where your application's domain logic and data are).

    Hope this helps.  There is so much more to learn about the MS ASP.NET MVC pattern.  For more thorough explanations of the ASP.NET MVC pattern, check out www.asp.net.mvc.

     

     

     

Page 1 of 1 (5 items)