ASP.NET MVC - Why should I bother? [closed] - asp.net-mvc

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
This isn't a troll, but a genuine question.
I've spent a lot of time writing 'regular' ASP.NET but I now feel compelled to ask, should I really worry about learning MVC? Or would I, given the news coming out of //build/, be better off learning XAML?
--
Curious of Grantham

To answer a question with a question - why wouldn't you learn it?
But more seriously - and apart from the fact that it is the new sexy and many shops and developers are trying to move towards it (which should be a good reason to learn it as well):
MVC is easier to test, since the UI and model are separated.
MVC keeps you closer to the HTML. Webforms is a very leaky abstraction. If you ever tried to interact with server side generated elements using javascript, you know part of what I am talking about.

Because ASP.Net MVC allows you to develop Web Applications without dealing with an artificial object oriented abstraction layer superimposed over the web that becomes a nuisance in practice the more complex your projects becomes.

I would definitely not paint myself into a corner and learn XAML only.
The pattern for MVC is a great pattern to learn and be aware of. The MVC pattern is a common pattern that is being used in more than just the .net world so adding it to your toolbox would be beneficial to you. If you don't want to continue learning new patterns and practices, then you might as well quit coding.

Mvc falls in line with the web paradigm and the stateless nature of http transactions.
Mvc allows you to write extremely clean and maintainable markup.
I switched because I am passionate about .NET technologies but I always thought web forms was a bit too bloated for most scenarios.
It's also hugely dependent on personal preference since you can achieve the same goals with web forms or MVC...

It's just cleaner and you don't wind up, up to your waist in work around webforms code to accomplish a simple task.
I mean it seems obvious to most programmers I talk to, but if you prefer webforms, then stick with that.

Related

ASP.NET MVC Should I bother learning webforms first? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm about to foray into ASP.NET Web Development and I already know some of the very basics using Visual Web Developer and some of the implementations of Web Forms. However, instead of continuing to go down the Web Forms path and mastering VIEWSTATE and all of the ugliness that comes along with it, I've decided to go the MVC route.
At this point, I'm wondering, should I continue to learn Web Forms and then move over to MVC? Or can MVC be learned independently without knowing a thing about Web Forms? What's my best course of action?
No, don't even look at Web Forms.
MVC is modeled much closer to how HTTP actually works, which makes it much easier to work with and to build today's web applications with client side scripts. Combining Web Forms and javascript is really a pain.
MVC is also much better in that it helps getting the server side structure right. It is possible to use a model-view-presenter (or controller) separation on Web Forms too, but it has to be ducked taped on top of Web Forms.
Finally, you will have nearly no use of any WebForms knowledge when starting with MVC. It's rather the other way around, the WebForms developers I've taught MVC have to be de-brain-washed from WebForms first ;-)
While much of the excitement in the .NET community is around MVC, many of the applications out there continue to be in webforms. If for no other reason, you should continue to learn webforms so that you can convert applications over to MVC.
I've been working on MVC since the 1.0 RC, but no matter where I have gone in my consulting work, if there is .NET you almost invariably will see webforms. In fact I would dare say in the enterprise the majority of applications are still in webforms.
In my view MVC is a much better platform, and webforms will probably not be supported eventually (although Microsoft continues to say it will). Still how many of us said that VB6 will go away and got burned when we find an ancient bug and have to spend days just figuring out how things work?
We're still years away from having webforms be phased out completely, and you don't want to restrict what you can and can't do because you decided MVC is the only way (your company may not want to spend the money on converting their mega-spectacular webforms app because you don't like webforms).
More knowledge never hurts, but ignorance can burn you.

What is the most popular design-patterns in web app [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What is the most popular design pattern in web app?
I know that in asp.net mvc often used dependency injection and repository, but I want to know which additional patterns can I use in web apps. And it would be best if you give me sample of situation in which I can use patterns, or give code snippet.
Most of the design patterns we've developed as software engineers over the last few decades are still applicable for the situations they were designed for. Depending on your needs you will use most of these in web apps at some point.
http://geekswithblogs.net/subodhnpushpak/archive/2009/09/18/the-23-gang-of-four-design-patterns-.-revisited.aspx
Also below is a link to a site that shows quite a few of these patterns and has explanations / examples. They have their own product, which the site is a shop front for, but the site does have examples and contain code samples so may be worth a visit if you feel like it. most in C#
http://www.dofactory.com/Patterns/Patterns.aspx
Singleton is the most popular pattern. It is also one of best know anti-pattern (patterns that are considered to be harmful).
Every newbie uses it, because it lets you use global state, that looks like object oriented code. It also lets you avoid, that confusing dependency injection thing.
As for the "Gang of Four" book, there has been a movement by some uneducated people to remove the Singleton pattern in latest editions, but the attempts has been successfully thwarted.
Or if you have $28... C# Design Strategies with Jon Skeet
I haven't watched it but I do plan to buy it soon.
edit: IMHO the most popular design pattern in asp.net web development is the Smart UI anti-pattern ;)

