Future plans to consider for asp.net mvc 5.2 web application, with releasing asp.net mvc6 (vnext) - asp.net

I need to get any ideas of how i should be managing our previous asp.net MVC 5.2 web application.. now i am using asp.net mvc-5.2 with entity framework 6.0. and i want to start phase-2 for some of these projects. so should i consider upgrading my mvc 5.2 to be using mvc6 (vnext) first ? and will there be any migration plans ?
second question , when is it expected for vnext to be released? or it is has been officially released ?
third question, will i be able to create a vnext project inside VS 2012 ?

I would simply recommend following the standard best practice of n-tier architecture and keeping logic related to things like querying a database in class libraries. MVC 6 is drastically different from previous versions, so there's no easy migration. You'll basically need to start a brand new project and move over relevant code where you can and spend a good bit of time converting code. For example, child actions are gone and have been replaced with view components. You'll need to go through any child actions you're using currently and create view components out of them. As I said, making sure your current MVC project is as thin as possible (by factoring out code into class libraries and such) will go a long way in reducing the amount of code you need to move/change.
As far as I'm aware, no release date has been set, but at least in the alpha and beta phases of Visual Studio 2015 and ASP.NET 5/MVC 6, Windows 10 has been required, so there won't be an official release likely until Windows 10 is public. However, Visual Studio 2015 has reached release cadidate stage, so I'd say it's definitely close, either launching alongside Windows 10 or shortly after.
Kind of answered this in point 2, but ASP.NET 5/MVC 6 will require VS2015. As far as I'm aware, there's no plans to add support to lesser versions. A lot of that has to do with Rosyln, the new .NET compiler. Trying to bootstrap previous versions of VS with support for an entirely new compiler/syntax engine would be a monstrous task. However, VS has been on an MSDN subscription model for many versions now and as long as you're a current subscriber you can always download the latest version for free. If you're not an MSDN subscriber, you can still download the community edition of VS 2015 for free. It's missing a lot of the more advanced VS features, but it's still totally sufficient for web development work.

Related

When Web Forms won't be supported from Microsoft

We are going to create new application using Web Forms and we want to know when Web Forms (ASPX pages) Technology going to be obsolete or not be supported from Microsoft.
https://dotnet.microsoft.com/platform/support/policy/aspnet
So WebForms is part of .Net Framework.
https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
“.NET Framework 4.8 is the last version of .NET Framework. .NET Framework is serviced monthly with security and reliability bug fixes. .NET Framework will continue to be included with Windows, with no plans to remove it. You don't need to migrate your .NET Framework apps, but for new development, use .NET 5 or later.”
So it's baked into Windows at this point if you want to use it. Everyone will discourage you from using it, as you are essentially mastering out-of-vogue and increasingly obsolete technology, and maybe not doing your career any favors. But if, like me, you have some huge WebForms app for which there is no time nor money to rewrite, then you can at least rest assured that it will continue to run on Windows.
Microsoft will be continuing to support ASP.Net WebForms for some time to come since much of it's functionality is based into the core .Net Framework. There are several locations to get information on which ASP.Net features/technologies such as ASP.Net MVC 4 will be going out of support soon. https://www.asp.net/support lists many of the technologies. For ASP.Net Webforms, it's tied to the Framework versions as best as I understand. https://support.microsoft.com/en-us/lifecycle/search?alpha=.net%20framework
Support policy for ASP.NET is documented here: https://dotnet.microsoft.com/platform/support/policy/aspnet

Is there any disadvantage in a long term to develop .Net core app which targets Net461?

I am trying to generate Well formatted Excel files from .Net Core and found ClosedXML library which runs only on .Net 4.61
I already tested the following libraries which work on .Net Core
OpenXML - Too many codes for a simple task and difficult for me to use
SyncFusion - Public / Government Organisation cannot use for free.
I changed the target to Net461, do the dotnet restore and all my codes are still running as usual and I could generate the Excel file with ClosedXML too.
What I would like to know is, is it a good approach? This is not a one-off small project and I am likely to maintain this website for another 3-4 years at least.
Is there any potential to lose the new functionalities and not able to use new Libraries from .Net Core in the future?
Or should I create another separate website running on Net461 and call that URL from my .Net Core app? So, I don't need to worry about losing new .Net Core functionalities in the future.
There is obviously no way to know the future, but the biggest thing you get with .Net Core over the full framework is the ability to run the app cross platform. So if cross platform isn't a concern, then going with the full framwork shouldn't be an issue. There is no question that the full framework will be fully supported for the 3-4 year time horizon you mentioned, in fact I think most developers would feel comfortable using the full framework even for a project with a much longer time horizon.
With regard to missing out on new .Net Core features, many of the features can be accessed even from libraries compiled for the full framework. For example I use the new encryption libraries found in Microsoft.AspNetCore.Cryptography (that are part of .Net Core) from my full framework class library. The net .Net Core libraries are just Nuget packages and as such can be referenced from non .Net Core projects.

