Moving ASP.NET MVC to ASP.NET Core

of 21 /21
Moving ASP.NET MVC to ASP.NET Core Patrick Oliveros Microsoft MVP Visual Studio and Development Technologies Lessons, Experiences, Considerations

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

Page 1: 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

Page 2: Moving ASP.NET MVC to ASP.NET Core

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

Page 3: Moving ASP.NET MVC to ASP.NET Core

agenda

• Overview of ASP.NET Core

• Why Move?

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

• Differences

• Tools

• Lessons

• Considerations

• Questions

Page 4: Moving ASP.NET MVC to ASP.NET Core

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.

Page 5: Moving ASP.NET MVC to ASP.NET Core

when will rc2 come?

Page 6: Moving ASP.NET MVC to ASP.NET Core

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

Page 7: Moving ASP.NET MVC to ASP.NET Core

.net future innovation

Page 8: Moving ASP.NET MVC to ASP.NET Core

pre-requisites

• Prior ASP.NET MVC development experience

Page 9: Moving ASP.NET MVC to ASP.NET Core

asp.net core

Page 10: Moving ASP.NET MVC to 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)

Page 11: Moving ASP.NET MVC to ASP.NET Core

moving your application

Rewrite Migrate

Replace Reuse

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

Page 12: Moving ASP.NET MVC to ASP.NET Core

should we upgrade?

Rewrite Migrate

Replace ReuseBusiness

Value

Application Quality

Low High

Standard

Custom

Page 13: Moving ASP.NET MVC to ASP.NET Core

what‘s new?

• project layout

• project.json

• Startup.cs

Page 14: Moving ASP.NET MVC to ASP.NET Core

project structure

Page 15: Moving ASP.NET MVC to ASP.NET Core

project.json

Page 16: Moving ASP.NET MVC to ASP.NET Core

Startup.cs

Page 17: Moving ASP.NET MVC to ASP.NET Core

demo

Page 18: Moving ASP.NET MVC to ASP.NET Core

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

Page 19: Moving ASP.NET MVC to ASP.NET Core

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

Page 20: Moving ASP.NET MVC to ASP.NET Core

if you’re curious

• get.asp.net• tooling

• ide

• tools

• runtime

• docs.asp.net• your bible

• patience

Page 21: Moving ASP.NET MVC to ASP.NET Core

questions?