I am having to improve my ASP.NET, should I just jump to MVC rather than Webforms? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I know many have asked the MVC vs Webforms question many times. My question is slightly different in that I am currently updating my skills from ASP.NET2/VB.NET to ASP.NET4/C#. I am seriously thinking that I should perhaps not waste time in upgrading my Webforms skills which are Okish, but instead put the effort into starting again with MVC. I keep looking at all the properties of ASP.NET server controls and sigh !!! I do see the benefit in just focussing on web technologies such as JS, CSS and now JQuery and CSS3.
I would be interested in your thoughts?
It sounds like you are doing a clean-slate here. You are changing languages and technologies. My advice would be to identify what you feel is the best technology going forward and learn that. You are already committing to learning something new - make it the most valuable experience you can make it.
From my perspective, I would recommend MVC. Personally I feel that this is the better platform to move forward on. You will have to add quite a few auxiliary skills such as Razor, JQuery and all the rest but it will be worth it. The bottom line though is that it is what is best for you. If your environment is better served by Webforms, then that is the best choice for you.
Six months ago I changed jobs. I was previously working at a large company that was still on .NET 2.0, VB.NET and ASP.NET WebForms. I now work at a company that uses .NET 4.0, C# and ASP.NET MVC3. So, I've been through this myself.
If you understand how the web works and want complete control over the client experience, MVC is the answer without a doubt. At my previous job I would end up pulling my hair out because I hated how WebForms prevented me from creating a page with clean markup. But, a lot of people don't know how HTTP, CSS, Javascript and HTML all fit together. WebForms was a solution to that. But, it's much more fun and performant to have complete control of what you sent to your customer/client.

ASP.NET MVC vs Ruby on Rails - market trends/demands [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
In an effort to sharpen my programming skills, I'm looking at doing some on-the-side learning / web development in either ASP.NET MVC, or Ruby on Rails. (I'm completely new to both, though I have a solid C#/Java background).
Based on current market trends and demands, which technology should I sway towards if I want to get the best return-on-investment down the road?
From my understanding there is a greater demand for ASP.NET MVC, but at the same time, there are a lot more qualified/experienced ASP.NET MVC developers.
Ruby-on-Rails on the other hand: there's less projects, but developers seems harder to find.
One concern for Ruby is that Oracle recently dropped it from the Netbeans IDE.
Since you already know C#, it will be easier to learn .NET MVC. I've also seen a lot more jobs that wanted .NET MVC than Rails.
Personal opinion
I have been an ASP.NET developer for the last 3 years and I love C#. However, my personal opinion is that .NET MVC is not as easy to use or nearly as mature as RoR. I have recently developed a passion for RoR. There are some things that you can do with .NET MVC, but are built into the culture of RoR. For example, there is a lot of focus on making the developer experience nice, Test-Driven Development, and convention over configuration (to speed up development). I also have to admit that RoR development on Windows isn't as nice. To really enjoy it, I would use a Mac or dual boot to *nix.
There is a lot of debate on this issue and it really comes down to what constraints you have and what your preference is. If you're trying to gain an career advantage, I think that there is more potential in .NET MVC (at least where I live in Utah and from what I can tell from other areas). I've personally found Ruby to be a really fun, unique language to use that makes me happy writing code.
Also, I'm pretty sure that the NetBeans IDE is not among the popular IDEs used by Rubyists. I've never heard of anyone using it for Ruby.

Why should I go for ASP.Net MVC? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have added this question as to know the different views why people are using ASP.Net MVC.
I know that it is RESTful, could you please put in more details to help me. I have checked few blogs but no good answers.
I mean which drive me to get my ASP.Net website to ASP.Net MVC.
There is loads of information on MVC out there, Have you checked out Scott Guthrie or Phil Haack's blogs. A simple google search will bring up loads of articles on pro's and con's. If you're not finding yourself interested in MVC then stick with webforms.
Have you looked at the Nerd Dinner example? Google "Nerd Dinner" and you'll find it.
Also, there is a bunch of information on REST out there. All you need to do is type in REST into google and you'll see.
It'll take some reading, sure, but as a programmer you should be used to that.
It's a steep learning curve and a massive framework and there is simply no way to explain it all in a simple question / answer.
You'll need to play for a bit, and I suggest Nerd Dinner, and then maybe come back and ask more specific questions.
Have you tried to make a W3C-WAI complient website using webforms? It's hard. MVC give you much better control over your HTML and Javascript.
I just read your question again and wanted to add another answer as it is very different to my original.
I started using the framework because I was impressed with the lack of ViewState and a page life cycle that had to reconstruct all the controls again just to get values.
I was also impressed with it's speed and extensibility.
I love that I can overload everything and add my own flavour to it. I love that I can write Views with no code behind.
I love that there is a very clear seperation of concerns and that it's very easy to maintain.
I like that's it's easy to write the code, get it working and then worry about the view. I hate webforms where everything just seems tied together with no clear deliniation of concerns.
If you Google for
advantages of asp.net mvc
you'll find hundreds of blog articles on why ASP.NET MVC can be a good tool. But none of that really helps YOU. Here's my ultra-simple decision tree for choosing the best tool:
Choose MVC if your team has a strong understanding of the web, are great developers, and/or have a background in other web frameworks besides ASP.NET. MVC is ultra simple to use if you're used to something like Ruby on Rails or even vanilla ASP, but it's best for strong developers, not junior ones.
Choose Webforms if your team is full of novice programmers and/or they have a strong background in webforms development. This is also the best choice for intranet apps.

Resources