Moving ASP.NET MVC to ASP.NET Core

Post on 12-Apr-2017

624 views 3 download

Transcript of Moving ASP.NET MVC to ASP.NET Core

Moving ASP.NET MVC to ASP.NET Core

Patrick Oliveros

Microsoft MVP Visual Studio and Development Technologies

Lessons, Experiences, Considerations

who am i?

• software developer for > 10 years• corporate and startup environments

• microsoft mvp for visual studio and development technologies for • formerly as an asp.net/iis mvp

• strong interest in developing web applications• working on the backend, mostly

• performed application website migrations

agenda

• Overview of ASP.NET Core

• Why Move?

• Demo• ASP.NET MVC vs. ASP.NET Core

• Differences

• Tools

• Lessons

• Considerations

• Questions

disclaimer

This material was prepared using RC1 (Release Candidate

1) of ASP.NET Core 1.0. As such, some content might be

changed or possibly be irrelevant or re-implemented

different from what would be presented.

when will rc2 come?

when will rc2 come?

• TL;DR - "the guts are changing for the better and it's taking longer than we thought it would to swap out the guts.“

• Key high-level themes:• Replatform on top of the .NET CLI

• Movement to a new netstandard*

• Polishing

• Stress, security, performance

• Performance optimization

.net future innovation

pre-requisites

• Prior ASP.NET MVC development experience

asp.net core

which to choose?

To be clear, ASP.NET 4.6 is the more mature platform. It's battle-tested and released and available today. ASP.NET Core 1.0 is a 1.0 release that includes Web API and MVC but doesn't yet have SignalR or Web Pages. It doesn't yet support VB or F#. It will have these subsystems some day but not today.

- Scott Hanselman(http://www.hanselman.com/blog/ASPNET5IsDeadIntroducingASPNETCore10AndNETCore10.aspx)

moving your application

Rewrite Migrate

Replace Reuse

https://blogs.msdn.microsoft.com/goto100/2008/11/03/rewrite-vs-migrate-vs-reuse-vs-replace/

should we upgrade?

Rewrite Migrate

Replace ReuseBusiness

Value

Application Quality

Low High

Standard

Custom

what‘s new?

• project layout

• project.json

• Startup.cs

project structure

project.json

Startup.cs

demo

why move?

• Because it is cool! (cross platform, etc)• Performance benefits

• Desire for platform/server agnostic hosting• Independent from other applications

• Portability

• Cost considerations• Visual Studio is expensive!

• Windows (10) is expensive!

• I already have existing Linux hosting options

considerations

• If in case you’re still with ASP.NET Web Formso never mind.

o seriously.

• No tooling that will move existing ASP.NET MVC projects/solutions to the new structure

• MVC application is in Visual Basic .NET

• Consumes 3rd party tools

• Non-cross platform is still an option

• Breaking/platform changes

if you’re curious

• get.asp.net• tooling

• ide

• tools

• runtime

• docs.asp.net• your bible

• patience

questions?