Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Religious question - MVC benefits vs ASP.NET?

Religious question - MVC benefits vs ASP.NET?

Scheduled Pinned Locked Moved The Lounge
asp-netarchitecturequestioncsharpdatabase
94 Posts 26 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Lost User

    learn mvc and don't worry about knockout or bootstrap for now. json is just a way of formatting payloads on the wire - don't sweat it - it's lean and mean as opposed to xml - that's all. css is what it is ... you want to use it in your presentation layer if you plan on using html ;-) in other words - learn to walk before you run. there are plenty of free online tutorials (MS has one, Pluralsight, etc...). I guarantee you - once the lightbulb goes off you'll be asking yourself "it can't be this easy..."

    M Offline
    M Offline
    Mycroft Holmes
    wrote on last edited by
    #84

    Rene Pilon wrote:

    once the lightbulb goes off you'll be asking yourself "it can't be this easy..."

    To be honest I felt the same way about xaml binding and MVVM, what a struggle that was coming from a winforms environment. Now we have a "framework" with all the bits required to pull together a LOB app very quickly and we have to go back to square one again with MVC :sigh:

    Never underestimate the power of human stupidity RAH

    1 Reply Last reply
    0
    • C Christopher Duncan

      My general impression is that in order to really gain the performance benefits of mvc, I'll need to shift a lot of my logic from a server side / postback paradigm to lots of javascript handling it in the client. While that would eliminate a lot of round trip hits, not wild about javascript coding.

      Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #85

      Christopher Duncan wrote:

      not wild about javascript coding

      Fucking understatement - in 4 years of silvelight LOB apps I have not touched the horrible stuff, now I have to start relearning it all over again because the javascript I use in the 90s has morphed into something else.

      Never underestimate the power of human stupidity RAH

      C 1 Reply Last reply
      0
      • M Mycroft Holmes

        Christopher Duncan wrote:

        not wild about javascript coding

        Fucking understatement - in 4 years of silvelight LOB apps I have not touched the horrible stuff, now I have to start relearning it all over again because the javascript I use in the 90s has morphed into something else.

        Never underestimate the power of human stupidity RAH

        C Offline
        C Offline
        Christopher Duncan
        wrote on last edited by
        #86

        Yeah, dig it. I still don't know why, twenty years on, someone hasn't written a cross platform runtime application that would allow us to write client applications via that framework. After all, a browser is nothing but a cross platform app with a crappy development infrastructure. Why couldn't we do something real, that would allow us to return to the power of client side computing?

        Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World

        1 Reply Last reply
        0
        • C Christopher Duncan

          Hopefully this doesn't count as a coding question. My boss pinged me today about considering the move from asp.net to mvc because it's supposed to be better for n-tier database and performs better then asp.net web forms. I have absolutely no experience with or knowledge of mvc, so I thought I'd see if there was a general consensus in terms of whether or not it's a better architecture to do database intense web development with. What are your thoughts?

          Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World

          K Offline
          K Offline
          Kirk Wood
          wrote on last edited by
          #87

          There are some benefits to MVC, but if they are worth it or not depends on you (and your team). In general terms, WebForms has gone to great lengths to abstract away the web portion of development. Also, there is a tendency for many developers to mix the business logic and the display logic together. (And in all honesty, sometimes it is hard to not mix them from my point of view.) As for using AJAX, WebForms makes the easiest stuff easier, and much beyond that harder. (And the hard stuff near impossible.) While MVC doesn't try to hide as much from you and thus many actually find it easier in the long run. Now for database work, along with MVC comes the WebAPI which makes it easy to create a service that can be consumed by clients not coming from the .NET sphere. (This is only good if you actually have others trying to consume your data.) From my perspective, there is also more demand for developers who know MVC. It is the latest shiny thing that gets jobs. And being employable by the next company is always a concern for me. So if I have a chance to progress my resume while working for my employer, I take that opportunity. One could argue that in enough years, it will be easier to find someone to maintain MVC than WebForms.

          C 1 Reply Last reply
          0
          • L Lost User

            I'm going to disagree .... do the job right the first time imo. hiding the viewstate in a session is another way of putting lipstick on a pig - it's still a pig at the end of the day.

            L Offline
            L Offline
            L Viljoen
            wrote on last edited by
            #88

            Now that being true still , for any server language including MVC, don't you think the preserved values for a we form is put somewhere regardless of language. I mean the page will still have it after a post-back. The sloppy thing about asp.net is that they put it smack on the web page itself just some food for thought

            Chona1171 Web Developer (C#), Silverlight

            L 1 Reply Last reply
            0
            • E ENOTTY

              Just use Flesk.NET ViewState optimizer http://flesk.net/components/vsoptimizer.aspx[^] It can store Viewstate either in Session State or on disk server side (compression optional).

              L Offline
              L Offline
              L Viljoen
              wrote on last edited by
              #89

              thank you for the share, I will definitely look into this , it looks interesting

              Chona1171 Web Developer (C#), Silverlight

              1 Reply Last reply
              0
              • L L Viljoen

                Now that being true still , for any server language including MVC, don't you think the preserved values for a we form is put somewhere regardless of language. I mean the page will still have it after a post-back. The sloppy thing about asp.net is that they put it smack on the web page itself just some food for thought

                Chona1171 Web Developer (C#), Silverlight

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #90

                no - form values are sent to the controller via ajax. of course the model will need to be freshed to reflect the change and all - but there was no complete page refresh. Kendo has a really great implementation of this.

                1 Reply Last reply
                0
                • K Kirk Wood

                  There are some benefits to MVC, but if they are worth it or not depends on you (and your team). In general terms, WebForms has gone to great lengths to abstract away the web portion of development. Also, there is a tendency for many developers to mix the business logic and the display logic together. (And in all honesty, sometimes it is hard to not mix them from my point of view.) As for using AJAX, WebForms makes the easiest stuff easier, and much beyond that harder. (And the hard stuff near impossible.) While MVC doesn't try to hide as much from you and thus many actually find it easier in the long run. Now for database work, along with MVC comes the WebAPI which makes it easy to create a service that can be consumed by clients not coming from the .NET sphere. (This is only good if you actually have others trying to consume your data.) From my perspective, there is also more demand for developers who know MVC. It is the latest shiny thing that gets jobs. And being employable by the next company is always a concern for me. So if I have a chance to progress my resume while working for my employer, I take that opportunity. One could argue that in enough years, it will be easier to find someone to maintain MVC than WebForms.

                  C Offline
                  C Offline
                  Christopher Duncan
                  wrote on last edited by
                  #91

                  I know that I personally embraced web development only after asp.net and web forms arrived on the scene, for the exact same reason that you mentioned. It abstracted html / http development (which was an incredibly bad thing to have turn into the de facto development platform) and made it feel like normal application programming. Some of the things that were used to accomlpish this sleight of hand (view state appears to be the front runner) also contribute to poor performance, hence mvc. Or at least so I've surmised thus far. I still think writing a serious application in a browser is patently bad idea, but like you, I get paid to give the people what they want. So, most of my work is web develoopment. Like you, I also care about the future, so your point about Mvc is also relevant. Of course, honor requires that I first serve the needs of the people who pay me, but if I can do that and serve myself at the same time, everybody wins. Nonetheless, there's a reason web forms provided an abstraction layer on top of html. Not at all enthusiastic about entering the wild, wild west of native html / javascript and the wonderful world of browser incompatibilities. Write once, debug everywhere.

                  Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World

                  1 Reply Last reply
                  0
                  • C Christopher Duncan

                    Hopefully this doesn't count as a coding question. My boss pinged me today about considering the move from asp.net to mvc because it's supposed to be better for n-tier database and performs better then asp.net web forms. I have absolutely no experience with or knowledge of mvc, so I thought I'd see if there was a general consensus in terms of whether or not it's a better architecture to do database intense web development with. What are your thoughts?

                    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers (2nd ed, just released) Have Fun, Get Paid: How to Make a Living With Your Creativity (Due Nov 2013) The Career Programmer: Guerilla Tactics for an Imperfect World

                    S Offline
                    S Offline
                    Sam Meacham
                    wrote on last edited by
                    #92

                    I don't have the time to read everyone else's replies, but here's my 2 cents. WebForms was an attempt to copy the 90s desktop GUI model, and put it on top of a stateless protocol (http). This is why for every UI element, you have both a server control and a client control. In my experience, web forms is awful. The viewstate is ugly. The page postback model is not straight forward. Attempting to sync between client and server controls can be brittle. Everything seems to just sneak in a little hack in (ScriptManager.RegisterStartupScript, etc.) here or there to keep everything working. It's prone to many errors related only to the plumbing. MVC is simple, clean, fast and based directly on the standards that the web was built on, and that it's using going forward. The conversion isn't difficult once you get comfortable with MVC. Your ui state is in the ui, your data model is in the data layer, and your services and controllers are the middle men. There are TONS of modern options better than webforms. Stay away.

                    1 Reply Last reply
                    0
                    • J jnlt

                      knockout.js library does that for plain old html.

                      I Offline
                      I Offline
                      IndifferentDisdain
                      wrote on last edited by
                      #93

                      Thanks; I'll have to check it out.

                      1 Reply Last reply
                      0
                      • S Steve Naidamast

                        I have done extensive research on the very question you have posed as I have faced the same problem; should I move to MVC or keep working with Web-Forms. This question took me nearly two years to resolve since I had to decide where my career skills would be most benefited. Since I have been in the field for a very long time this decision was more than just where a specific project may lead but more importantly how I wanted my skill-set to develop since you cannot really concentrate on both; you just don't have the time. All this being said here is my answer to your question... In a word, stay with Web-Forms. Now here is the "why"... MVC is an excellent paradigm to work with. It is well crafted and makes a lot of sense from a technical perspective. However, that is all it does. It offers absolutely no benefit to a project's business requirements and nor to the company's IT department as a whole in general. And this is MVC's biggest drawback. If you look at every positive reply posted here you will find that practically none will support a benefit to a project's business requirements. True, Web-Forms can be a bear at times to work with but developing with Web-Forms is much easier with far less client-side coding involved, which is more difficult to test. And JavaScript is a horrendous language to work with; not because it is a bad language in of itself but the actual front-end support for debugging and working with it is still rather crude. jQuery makes some of it much easier but adds a truck load of raw code that has to be transferred over the wires to your front-end. And you have to learn how to use jQuery well to make it worth your while. MVC is also very limited in what you can do with the front-end when compared to what Web-Forms offers in terms of server-controls. Yes, they can be weighty but so will your MVC when you find how much you have to code from scratch to make it worthwhile. If you decide upon MVC you do it because you and your team will enjoy working with it and you understand its inherent limitations, especially when your project may be up against a deadline with a boat load of user requested features. Its a paradigm with a very nice framework. However, that is all it is. You can do the same and even more with Web-Forms with less overall effort. In terms of performance, there is absolutely no difference in terms of overall application performance as both methodologies have their own performance negatives. And you can develop a very slow MVC application with a v

                        M Offline
                        M Offline
                        Mycroft Holmes
                        wrote on last edited by
                        #94

                        Ah I see you have posted it here - have another upvote.

                        Never underestimate the power of human stupidity RAH

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups