• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

.NET MVC - rated or slated?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    .NET MVC - rated or slated?

    Seen quite a few roles asking for MVC these days. My first impressions of it are that the markup looks like classic ASP (i.e. a step backwards) and makes the the code-behind more complicated than it really needs to be. Anyone had any experience or is a convert?

    QB.

    #2
    Originally posted by QwertyBerty View Post
    the markup looks like classic ASP (i.e. a step backwards)

    That's probably the one thing that has put me off going any further than a cursory glance at its offerings. There's plenty of non-MVC work out there so I'm not in any rush to get into something still so immature.

    The other is that from what I've read the control libraries are still relatively weak, so rather than be a solution for rapid development it's more a solution for test driven development. I'm not a tester and have no desire to be.
    Feist - 1234. One camera, one take, no editing. Superb. How they did it
    Feist - I Feel It All
    Feist - The Bad In Each Other (Later With Jools Holland)

    Comment


      #3
      een quite a few roles asking for MVC these days. My first impressions of it are that the markup looks like classic ASP (i.e. a step backwards) and makes the the code-behind more complicated than it really needs to be. Anyone had any experience or is a convert?

      QB.

      yep a mark up is going to be more HTML style which is similar to classic ASP.

      About code-behind it is move into a more layered structure. You have your controllers, models and helpers to pass everything into a view.

      Personally I prefer MVC it give me more control over what is generated, plus it do not make me to use a ViewState for example.

      Regards

      Comment


        #4
        Originally posted by QwertyBerty View Post
        Seen quite a few roles asking for MVC these days. My first impressions of it are that the markup looks like classic ASP (i.e. a step backwards) and makes the the code-behind more complicated than it really needs to be. Anyone had any experience or is a convert?

        QB.

        You are quite right and the only reason it is being used by so many companies is because they have been used to coding against the MVC pattern and makes hem feel so much comfortable. It is a step back from web forms in that you have to do all the hard work instead of ASP.NET doing it for you.

        The main reason in choosing between the two seems to be that the MVC framework is highly testable. The web forms framework is not instantly testable although you could use MVP pattern and make it so.

        The latest MS cert exam in ASP.NET ( 70-515 ) asks quite a lot of questions on MVC framework.
        Vote Corbyn ! Save this country !

        Comment


          #5
          Originally posted by Assassin View Post
          Personally I prefer MVC it give me more control over what is generated, plus it do not make me to use a ViewState for example.

          You can have as much control of ASP.Net webform output as you like, just takes more work and understanding of the mechanics, which detracts from the initial benefits of using webforms in the first place (RAD etc).

          For the viewstate issue I'm looking forward to HTML5 as I think (if I understand correctly) the client/offline storage stuff will allow the client to retain the state rather than the server. This will also have a positive impact on stuff like caching so you don't need to repopulate controls on each postback or have the lookup data in viewstate.

          Is there a roadmap from M$ to show how they think MVC, webforms, silverlight, etc will be part of their plans in the next 5 or 10 years, so we don't have to guess which technologies are going to be ditched or sidelined in the near term?
          Feist - 1234. One camera, one take, no editing. Superb. How they did it
          Feist - I Feel It All
          Feist - The Bad In Each Other (Later With Jools Holland)

          Comment


            #6
            I really like MVC3 with Razor and yep at first it did seem a bit wrong to have script within the html. But what tends to happen is that the view contains only the logic to display the information from your model.

            So your view doesn’t contain any kind of business logic just simple things like looping through your model to display the data.

            I don’t think MVC3 is a backwards step from webforms, if anything I’m glad to be rid of all those page events. I have much more control with MVC3 and doing things with Ajax is pretty easy.
            Yes it is easier to test but to be honest the main reason for me using MVC3 is it’s just much simpler than webforms.
            Last edited by woohoo; 17 June 2011, 09:54.

            Comment


              #7
              Originally posted by QwertyBerty View Post
              Seen quite a few roles asking for MVC these days. My first impressions of it are that the markup looks like classic ASP (i.e. a step backwards) and makes the the code-behind more complicated than it really needs to be. Anyone had any experience or is a convert?

              QB.
              The opposite, MVC maked code behing simple, it decouples the View (web page) from the model (data) and controller (class with methods that map to actions). Basically each url is routed to a method (action) on a class in the controller and the querystring parameters or sub pages in the url become the method params. i.e.

              http://mysite/getuserrep/russell/ OR http://mysite/getuserrep?username=russell

              calls method on the controller.

              public ActionResult GetUserRep(string username)
              {
              }

              This also makes unit testing the controller simple. and you can configure the routing to make your URLs search engine friendly.

              Any new site I would always use MVC 3 with razor, and it won't be long before web forms are ditched by MS.
              HTH
              Last edited by russell; 17 June 2011, 09:50.

              Comment


                #8
                Originally posted by russell View Post
                The opposite, MVC maked code behing simple, it decouples the View (web page) from the model (data) and controller (class with methods that map to actions). Basically each url is routed to a method (action) on a class in the controller and the querystring parameters or sub pages in the url become the method params. i.e.

                http://mysite/getuserrep/russell/ OR http://mysite/getuserrep?username=russell

                calls method on the controller.

                public ActionResult GetUserRep(string username)
                {
                }

                This also makes unit testing the controller simple. and you can configure the routing to make your URLs search engine friendly.

                Any new site I would always use MVC 3 with razor, and it won't be long before web forms are ditched by MS.
                HTH
                You can use the MVP pattern or even MVVM pattern in web forms and achieve the same thing.

                MS initially did not have built in MVC framework and it was written by a third party but seeing that it was popular it became part of .NET framework.
                Vote Corbyn ! Save this country !

                Comment


                  #9
                  Originally posted by fullyautomatix View Post
                  You can use the MVP pattern or even MVVM pattern in web forms and achieve the same thing.

                  MS initially did not have built in MVC framework and it was written by a third party but seeing that it was popular it became part of .NET framework.
                  Yes I think you can, but MVC is built from the ground up to fit into that pattern.

                  Comment


                    #10
                    The other good thing about MVC is that you're in complete control of the HTML that gets output to the page. Webforms used to do some horrific things with tables and the like. Don't know if that's still the case but it was one definite point in favour of MVC when it was first released.

                    Comment

                    Working...
                    X