Religious question - MVC benefits vs ASP.NET?
-
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
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
-
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
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.
-
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
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
-
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
-
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
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
-
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
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
-
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
-
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.
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
-
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
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
-
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.
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
-
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
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
-
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
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
-
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
-
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
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".
-
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
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}.
-
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
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.
-
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
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
-
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".
-
That's what my senior dev keeps reiterating, and then starts talking about knockout, json, boostrap, css and other (to me) esoteric stuff.
Never underestimate the power of human stupidity RAH
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..."
-
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