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.
I want to ask experienced ASP.NET developers about how to climb the learning curve of ASP.NET.
I am an experienced C++ and C# developers with no web application experience.
I found ASP.NET MVC and ASP.NET are two different technologies. I just want to ask:
Whether these two technologies will co-exists or MVC will replace
ASP.NET?
If I want to learn ASP.NET MVC. Do I need to learn ASP.NET as a prerequisite?
Can you recommend some learning resources? Book? Video? Not paid Microsoft training :(
Many thanks
First of all ASP.NET is request/response pipeline. This means that you are given access to the request and response streams as well as some provisions like, session, cache, security, etc.
On top of this there are 3 frameworks in charge for generating HTML. The first and oldest is known as ASP.NET Web Forms. Because it was the only one it is sometimes called ASP.NET but this is not correct in the current state of things. ASP.NET MVC is the second one and there is a third one known as ASP.NET Web Pages. All 3 of these share the same core ASP.NET request/response pipeline and the APIs for Session, Cache... What is different is how they generate HTML.
You can check my answer to this question for more info.
Asp.Net Web Forms and Asp.Net Web Pages
And to answer your concrete question - no Web Forms is not going away. A lot of people use it, MS are releasing new versions.
Web Forms is pretty good for people with desktop background because it uses a control model familiar to desktop devs and also has something that simulates state. It also requires less knowledge of HTML, JS, CSS. ASP.NET MVC is kind of the opposite. It gives you a lot of control but requires a lot of knowledge about the web.
I personally prefer Web Forms to MVC for a variety of reasons that I will not list here but even Web Forms supporters (and especially me) will admit that Web Forms is pretty bad way to learn about the web because it abstracts a lot of things. This gives you productivity, security, etc. but can result in cases of leaky abstraction if you don't know how the underlying framework works and it is pretty easy to skip learning the details because you know stuff just works... until it breaks and then you don't know where to start.
Ultimately the choice is yours but if you start with Web Forms be sure to learn about HTTP verbs, cookies, raw response stream, http headers, html form/submit model inline css vs separate files and javascript out of the context of Web Forms and make sure you know how Web Forms automates these.
1) Whether these two technologies will co-exists or MVC will replace ASP.NET?
The official position of Microsoft today is that those two technologies will coexist. ASP.NET MVC will not replace classic ASP.NET. At least Microsoft will continue shipping new features in ASP.NET.
2) If I want to learn ASP.NET MVC. Do I need to learn ASP.NET as a prerequisite?
Not necessarily but it will be better if you learned it because as ASP.NET MVC is based on ASP.NET kernel and it will help you be a better understand the underlying technology.
3) Can you recommend some learning resources? Book? Video? Not paid Microsoft training :(
http://asp.net/mvc is a good start.
Can't say if one is going to rule the other one out.
But the easiest to learn is asp.net MVC.
Pro ASP.NET MVC 3 Framework
this is a good book to learn it.
http://www.w3schools.com/aspnet/default.asp
http://aspauthors.com/aspnetbyexample/
http://www.exforsys.com/tutorials/asp.net.html
Some links which may useful to you.
Darin gives you good answers on 1 and 3, but i disagree some on 2:
2) If I want to learn ASP.NET MVC. Do I need to learn ASP.NET as a prerequisite?
No. ASP.NET WebForms (often reffered to as just ASP.NET) has a VERY different paradigm.
While ASP.NET WebForms tries it best to hide all the web (like POST vs. GET, the HTML, how to maintain state) stuff from you, ASP.NET MVC is dependant on knowing and understanding the same things. Learning aboutWebForms' ServerControls and ViewState are of little help.
There are of course parts of the ASP.NET stack that you'll encounter in both WebForms and MVC. The different state mechanisms (session, application, cookies etc.), the Server, Reguest and Response objects, caching mechanisms, jQuery etc. are used in both places.
Related
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 am an intermediate C# developer and taught myself the basics of C# MVC, but not ASP.NET MVC. I already know classic ASP and ASP.NET though I haven't used them in many years, at least 5, since I mostly do C# desktop development at my job. The thing is, I now want to migrate all of our existing C# applications to the web..
So, I am going to start looking to hire a new developer but my question is this, since I don't really know ASP.NET MVC specifically would it be smart to look for a C# MVC developer only, since I plan to have all our internal C# apps migrated to the web? I know that ASP.NET and C#.NET can be used together but I want to try and keep everything uniform. This person will likely have to understand some C# to be able to migrate our internal apps so should I continue looking for a C# MVC developer only or do you think an ASP.NET developer will have no problem? I imagine there are plenty of ASP.NET MVC developers out there but not as many knowledgable with C#...plus it would help if they understand the not-so-difficult C# written apps when they they migrate to MVC.
Can someone explain the pros/cons or differences between the ASP.NET MVC & C# MVC or what issues I should expect to come across?
Thanks in advance!
Well, there is no C# MVC.
MVC (Model, View, Controller) is an Architect Pattern.
ASP.NET MVC is an implementation of this pattern of Microsoft ASP.NET and you can use C#, VB.Net and other languages to programming on this platform.
You also can build your application using MVC principles (for sample) in a Windows Forms application without any default implementation like ASP.NET MVC.
In general, I try to test for general programming and problem-solving skills.
If a developer cannot quickly pick up a new library or language, I probably don't want to commit to hiring them.
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.
I've read plenty of questions and articles stating that converting from ASP.NET Webforms to MVC is near enough impossible. However I think my scenario is different.
I foolishly started working a project about a year ago in Webforms, but the approach I took (as far as I understand) is very MVC like. I have disabled forms validation, don't use any postbacks, use URL re-writing and all page changes are AJAX requests that load the page contents of ContentPlaceHolders (using a small hack, overriding the RenderControl method). I've also used my own ORM and RESTful Service API in seperate projects, referenced in the website.
Now the system works really well, the pages are partially refreshed fine and the url's are changed when the ajax calls are made, so when the page is refreshed, it looks exactly the same.
Now I've just been told I need to learn MVC for a new big project (but I have to finish another project first), but I've done a bit of reading on the subject and started a few Hello World apps, and it seems that the idea of ASP.NET MVC is pretty much exactly what I have already created.
Would StackOverflow still recommend against converting the Webforms application to MVC? Are there any other benefits of converting to MVC, besides best practices?
I have a very large and old ASP.NET WebForms application (which was originally written for .NET 1.1!) and have enabled MVC to work in it, side-by-side. I've been writing new features using MVC, and converting old WebForms features to MVC controllers and views.
I ran into a few little issues concerning URL authorization and running in IIS integrated mode, but once I understood the issues they were fairly easy to work out. So nearly impossible? Certainly not!
I can't tell you if it's worth your time to convert it, since I don't know the size, scope or nature of your application, or any business constraints. However, moving to MVC has been a considerable boon to ease of development and quality (since it is easier to compartmentalize and unit test). Not to mention, the features I've written (or rewritten) in MVC are much cleaner, faster, and responsive than the WebForms equivalents.
I'm excited to move it from MVC v2 to v3, and convert to Razor views. So would I? I if I were you and I had the time, I'd do it.
Here's a question I posted that outlines the process and one of the more significant problems I had in the conversion. Migrating legacy ASP.NET to MVC 2 (RC): HttpApplication events not firing, User principal is null
I've recently converted a medium size project from WebForms to MVC. I would not recommend doing that on your first MVC project, but once you get the hang of it there really is nothing stopping you from (gradually) converting a WebForms app to MVC.
One of the major benefits I've noticed is speed. By throwing out the viewstate, databinding and web control weirdness you'll end up with a much faster application.
Of course there's also the better known benefits like testability and full control over the generated html.
WebForms and MVC share the same basic ASP.NET platform, so they are really not as incompatible as you've read.
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.
Anyone out there using the new CSHTML pages feature and is finding that they prefer this new view engine syntax over the existing ASP.NET MVC default view engine or over web forms, and if so, why? What about CSHTML gives you an advantage over MVC or web forms, or vice versa?
Just curious to hear people's take on it.
One of the benefits is that Razor views can be rendered inside unit tests, this is something that was not easily possible with the previous ASP.Net renderer.
From ScottGu's announcement this is listed as one of the design goals:
Unit Testable: The new view engine implementation will support the ability to unit test views (without requiring a controller or web-server, and can be hosted in any unit test project – no special app-domain required).
Ex Microsoft Developer's Opinion
I worked on a core team for the MSDN website. Now, I use c# razor for ecommerce sites with my programming team and we focus heavy on jQuery front end with back end c# razor pages and LINQ-Entity memory database so the pages are 1-2 millisecond response times even on nested for loops with queries and no page caching. We don't use MVC, just plain ASP.NET with razor pages being mapped with URL Rewrite module for IIS 7, no ASPX pages or ViewState or server-side event programming at all. It doesn't have the extra (unnecessary) layers MVC puts in code constructs for the regex challenged. Less is more for us. Its all lean and mean but I give props to MVC for its testability but that's all.
Razor pages have no event life cycle like ASPX pages. Its just rendering as one requested page. C# is such a great language and Razor gets out of its way nicely to let it do its job. The anonymous typing with generics and linq make life so easy with c# and razor pages. Using Razor pages will help you think and code lighter.
One of the drawback of Razor and MVC is there is no ViewState-like persistence. I needed to implement a solution for that so I ended up writing a jQuery plugin for that here -> http://www.jasonsebring.com/dumbFormState which is an HTML 5 offline storage supported plugin for form state that is working in all major browsers now. It is just for form state currently but you can use window.sessionStorage or window.localStorage very simply to store any kind of state across postbacks or even page requests, I just bothered to make it autosave and namespace it based on URL and form index so you don't have to think about it.
Everything is encoded by default!!! This is pretty huge.
Declarative helpers can be compiled so you don't need to do anything special to share them. I think they will replace .ascx controls to some extent. You have to jump through some hoops to use an .ascx control in another project.
You can make a section required which is nice.
The biggest benefit is that the code is more succinct. The VS editor will also have the IntelliSense support that some of the other view engines don't have.
Declarative HTML Helpers also look pretty cool as doing HTML helpers within C# code reminds me of custom controls in ASP.NET. I think they took a page from partials but with the inline code.
So some definite benefits over the asp.net view engine.
With contrast to a view engine like spark though:
Spark is still more succinct, you can keep the if's and loops within a html tag itself. The markup still just feels more natural to me.
You can code partials exactly how you would do a declarative helper, you'd just pass along the variables to the partial and you have the same thing. This has been around with spark for quite awhile.
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 are some good resources for learning ASP.NET MVC 2.0 (if I don't already know ASP.NET MVC 1.0)?
Tekpub (Steven Sanderson and Rob Conery) is doing a video series on MVC 2: http://tekpub.com/preview/aspmvc
Obviously the first resource I'd point you to is the official ASP MVC website here.
Perhaps the biggest and most key aspect you need to understand about ASP.NET MVC is that MVC isn't explicitly specialised for ASP.NET - it's a very wide design pattern - MVC stands for Model-View-Controller, you should really read up on MVC and gain a general understanding before you dive straight into the ASP.NET implementation.
You may want to look into buying a book that can nicely ease you into ASP.NET MVC. The reviews on amazon are something you want to take into account, as they're usually very accurate.
You can find results of a ASP.NET MVC search here.
As far as your concerns around version 1 to version 2 of ASP.NET MVC go, you shouldn't automatically dismiss any ASP.NET MVC v1 resources you come across - the chances are it's still relevant. You may wish to check out the changelist between v1 and v2 to see if anything you learn is now redundant, updated or changed in any way.
There is going to be a lot of help around for MVC 1. If you're looking to learn .NET MVC then most of .NET MVC 1 is relevant. Phil Haack is one of many who has blogged about the blogged about the release of .NET MVC 2. Importantly, he gives a link to the release notes.
Not a great deal has actually changed. Mainly to do with validation in fact. You can use the release notes as a guide. Whenever you're doing something that is 'flagged' in the release notes, then make sure you look for .NET MVC2 help specifically.
Brad Wilson has some nice posts about templates.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
There's a lot to C# & ASP.net. Where should I start? What should I not bother focusing on?
Should I learn Winforms then WPF? Ditto for webforms / Silverlight?
Should I learn ASP.MVC or classic ASP.NET? If both, which first?
In the either/or cases - which will make more sense having known the other first?
What major .NET feature(s) should I learn upfront that will open the doors of understanding to what lies ahead?
I am deliberately not mentioning fundamentals like value / reference Types, Classes, object-oriented concepts, etc since they should come first, before specifics. Here, I am interested in specifics.
[edit - added detail of what my goals are]
Good points raised - "what do I want to write"?
Basically, an intranet application that monitors a set of documents and implements a workflow as a change control process. The app will also audit the documents and report problems, self-correcting common errors. A lot of the parameters will need to be end-user definable and pluggable. The document format needs to be adaptable to different proprietary formats although they are fundamentally the same. The app will be very modular.
I'm leaning towards a web interface because the client specs & admin rights will vary - a browser is really the only thing I can count on.
As you can see, it's a bit of everything.
What do you want to write? If you want to write a Windows client-side app, look into WinForms and WPF (no real need to learn WinForms before WPF, other than the way that a lot of tutorials/books will probably compare WPF concepts with WinForms concepts). If you're looking at a web app, then ASP.NET or ASP.MVC - I don't know whether you really need the "normal" ASP.NET before MVC.
Silverlight is a bit of both, in a way - rich client probably talking to a server for interesting data etc.
Before learning any of these though, I suggest you learn the fundamentals which are one step up from the topics you mentioned - things like how text works in .NET (including encodings and regular expressions), I/O, perhaps threading. Oh, and LINQ :) There are a few books which are very good on this front:
C# 3.0 in a Nutshell
CLR via C#
Accelerated C# 2008
I had the same question when I moved from Classic ASP to .NET 2.0... .NET is huge: so where should I start?
What i did was put my hand dirty and started slow, take a project (in my case was a very important project - a finance web app that would cover and automatize all 4 persons work) and start to implement, every time I didn't know how to accomplish something or I had an idea in ASP but not in ASP.NET I would go to www.asp.net or 4GuysFromRolla website and search for examples, copy/paste, understand what I was doing and ... continue to the next wall.
Took me 6 month to have everything up and running but was worst it! now that passed almost 3 years I know I did the right choice but back then ... I was scared!
now... you refer .NET 3.5, it has a bunch of new things like extensions, linq, etc... I would go by the simple part and when the times comes, "maybe I can use LINQ here, let me search how to use it on this part"
hope you follow your own path and buy some reference book so you can read something new and have a reference whenever you need "ahhh, I read this somewhere in the book, let me search... where was it?"
I bought Professional ASP.NET from Wrox as a reference book, and even today I go there to see new things, even when I'm started to use .NET 3.5, the idea is there, there is only a new way to accomplishing it.
I would recommend learning whatever you are interested in. Pick a "pet project" and try to create it using one of the technologies you listed. If you enjoy making windows desktop style applications, then go with WPF or WinForms. If you enjoy the idea of making rich desktop style applications on the web, then go for Silverlight. There will be a ton of overlap.
But in terms of core .NET Development, if I were starting off fresh, I'd recommend learning ASP.NET MVC first, as it will give you a good basis for things like: Designing for Testability, coding without ViewState, SEO-friendly URLs, etc..
It depends (awful response, I know, but let me explain)
Are you going to do any windows forms development? You mention C# and ASP.NET, so to me it sounds like you are doing Web-based programming. If so, skip Winforms and WPF for now.
Silverlight is worth checking out, but it is still fairly new so I'd make it a 2nd priority.
Now to the MVC or Web forms question. MVC gives you total control over the HTML, CSS, and Javascript that is emitted, but requires more work, whereas Web forms gives you ease of development but without 100% control over the markup that is emitted. You can do lots with Web forms and the introduction of MVC doesn't threaten the future of Web forms. MVC is very new so things are changing but eventually I see them both living happily side by side.
Regarding learning .NET in general, I've heard great things about a book called CLR via C# which will go over all the fundamentals and inner workings of .NET.
Definitely learn the fundamentals (like you already mentioned) like how the CLR handles types, garbage collections, security, "AppDomains", threading, etc.
For ASP.NET, learning the "page life cycle" and "control life cycle" are essential. Also, session state and data binding are probably good things to understand.
I wouldn't worry about WinForms, WPF, or Silverlight for now. They won't directly help with ASP.NET and are relatively easy to pickup after you've learned the CLR and .NET Framework fundamentals.
What is your primary objective - learning for fun or hireability? If you're a student and years out from worrying about a career in programming then I will strongly echo the idea of picking a project about something relatively simple that you're interested in and then just doing it.
Say you want to create an application that will track your video games collection. First you'll need a way to store the information - this will be a combination of c# and some persistence strategy like mySql or SQL Server or XML.
Then you'll need a way to present your collection and interact with it - adding, deleting and editing objects and persisting the changes. In this step, use every presentation technology that you're interested in - WPF, WinForms, Asp.net, asp.net with MVC, Silverlight - whatever you're interested in. As you learn to do one, you'll learn techniques you'll need to use in the next.
Don't pick just one - play with all the ones you have any interest with at all.
Now, if you're primarily interested in what skills will get you hired the quickest, I'd say look at your market, but it's probably going to be straight ASP.Net skills that will be the most in demand - or at least that's what it looks like from my perspective. In a couple of years it may well be ASP.Net MVC skills. In some markets though you'll have an easier chance of getting VB6 work. It all depends on where and when you're looking.
I highly recommend the following books, for learning about whats new in ASP.NET 3.5
ASP.NET MVC 1.0 Website Programming
Professional ASP.NET MVC 1.0
ASP.NET 3.5 Website Programming
Sometimes videos might help. I learnt everything I needed to know to start off with from a set of video tutorials from Total Training which is here. Pricey if you buy the disks but there is a cheaper online only option.