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 32 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.
  • C Christopher Duncan

    Swinging a heavy stick is a time honored practice dating back to ancient times. Ah, a traditionalist! :-D

    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
    Mark_Wallace
    wrote on last edited by
    #33

    Christopher Duncan wrote:

    Swinging a heavy stick is a time honored practice dating back to ancient times.

    Hey, Jedi-ism predates cricket by millennia! If anyone's a Luddite, here, itsa ain'tsa meesa!

    I wanna be a eunuchs developer! Pass me a bread knife!

    C 1 Reply Last reply
    0
    • C Christopher Duncan

      The things you mentioned are all solid basics that apply to pretty much any platform. While it's not my project, I think they have a concern with the weigth of viewstate (it's a global app and not all countries have good Internet speeds) and things of that nature.

      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

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

      Heres some code you can use in your asp.net page

      protected override object LoadPageStateFromPersistenceMedium()
      {
      object viewStateBag;
      string m_viewState = (string)Session["ViewState"];
      LosFormatter m_formatter = new LosFormatter();
      try
      {
      viewStateBag = m_formatter.Deserialize(m_viewState);
      }
      catch
      {
      return null; // throw new HttpException("The View State is invalid.");
      }
      return viewStateBag;
      }
      protected override void SavePageStateToPersistenceMedium(object viewState)
      {
      MemoryStream ms = new MemoryStream();
      LosFormatter m_formatter = new LosFormatter();
      m_formatter.Serialize(ms, viewState);
      ms.Position = 0;
      StreamReader sr = new StreamReader(ms);
      string viewStateString = sr.ReadToEnd();
      Session["ViewState"] = viewStateString;
      ms.Close();
      return;
      }

      however it just need some minor adaptations to account for when a user opens more than one page at the same time (you may run into corrupted state problems) What I do is I cancatenate a string to the veiwstate id Session["ViewState"+hashkey] and i generate the hashkey by using a SHA hash alogoritm with the current url as input , and a whipe the session on page not IsPostback

      Chona1171 Web Developer (C#), Silverlight

      E 1 Reply Last reply
      0
      • L Lost User

        run to mvc - don't walk. say goodbye to gargantuan viewstates ;P in a few months you'll wonder why you wondered

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

        as someone experienced in both I say proceed with caution if you are on a tight deadline do not even consider. Viewstate ? just hide your viewstate in a session and you are set

        Chona1171 Web Developer (C#), Silverlight

        L 1 Reply Last reply
        0
        • M Mark_Wallace

          Christopher Duncan wrote:

          Swinging a heavy stick is a time honored practice dating back to ancient times.

          Hey, Jedi-ism predates cricket by millennia! If anyone's a Luddite, here, itsa ain'tsa meesa!

          I wanna be a eunuchs developer! Pass me a bread knife!

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

          :laugh: :laugh: :laugh:

          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

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

            There are so many benefits to MVC: - Due to a brittle and convoluted way of doing things they will have to hire ten more programmers and you will become their manager, which is kinda of a promotion. - Because there are no more controls, you will have to hand code every single piece of crap, which will make your system truly unique. - Because Microsoft kinda bundles their implementation with their wonderful almost divine version of an ORM you will get to experience the wonders of flexibility (and performance) that an Entity framework enables. etc etc

            C 1 Reply Last reply
            0
            • C Christopher Duncan

              I would think that moving from Silverlight, which is a more Flash-like and rich media oriented creature, to the more html oriented world of asp.net or mvc would be challenging on any numbe of levels. I really miss native development. I can't believe that in two decades, the best we've been able to do with a global TCP/IP network is application development housed in an amped up document reader. The web browser was never intended to be a serious development environment.

              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

              3 Offline
              3 Offline
              3n1g
              wrote on last edited by
              #38

              Why? I look at the browser as a portal. Nothing but a window to interact with something else. The good, is no matter what "window" (browser) and what "house" (OS/equipment) you have, you will interact with the same thing. The bad. The "window" builder sometimes mess up and the view you get from it get's distorted and sometimes unuseable.

              C 1 Reply Last reply
              0
              • L Lost User

                There are so many benefits to MVC: - Due to a brittle and convoluted way of doing things they will have to hire ten more programmers and you will become their manager, which is kinda of a promotion. - Because there are no more controls, you will have to hand code every single piece of crap, which will make your system truly unique. - Because Microsoft kinda bundles their implementation with their wonderful almost divine version of an ORM you will get to experience the wonders of flexibility (and performance) that an Entity framework enables. etc etc

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

                Brittle and convoluted I can learn. The lack of controls I've read about is indeed one of my concerns.

                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

                A 1 Reply Last reply
                0
                • L L Viljoen

                  My post from previous forum message: On to an issue whether or not we should move to MVC development I have been debating this with my developers now for months. And some insist MVC is better though I just dont see it. What makes a programming methodology better for me ? Speed of development. Developer spending less time on interface and normal features and more time getting validation and business logic to be solid Code that is easy to understand by new developers taking on the project Structure that is easy to follow and you dont have to jump between mappings and target pages to check how they link Ability to create reusable controls Visual designer , so you dont have to repeatedly code something as mundane as a table. Scalability When working with MVC4 Razor Visual designer Gone ;( No Server Controls Hooking up an event is manually coded (instead of double clicking or hooking up an event Single controller multiple pages Bottom line is what is quicker , on asp.net I can drag a button on the exact spot i need it double click (3 seconds later) I have a button named and hooked up to an event without touching the keyboard. which the mvc guy is still busy typing his input tag , not to mention switching between the controller and the markup screens creating a event and a model. When i used a aspx grid , I get a nice linq data source hook it up to a grid, columns gets auto generated , meaning all i have to do is change the column headers , click that I want to enable sorting and paging , and I am done 2 minutes later. and if I have not too complex columns the add edit and delete features are created for me in one shot which can be configured for more complex scenarios's Now as an mvc developer doing the whole grid thing , everything has to be coded , I have to code my data queries (be it LINQ or SQL) to do the paging and sorting , 2 hours an insane amount of typing and script later I have something that kinda does the same thing but looks butt ugly. I guess an expereinced MVC dev can do it in probably 10 mintes flat My Recommendation, MVC is ok for cases with little complexity and smaller size projects, but when you need to deliver something of great scale and complexity you are shooting yourself in the foot as you will still be coding interface logic when a asp.net dev is long done with the project. Also just in case you wondering I know 1 MVC does not have viewstate : good practiice minimises viewstate/ you can also hide your viewstate in session using very basic code, al

                  3 Offline
                  3 Offline
                  3n1g
                  wrote on last edited by
                  #40

                  I would say if you are using any kind of visual designer to build web pages, you are doin' it wrong. Even the best tools suck at it, and it would never be scalable to different sizes.

                  L 1 Reply Last reply
                  0
                  • L L Viljoen

                    Well did you know you can make the viewstate the server's problem Yes some pages kicks out an insane amount of viewstate , but with simple code you can hide your viewstate in a session , never to be seen by the page again.

                    Chona1171 Web Developer (C#), Silverlight

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

                    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

                    L M 2 Replies Last reply
                    0
                    • R Rutvik Dave

                      First of all, ASP.Net MVC is "NOT" better than ASP.Net Webforms. Both are different frameworks for different use. Both have Advantages and Disadvantages over each other. Many people have wrong idea that 'MVC' is the new version of 'Webforms' and they should move to MVC just because it's so much better than Webforms (If you believe this, you lack information about both the framework). Microsoft is going to develop both the frameworks in parallel (Webforms is not going away). I have been using ASP.Net Webforms since last 6 Years, and ASP.Net MVC since last 2 Years. Here are my thoughts... Webforms Pros: Your team already knows this, Richer controls, Years old methodology, Much higher talent available in the market, Easier to switch (PHP or Java developers have to learn only new syntax and not new concept) Cons: Unit Testing is not as seamless as MVC, Viewstates are making it little bit heavy compared to MVC, Lesser separation of logic compared to MVC (this is debatable) MVC Pros: Seamless Unit Testing, Clear Separation of Logic (this is debatable), More control over UI, Lot more code will be generated automatically for CRUD, Cleaner HTML Pages Cons: Completely new concept, No Design View, No more awesome controls, Big learning curve for your team. Less mature compared to Webforms Before you consider switching to MVC, you need to address two main questions. 1) How many developers are going to transitioned to MVC? If lot of people from your team has to learn MVC, then this is unnecessary exercise. Because the gain could be balanced by purchasing more computing power (this is cheap nowadays), and spending little bit more time on Unit Testing. compared to having every one to learn new methodology. 2) Are you going to rewrite existing application to MVC, or going to start a new application. If you are going to write a brand new application with the MVC, then it's OK. But if you are going to rewrite existing application, then you are looking for trouble. The rewrite will cause new bugs, your team who just learned the new concept, will face new challenges. and you could have added lot more new features to you Webforms application in the same efforts, instead now you have added new bugs and the new features are now in a pending state. So is it worth the time and money? When I switch to MVC, I remember struggling for a month changing my mindset to a new concept. And now I know MVC and we have launched our awesome product, it's cool and I like it. But I

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

                      Good insight, You know what irritated me during tech ed was that no one was using webforms , it kind of creates the perception with managers and technical architects that MVC is the new ASP.net granted it has some cool stuff but with MVC at its current state I cannot within any reason believe that a MVC developer can outcode and release faster than a asp.net developer of equal measure. unless its a "hello world" app. MVC is slightly faster I will admit , but with bandwidth increasing and our mobile phones being able to outrun what we considered fast pc's 10 years ago , I really think coding for the sake of faster code kind of like paying double for a package to arrive 5 minutes earlier.

                      Chona1171 Web Developer (C#), Silverlight

                      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

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

                        that also makes the advantage of unit testing a bit more clunky , javascript is a pain to debug . and still the bottom line is that you can achieve the exact same results in asp.net using javascript

                        Chona1171 Web Developer (C#), Silverlight

                        C 1 Reply Last reply
                        0
                        • 3 3n1g

                          Why? I look at the browser as a portal. Nothing but a window to interact with something else. The good, is no matter what "window" (browser) and what "house" (OS/equipment) you have, you will interact with the same thing. The bad. The "window" builder sometimes mess up and the view you get from it get's distorted and sometimes unuseable.

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

                          Considering the power of native client development, the Windows API, the stateless nature of html (and the workarounds that have emerged to compensate), etc., it's a very, very weak environment. Html was developed as a markup and linking language, i.e. a way to display a document and link to the next one. Hacking an environment so that it pretends to be somthing that it's not isn't my idea of a robust development platform. Of course, for those who live only in the web world, I realize this is a bit of a religious issue in and of itself.

                          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
                          • L L Viljoen

                            that also makes the advantage of unit testing a bit more clunky , javascript is a pain to debug . and still the bottom line is that you can achieve the exact same results in asp.net using javascript

                            Chona1171 Web Developer (C#), Silverlight

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

                            Yeah. Thus far I'm not terribly excited about moving to mvc, but I'm trying to keep an open mind so as not to miss out on any benefits just because it's not what I'm accustomed to.

                            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

                            L 1 Reply Last reply
                            0
                            • 3 3n1g

                              I would say if you are using any kind of visual designer to build web pages, you are doin' it wrong. Even the best tools suck at it, and it would never be scalable to different sizes.

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

                              It would be foolish to depend solely on a visual designer, when coding a website , and if you come from the good old dreamweaver days (remember how that used to make tables look like (yikes!!!), but consider this scenario you have never seen a project's interface before the frist time you get in touch with it is when your boss phone and say , interface broken when you click submit, so you fire up Visual studio, open the page in question using the designer click on the "submit" button and then view source. or go back to the designer and double click there you go you have the server method, all this while the MVC guy is busy typing in "submit" in search , and trying to figure out where the submit function in server side is placed because a sloppy coder decided its good to put all server logic in a single controller file :)

                              Chona1171 Web Developer (C#), Silverlight

                              3 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

                                A Offline
                                A Offline
                                Aaron Throckmorton
                                wrote on last edited by
                                #47

                                I made the push for my team to switch from web forms to MVC earlier this year. None of us had any experience with MVC, and had been using web forms for years. The entire team now hopes they never have to work on another web forms application again! Our development time is much shorter with MVC, and the apps are unbelievably faster.

                                Aaron Throckmorton

                                C 1 Reply Last reply
                                0
                                • C Christopher Duncan

                                  Brittle and convoluted I can learn. The lack of controls I've read about is indeed one of my concerns.

                                  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

                                  A Offline
                                  A Offline
                                  Aaron Throckmorton
                                  wrote on last edited by
                                  #48

                                  Sure, controls are gone, but now there are HtmlHelpers. There are some good ones built in, you can write your own, and there are some good libraries out there, like HtmlTags

                                  C 1 Reply Last reply
                                  0
                                  • C Christopher Duncan

                                    Yeah. Thus far I'm not terribly excited about moving to mvc, but I'm trying to keep an open mind so as not to miss out on any benefits just because it's not what I'm accustomed to.

                                    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

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

                                    For now my opinion is "its not there just yet" give it a few releases, my scenario is "leaving a treasure chest of Gold"(Asp.net), for a "few ounces of platinum"(MVC)

                                    Chona1171 Web Developer (C#), Silverlight

                                    1 Reply Last reply
                                    0
                                    • L L Viljoen

                                      It would be foolish to depend solely on a visual designer, when coding a website , and if you come from the good old dreamweaver days (remember how that used to make tables look like (yikes!!!), but consider this scenario you have never seen a project's interface before the frist time you get in touch with it is when your boss phone and say , interface broken when you click submit, so you fire up Visual studio, open the page in question using the designer click on the "submit" button and then view source. or go back to the designer and double click there you go you have the server method, all this while the MVC guy is busy typing in "submit" in search , and trying to figure out where the submit function in server side is placed because a sloppy coder decided its good to put all server logic in a single controller file :)

                                      Chona1171 Web Developer (C#), Silverlight

                                      3 Offline
                                      3 Offline
                                      3n1g
                                      wrote on last edited by
                                      #50

                                      And that is good? In mvc, a submit button will create a HTTP Post, with the same name as the view you are currently in. Imagine it breaks in the Entities page. That submit button will always (there may exceptions) launch the entities function that is marked with HTTP Post. So i can go directly there because I know that there is where the problem lies. Instead I have to go to a visual designer that depending on the complexity of the page can take a while, and go through a bunch of hidden div's for messages and other controls just to find a button to double click it because you don't know where the damn function is? I'de rather know where stuff is instead of going "fishing".

                                      L 1 Reply Last reply
                                      0
                                      • M Mycroft Holmes

                                        We are in the process in making the change from Silverlight to MVC and the differences are huge, mainly because I don't have any real depth in aspx/javascript. If you already have these skills I imagine the transition should be reasonably simple. I am continually astonished at the number of different tools needed to achieve a high level of interaction that is automatic with xaml binding.

                                        Never underestimate the power of human stupidity RAH

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

                                        Mycroft Holmes wrote:

                                        I am continually astonished at the number of different tools needed to achieve a high level of interaction that is automatic with xaml binding.

                                        I couldn't agree more; my company is in the same boat as yours. I'd kill for a simple {Binding Model.Property}.

                                        J 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 Carleton
                                          wrote on last edited by
                                          #52

                                          You can read pro's and con's all over the place until you are blue in the face, so let me just be a witness to what happened in my company: We where starting a new project, the first lead used ASP.Net, which is where I learned it. We had 6 months to deliver, and we delivered it right on time! In the second, I asked for 2 weeks to do a ASP.Net MVC proof of concept for the next phase. The idea was to have the whole app use both. The reason I wanted to use ASP.Net MVC was because we had to render some dynamic forms. With things I had learned in the MVVM world, I had a feeling that ASP.Net MVC would do some binding between the model type and the view to simplify things exponentially. The second phase was more complex: the dynamic forms, integrating with the old code, and other new features. We had another 6 months, we got it done in 4! The speed and easy of doing it in ASP.Net MVC was simply amazing, I knew it would be faster, but I didn't even begin to imagine it would be as fast and easy as it was. Disclaimer: MVC programming IS a different way of thinking. I, personally, have been thinking in the MVC way for a while because of the MVVM programming I have done, I am positive that foundation helped greatly in speed things up. My point: If you are not use to thinking in the MVC fashion, it might take a bit more time to come up to speed then it did for me. P.S. If you do go the MVC route, make sure you learn and use a Direct Inject (DI) library of some sort. SpringFramework.Net is a good option.

                                          C 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