I have a web application which runs on Azure which is currently running MVC3/C#, EF6.1, .NET4.5. I would like to upgrade it to MVC5 to be:
a) Current
b) Get benefit of new features
c) Get Performance gains.
This is a part of a performance project, so hopefully there will be performance gains from doing this, especially with the upgrade to Razor 2.
What would be the recommended upgrade approach to MVC5? Should I upgrade to MVC4 to start with, then go from MVC4 to MVC5, or straight to 5?
There's a handy documented guide by Rick Anderson which he wrote to upgrade from MVC4, the same applies to you with the exception of the fact that the "Old version" of DLLs he mentions will be different to the ones that you will have, but the outcome will still be the same.
You can find the guide HERE
Related
I want to learn how to build websites using the Microsoft ASP.NET framework on a Mac running OS X 10.10.5. I will be following along with an online course that uses ASP.NET MVC 5. All of the tutorials I have read so far say to use Homebrew's aspnet/dnx repo to install ASP.NET. However, according to the GitHub page:
"This repository is obsolete and no longer used or maintained."
A link on the page redirects to .Net Core
So, my question is: how do I install ASP.NET MVC 5 on my Mac, not .NET Core?
Thanks!
If you want to start developing for .NET (including ASP.NET MVC and related technologies) on OSX, you'll need to look towards .NET Core. There are instructions there on how to install it and how to write code for it. There are good examples linked at the bottom of the page.
Please be aware that, as of this time, the related OSX technologies are not full released, so prepare for some hiccups along the way (though...it's getting better!).
You want to use https://www.microsoft.com/net/core#macos
Follow the examples here once you're set up: https://docs.asp.net/en/latest/getting-started.html
dnx is deprecated as mentioned on their GitHub page.
This repository is obsolete and no longer used or maintained.
Also, for what it's worth - dnx/dnvm were CLI tooling used to build/bootstrap .net applications. They were used during the beta/rc versions of what is now known as dotnet core. The new https://github.com/dotnet/cli has replaced dnx.
Nothing is better than using the OS with the full capabilities as Windows to work with ASP.NET or Windows Forms (really beautiful on Windows) as a student I've been trying to get this things on mac but is kind of difficult and as future engineer, if I have to get complex operations to do something, due, something is wrong, engineering solutions is to make the easiest possible solution and that one is using Windows. Less paint in the ass.
I am a little confused about the new Roslyn C# compiler.
In the beginning I assumed that this new compiler would make it possible to make changes to C# code in my ASP.NET MVC web site, and afterwards see these changes in a browser without ever have to rebuild the project/solution.
However doing some more reading, especially the new information, I am now so sure any more.
Is it possible, using Roslyn, to make changes to C# code within e.g. controller class and not having to build the project and still be able to see the changes?
Yes, Roslyn can enable you to do this, but I suggest letting the ASP.NET Team do the hard work as part of ASP.NET vNext.
From the Scott Hanselman's Blog Post on it (emphasis his):
With the next version of ASP.NET you get the power and throughput of
the .NET runtime plus the "Roslyn" compiler-as-a-service for a
"no-compile compile." That means means during development time you can
just change your C# classes and hit Refresh in the browser. It's the
power of .NET with the dynamism of a refresh-and-go development
experience.
What is the status of ASP.NET/MVC technology? Would there be big changes that affect every code base? Is it stable (backward compatible) enough to be used in real world?
Best Regards
You know, the very site you're using.. Stack Overflow, was written in MVC. That should answer your question.
Yes, it is stable. Yes, it is production ready. It is used on this very same site. Depending on your existing code base there might or might not be big changes in order to port it to ASP.NET MVC 3.
Kaveh, I banned using MVC1 in my team because I am a late adopter but a fast adopter (agency work doesn't have time for discovering bugs on behalf of the creator).
Since MVC2 (and now including MVC3), I am very very keen for people to use it. There are some things about MVC that might be difficult if you've only ever worked in web forms, but if you understand http, and html, then it has cut away a lot of the annoying bulk in web forms.
MVC will quickly overtake Webforms in popularity.
MVC
requires less code in most cases.
MVC enables very easy integration
with other client side frameworks and now defaults to using jquery as a standard (in webforms, lightweight ajax usually requried a lot of custom code and quite a bit of repetition).
MVC generates almost no
garbage in your html output.
MVC is
long overdue, stable, secure and simply a
fantastic step in the right direction
for Microsoft.
I would only suggest you tread carefully with where you get your advice on how to do things and any use of 3rd party products like StructureMap that are not supported by Microsoft. I have seen some people make big mistakes with that combination, but never because of MVC.
There was little or no breaking changes from MVC2 - MVC3 unless you'd used certain approaches. I would actually say you are less likely to get breaking changes in future but any version upgrade in any platform will require some work if the changes are worth it.
I'm not sure if it is viable to use ASP.NET MVC 2 Preview 1 already in a production system? I would like to, because it introduces several much-needed functionalities which are quirky in MVC 1.
Unfortunately I didn't find anything about that topic or roadmap information in ScottGu's release post from 7/31. Is MVC2P1 already pretty much what MVC will be (I don't know what the MVC team considers a preview)? Does anybody have better information on this?
Appreciate your input, thank you!
Based on MVC release 1, there were many previews before the final release. The original ASP.NET MVC 1 Preview 1 was very different from the final release. The final MVC 1 Preview 5 was very similar to the final release, differing very little (if at all), and I think the primary difference was bug fixes.
While MVC 2 is a refinement of MVC 1, it does have some major new initiatives (such as areas), and there is no guarantee that how the current MVC 2 Preview 1 works is how the final product will work. If you need longevity in your production system, I would really not recommend using any preview product in a production capacity unless you are willing to deal with possibly significant changes in the final release.
A side note...if you keep your production system updated with successive preview releases, that should ease your ultimate migration to the final version of MVC 2.
There are lots of improvements to the framework waiting in line for even Preview 2. For example, client-side data validation will be introduced in Preview 2 and will come with new pluggable APIs. The team is also still refining the templated view helpers. Thus, I don't think this is what MVC 2 will be.
All the stability and API change issues aside, I think Microsoft has not release the MVC 2 Preview with a license that lets you use the bits in production environment, ie a go-live license. This seems to be true at least for Preview 1.
I gather this from Scott Gu's blog comment and Phil Haack's blog comment.
We are moving from regular 2.0 webforms with no testing to TDD MVC
I'm looking to find out all the requirements for making the jump from 2.0 to 3.5 MVC.
Does SQL Server 2000 work with .net 3.5?
Does the MVC Framework come with .net 3.5?
How does AJAX work with all this stuff?
Is visual studios team suite worth the time/money?
ASP.NET MVC is an extension of ASP.NET 3.5, it is still in beta and voices says that it will be available before the end of the year.
For your other questions:
- .NET 3.5 works well on SQL Server 2000
- The MVC framework is not part of .NET 3.5
- For using AJAX with ASP.NET MVC it's better if you take a look at JQuery (or other frameworks). The support for ASP.NET Ajax is not fully available.
IMHO the real advantanges of ASP.NET MVC are:
Testability
Testability :-)
The ability to generate the HTML that you really want! No viewstate! No other noise! :-)
BTW the jump to TDD with MVC is not simple...it needs time.
HTH
To answer some of your other questions:
Is visual studios team suite worth the time/money?
How much do you have? If you are a large company with a big budget and development staff and you are focused on Microsoft technologies than I would say yes. If you answered no to any of these questions, I would go the Open Source Route (Svn or GIT, Cruise Control or Team City, MsBuild, etc.)
We are moving from regular 2.0 webforms with no testing to TDD MVC and I need to know the lowdowns as in I've never made such a jump before (not that its a huge jump but I'm a nooby programmer that has just graduated college).
This is a good time for you to learn MVC then since you don't have a deep investment in Web Forms knowledge and MVC is a much better model for someone like you to master. TDD is not something that you will learn over night but stick with it and you will become a much better programmer because of it.
I'm by no means an expert with MVC, having just started with it myself, but let's see if I can address a couple of your questions.
You absolutely can use SQL 2000 with the .NET Framework 3.5. I believe the SqlProvider still works with it. (Personally, I think it's preferable to work on at least 2005 -- I haven't had pleasure of working with 2008 yet, so I can't say anything about that.)
MVC Framework does not come with 3.5, nor Visual Studio 2008. Download it at ASP.NET. I believe it's currently at beta 1.
MVC is still a separate download.
jQuery has been announced that it will be a part of the MVC framework. (Also MS Ajax)
SQL Server 2000 is just your persistence location. It will work with any .Net framework, and is not dependent on a specific version.
I think if you are moving from Webforms to MVC that it will be more of a rewrite than a conversion. There is quite a difference in development between the two, and I think there is a larger jump than you are anticipating.
Anybody aware of a best practices or example project out there that uses ASP.NET MVC and LLBLGEN (selfservicing or adaptor)? Possibly something similar to S#arp Architecture.
I'm new to MVC and I'm constrained to using LLBLGEN.