How to port to .NET core?

I was looking for possibilities for porting some web projects from Windows .NET framework to Ubuntu linux using open source .NET core
After a lot of struggle with Mono, which I have almost gave up. I was looking at .NET core as a new hope. Have anyone of us ported from .NET to .NET core?
If yes, can the possible problems like the ones I faced with Mono be shared?
Moving from .NET to .NET Core is a huge move, especially if you're going to take advantage of Core. There is not currently a one click port, and I doubt you'll ever get a one-click migration like migrating from a VS 2013 project to a VS 2015 project. The entire startup flow is different, and to automate switching to that would be incredibly difficult. For now, the way I am looking at it is that moving to .NET Core is essentially a rewrite. As to whether that is worth it to you for your project - well that's really hard to say and also probably not well suited to that site.
That said, if you do rewrite you can probably bring along a lot of your business logic. You just will need to redo a lot of the other structure.
There's no easy way to move a project from .NET Framework to .NET Core. Possibly you'll need to rewrite or start from scratch.
There are some major differences between two
Format of configuration files (web.config vs appsettings.json)
Used libraries
Startup files (Global.asax vs Startup.cs)
Lack of static objects in .Net Core. Like Session and Application
objects - which is a good thing btw.
Many of the .Net Framework libraries are dependant on
app.config/web.config files

Downgrade/convert mvc 4 to mvc 3

I know this is a rather odd question, please don't flame me :)
I have a concrete need to "downgrade" a current Asp.Net Mvc 4 (net framework 4.5) application to Asp.Net Mvc 3 (net framework 4.0) because our shared hosting provider does not support .Net 4 (I know it's crazy considering it's been in retail since 12 Aprli 2010 and first beta came out in May 2009 but it's not the point of the post).
Is there any tool, or guide, or anything that could help in the process? I'm getting a bit lost because I upgraded many
applications
but I never had to downgrade one.
I have use some of the features like begincollectionitem which may not be direct compatible to mvc3
I doubt you'll find an official guide or tool, you'll have to do it manually. Personally, I would do the following:
Start a new MVC 3 Project (MVC3 is available via nuget)
Copy your files from one to the other
Fix any compilation issues
Use the publish site feature to publish somewhere locally (this will hopefully find compilation issues in your Razor views which don't get found during the project build)
Test the site fully!
Sorry it's not more helpful, but I don't think people generally design for the downgrade process.

Can i have some advice if i should start using asp.net mvc 4 instead of asp.net MVC 3

i already built some web applications using asp.net MVC 3 and they work well, and currently i am in the state of starting a new web application for a medical clinic ; but i need to have some advice if i should consider using asp.net MVC 4 beta version instead of asp.net MVC 3?
thanks in advance for any help and suggestions ?
BR
Personally I would start in MVC3 and then upgrade the project to v4 when it's RTMd. Previous versions have had some issues when migrating from Betas (altho see update below).
You can be sure, however, that as with previous version increments, a swift and easy upgrade path will be available (usually there's a project conversion tool released at the same time).
I have a project I'm working on right now, and if I get to the web layer before v4 is finished, I'll be starting in v3 first.
I suppose it does depend, however, on whether any of the new features, such as the adaptive rendering via Mobile views (or indeed the Web API), are intrinsic to your solution. Just don't release on a beta platform :)
Update July 2012
I ended up getting to the web layer of my current project before v4 RTM so decided to go to the RC release first; then the nightly nuget packages for Web API support.
Apart from editor issues (that are documented), I've found no issues, even with integrating a whitelabelling extensibility library I've written, for MVCs 1-3, that operates at a very low level.
Would I have migrated early if I'd not needed the numerous benefits that the Web API provides? Probably not.
But as it is, I'm glad I did :-)
Unless you have a specific reason to use MVC 4 (perhaps a feature that isn't in MVC 3) I would stray away from using beta software for a customer/client. Who knows what bugs/issues you'll have to work around when developing the application or when you upgrade from beta to general release.
There's a reason it's in beta.
As Mackie says.. unless you need a specific feature in MVC4, i'd stay with MVC3. MVC4 is mostly just new features, and has very few changes in the way MVC itself works.
I disagree with Mackie in his comment about "there's a reason it's in beta", in fact MVC4 is very stable and has a go-live license to allow you to use it in production code. It's just that things may still change before final, which is tied more to VS11 than how stable it is.
For my thesis I want to develop an application in ASP.NET MVC, so a few weeks ago I had to make the same decision like you. This is my conclusion:
I should advice to use MVC3 (because it's stable) for your business projects.
There are some known issues ( http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815 ) in MVC4 beta, so it would be a waste of time to get stuck one day because of beta problems.
When the time is there you'll be able to convert MVC3 with ease to MVC4. So don't hesitate and choose for MVC3 for now. You can decide later on if you want to upgrade or not.
At the link below you'll see how to easily upgrade from MVC3 to MVC4 at this moment: http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806

Resources