SlideShare ist ein Scribd-Unternehmen logo
1 von 59
© Betabit Nederland B.V.
Oscar van Tol
o.van.tol@betabit.nl
@oscarvantol
Rick van den Bosch
r.van.den.bosch@betabit.nl
@rickvdbosch
.NET Core
Not your daddy’s DOT NET
© Betabit Nederland B.V.
Who’s who?
Oscar van Tol Rick van den Bosch
© Betabit Nederland B.V.
The plan
.NET Core - the basics
Why the reboot
.NET Standard
Tooling *
EF Core *
Caffeine
ASP.NET Core
ASP.NET Core – Web API *
ASP.NET Core – MVC *
What’s next
* == code!
© Betabit Nederland B.V.
.NET Core - the basics
© Betabit Nederland B.V.
.NET Core
“.NET Core is a general purpose development platform maintained by Microsoft and the
.NET community on GitHub. It is cross-platform, supporting Windows, macOS and Linux,
and can be used in device, cloud, and embedded/IoT scenarios.”
source: https://docs.microsoft.com/en-us/dotnet/articles/core
© Betabit Nederland B.V.
What is .NET Core 1/2
• Flexible deployment: Can be included in your app or installed side-by-side user- or
machine-wide.​
• Cross-platform: Runs on Windows, macOS and Linux; can be ported to other OSes.
The supported Operating Systems (OS), CPUs and application scenarios will grow
over time, provided by Microsoft, other companies, and individuals.​
• Command-line tools: All product scenarios can be exercised at the command-line.
© Betabit Nederland B.V.
What is .NET Core 2/2
• Compatible: .NET Core is compatible with .NET Framework, Xamarin and Mono, via
the .NET Standard Library.​
• Open source: The .NET Core platform is open source, using MIT and Apache 2
licenses. Documentation is licensed under CC-BY. .NET Core is a .NET
Foundation project.​
• Supported by Microsoft: .NET Core is supported by Microsoft, per .NET Core
Support
© Betabit Nederland B.V.
© Betabit Nederland B.V.
Why the reboot
.NET Framework was too monolithic​
Too many dependencies (preventing cross-platform)​
Maintaining compatibility slowed down Framework development​
Removed dependency on OS​
Faster startup​
New runtime next to full framework (maintaining compatibility)
© Betabit Nederland B.V.
.NET Standard
Multiple runtimes:​
• Reusing code?​
• Dependencies?​
• Creating libraries?​
• OS related stuff? (for example: disk access)​
© Betabit Nederland B.V.
© Betabit Nederland B.V.
.NET Standard
We have Portable Class Libraries (PCL) for that. Right?
• Target ‘least common denominator’ API for platforms
• Not a sustainable model
© Betabit Nederland B.V.
.NET Standard
• A version of the .NET Standard is a definition of a collection of standard Api’s.​
• A runtime can support one or more versions of the .NET Standard.​
• A library can target one or more versions of the .NET Standard.​
© Betabit Nederland B.V.
.NET Standard: versions
© Betabit Nederland B.V.
So what do we do with PCL?
© Betabit Nederland B.V.
.NET Standard 2.0
© Betabit Nederland B.V.
.NET Core SDK
Command line tools
Libraries & runtime
dotnet driver (CLI)
Primary layer
Cross platform
© Betabit Nederland B.V.
DEMO
.NET Core Tooling
© Betabit Nederland B.V.
dotnet.exe
new
migrate
restore
run
build
test
publish
pack
Meer info: http://bit.ly/nyddn-cmds
© Betabit Nederland B.V.
EF Core
© Betabit Nederland B.V.
EF Core
“EF Core is a lightweight, extensible, and cross-platform version of the popular Entity
Framework data access technology. It is an object-relational mapper that enables .NET
developers to work with a database using .NET objects. It eliminates the need for most of
the data-access code that developers usually need to write”
source: https://docs.microsoft.com/en-us/ef/core
© Betabit Nederland B.V.
EF Core
Lightweight
Extensible
Cross-platform
© Betabit Nederland B.V.
EF Core
Not complete!
EF6.x is still alive and will continue to be updated.
https://github.com/aspnet/EntityFramework6
“very much a v1 product”
Not Supported: Complex/value types, Simple type conversions, Spatial data types,
Many-to-many without join entity, Lazy loading, Simple ccommand interception, Stored
procedure mapping, Update model from database, Seed data, …
© Betabit Nederland B.V.
Which one is right for you?
EF6.x most suitable for most applications
Use EF Core:
• In new applications that do not require missing features
• In applications that target .NET Core
“You should view the move from EF6.x to EF Core as a port rather than an upgrade”
© Betabit Nederland B.V.
DEMO
Entity Framework Core
© Betabit Nederland B.V.
Hands on with .NET Core?
Workshop .NET Core
@Betabit Utrecht
Hands on
Registration form available on the tables
© Betabit Nederland B.V.
WINACTIE
Wat: Security workshop
Waar: Betabit Utrecht
Wanneer: 5 & 6 juni 2017
Lever het formulier vandaag in!
Let op! Maandag 5 juni is 2de pinksterdag
© Betabit Nederland B.V.
Lets have a <br>
Warning: we really respect your privacy and EU law requirements require us to inform you that this caffeine break will contain cookies. [accept]
© Betabit Nederland B.V.
ASP.NET Core
© Betabit Nederland B.V.
ASP.NET Core
“ASP.NET Core is a new open-source and cross-platform framework for building modern
cloud based internet connected applications, such as web apps, IoT apps and mobile
backends.”
source: https://docs.microsoft.com/en-us/aspnet/core
© Betabit Nederland B.V.
ASP.NET Core
ASP.NET Core != .NET Core
Can target .NET Core and Full Framework
Develop & run on Windows, Mac or Linux
© Betabit Nederland B.V.
Why ASP.NET Core?
ASP.NET 1st version: 15 years ago
Lots of added & evolved capabilities
Much leaner and more compact
No longer based on System.Web.dll (but on NuGet packages)
Tighter security
Reduced servicing
Improved performance
Decreased costs in pay-per-use model
© Betabit Nederland B.V.
ASP.NET Core – Startup
Startup class is required
Constructor can accept dependencies provided by DI
IHostingEnvironment
ILoggerFactory
Must include Configure method
Adding middleware
Can include ConfigureServices
Called before Configure
Setup DI etc.
© Betabit Nederland B.V.
ASP.NET Core – Middleware
Assembled into pipeline
Handles requests and responses
Calls next or short-circuits the chain
In-line or reusable
Executed in order!
Critical to security, performance
and functionality
© Betabit Nederland B.V.
ASP.NET Core – Middleware example
© Betabit Nederland B.V.
What’s ‘wrong’ here…???
© Betabit Nederland B.V.
ASP.NET Core – Configuration
Configure app based on a list of name-value pairs
Can be read at runtime from multiple sources
Supports
• File formats (INI, JSON and XML)
• Command-line arguments
• Environment variables
• In-memory .NET objects
• An encrypted user store
• Azure Key Vault
• Custom providers (install or create)
© Betabit Nederland B.V.
ASP.NET Core – Options pattern
Uses custom options classes to represent a group of related settings
Enables using decoupled classes for each feature
Interface Segregation Principle (ISP)
Separation of Concerns
IOptionsSnapshot supports reloading configuration on file change
© Betabit Nederland B.V.
ASP.NET Core – Hosting
ASP.NET Core requires a host in which to execute
Must implement IWebHost
Typically created using WebHostBuilder
Responsible for application startup and lifetime management
© Betabit Nederland B.V.
ASP.NET Core – Web server
ASP.NET Core runs with an in-process HTTP Server implementation
Listens for HTTP Requests
Surfaces them to application as sets of request features composed into an
HttpContext
ASP.NET Core ships with two server implementations:
• Kestrel (Cross-platform, based on Libuv)
• WebListener (Windows-only, based on Http.Sys)
© Betabit Nederland B.V.
ASP.NET Core – Kestrel
Included by default
Internal facing: just Kestrel
Internet facing: IIS, Nginx or Apache as reverse proxy
© Betabit Nederland B.V.
ASP.NET Core – WebListener
Internal facing: WebListener
Internet facing (without IIS): WebListener
Internal facing: Kestrel recommended, unless WebListener features needed
© Betabit Nederland B.V.
ASP.NET Core Web API
What's new?
• Nothing, it's gone
• Use MVC 6 for REST
• No major issues migrating (Microsoft.AspNetCore.Mvc.WebApiCompatShim)
• Heads up: Json formatting now default in camelCase
© Betabit Nederland B.V.
DEMO
ASP.NET Core Web API
© Betabit Nederland B.V.
ASP.NET Core MVC
What’s new?
• wwwroot
• Razor syntax
• Tag helpers
• Dependency Injection in Views
• …
© Betabit Nederland B.V.
wwwroot
Meant for static files
Add static file middleware
URLs for static content are relative to wwwroot
Clean separation between code and static files
© Betabit Nederland B.V.
Razor & Tag helpers
© Betabit Nederland B.V.
DI into views
@inject (adds a ‘property’ to your view
Can be usefull for View-specific services (localization)
Maintain a Separation of Concerns
(Most of the) data your view displays should be passed in from the controller
Can be used to override services
Heads-up: register services you want to inject
© Betabit Nederland B.V.
DEMO
ASP.NET Core MVC
© Betabit Nederland B.V.
ASP.NET or ASP.NET Core?
© Betabit Nederland B.V.
Recap
.NET Core
Command line interface
.NET Standard
Entity Framework Core
ASP.NET Core
© Betabit Nederland B.V.
FINAL DEMO
© Betabit Nederland B.V.
FX: To Core or not to Core?
.NET Core .NET Framework
Cross-platform needs Currently using .NET
Targeting micro-services 3rd party libraries / NuGet packages
Using Docker Techologies not (yet) supported
High performance & scalability
Side by side .NET versions
© Betabit Nederland B.V.
What's next
source: https://github.com/dotnet/core/blob/master/roadmap.md
© Betabit Nederland B.V.
Did you know?
© Betabit Nederland B.V.
Resources
.NET Core Source Browser https://source.dot.net
dotnet.exe commands http://bit.ly/nyddn-cmds
Roadmap https://github.com/dotnet/core/blob/master/roadmap.md
© Betabit Nederland B.V.
Bedankt voor je aandacht
© Betabit Nederland B.V.
© Betabit Nederland B.V.

Weitere ähnliche Inhalte

Was ist angesagt?

.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6aminmesbahi
 
.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1aminmesbahi
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework OverviewDoncho Minkov
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewShahed Chowdhuri
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version Historyvoltaincx
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewShahed Chowdhuri
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Coremohamed elshafey
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net frameworkAshish Verma
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Steven Smith
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentalsHosein Mansouri
 
Full session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet coreFull session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet corefizmhd
 
NestJS - O framework progressivo
NestJS - O framework progressivoNestJS - O framework progressivo
NestJS - O framework progressivoWender Machado
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxMalla Reddy University
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# IntroductionSiraj Memon
 
DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarCodefresh
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net frameworkAnsi Bytecode
 

Was ist angesagt? (20)

.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6
 
.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1.NET Core, ASP.NET Core Course, Session 1
.NET Core, ASP.NET Core Course, Session 1
 
.NET Framework Overview
.NET Framework Overview.NET Framework Overview
.NET Framework Overview
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Dotnet Frameworks Version History
Dotnet Frameworks Version HistoryDotnet Frameworks Version History
Dotnet Frameworks Version History
 
ASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with OverviewASP.NET Core MVC + Web API with Overview
ASP.NET Core MVC + Web API with Overview
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
Microsoft dot net framework
Microsoft dot net frameworkMicrosoft dot net framework
Microsoft dot net framework
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
.Net platform .Net core fundamentals
.Net platform .Net core  fundamentals.Net platform .Net core  fundamentals
.Net platform .Net core fundamentals
 
Full session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet coreFull session asp net mvc vs aspnet core
Full session asp net mvc vs aspnet core
 
Jenkins
JenkinsJenkins
Jenkins
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
NestJS - O framework progressivo
NestJS - O framework progressivoNestJS - O framework progressivo
NestJS - O framework progressivo
 
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptxUnit 1 - TypeScript & Introduction to Angular CLI.pptx
Unit 1 - TypeScript & Introduction to Angular CLI.pptx
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
.NET and C# Introduction
.NET and C# Introduction.NET and C# Introduction
.NET and C# Introduction
 
DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm Webinar
 
Difference between .net core and .net framework
Difference between .net core and .net frameworkDifference between .net core and .net framework
Difference between .net core and .net framework
 
Visual studio
Visual studioVisual studio
Visual studio
 

Ähnlich wie .Net Core - not your daddy's dotnet

Global Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit UtrechtGlobal Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit UtrechtDaniël te Winkel
 
Porting Projects to .NET 5
Porting Projects to .NET 5Porting Projects to .NET 5
Porting Projects to .NET 5Immo Landwerth
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRainingsunil kumar
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CoreMalte Lantin
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CoreMalte Lantin
 
Rcs project Training Bangalore
Rcs project Training BangaloreRcs project Training Bangalore
Rcs project Training BangaloreSunil Kumar
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication developmentKBA Systems
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication developmentKBA Systems
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and futureBishnu Rawal
 
Visual studio 2015 and .net core 5 – get ready to rumble
Visual studio 2015 and .net core 5  – get ready to rumbleVisual studio 2015 and .net core 5  – get ready to rumble
Visual studio 2015 and .net core 5 – get ready to rumbleTadeusz Balcer
 
.Net framework vs .net core a complete comparison
.Net framework vs .net core  a complete comparison.Net framework vs .net core  a complete comparison
.Net framework vs .net core a complete comparisonKaty Slemon
 
NET app modernization and Microsoft Azure.pptx
NET app modernization and Microsoft Azure.pptxNET app modernization and Microsoft Azure.pptx
NET app modernization and Microsoft Azure.pptxNishitPatel409228
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdfAbanti Aazmin
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?Zend by Rogue Wave Software
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9Jürgen Gutsch
 
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservicesDaniel Fisher
 
DotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsDotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsSajeetharan
 
c#.Net Windows application
c#.Net Windows application c#.Net Windows application
c#.Net Windows application veera
 

Ähnlich wie .Net Core - not your daddy's dotnet (20)

Global Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit UtrechtGlobal Azure Bootcamp 2017 at Betabit Utrecht
Global Azure Bootcamp 2017 at Betabit Utrecht
 
Porting Projects to .NET 5
Porting Projects to .NET 5Porting Projects to .NET 5
Porting Projects to .NET 5
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRaining
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net Core
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net Core
 
Rcs project Training Bangalore
Rcs project Training BangaloreRcs project Training Bangalore
Rcs project Training Bangalore
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication development
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication development
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and future
 
【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10【BS1】What’s new in visual studio 2022 and c# 10
【BS1】What’s new in visual studio 2022 and c# 10
 
Visual studio 2015 and .net core 5 – get ready to rumble
Visual studio 2015 and .net core 5  – get ready to rumbleVisual studio 2015 and .net core 5  – get ready to rumble
Visual studio 2015 and .net core 5 – get ready to rumble
 
.Net framework vs .net core a complete comparison
.Net framework vs .net core  a complete comparison.Net framework vs .net core  a complete comparison
.Net framework vs .net core a complete comparison
 
Cloud-Native .NET
Cloud-Native .NETCloud-Native .NET
Cloud-Native .NET
 
NET app modernization and Microsoft Azure.pptx
NET app modernization and Microsoft Azure.pptxNET app modernization and Microsoft Azure.pptx
NET app modernization and Microsoft Azure.pptx
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9
 
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
2005 - .NET SummerCamp: Web developmentwith IIS & ASP.NET webservices
 
DotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsDotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcements
 
c#.Net Windows application
c#.Net Windows application c#.Net Windows application
c#.Net Windows application
 

Mehr von Rick van den Bosch

Configuration in azure done right
Configuration in azure done rightConfiguration in azure done right
Configuration in azure done rightRick van den Bosch
 
Getting started with Azure Cognitive services
Getting started with Azure Cognitive servicesGetting started with Azure Cognitive services
Getting started with Azure Cognitive servicesRick van den Bosch
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyRick van den Bosch
 
Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Rick van den Bosch
 
SAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceSAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceRick van den Bosch
 
Securing an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectorySecuring an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectoryRick van den Bosch
 
Azure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeAzure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeRick van den Bosch
 
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridTechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridRick van den Bosch
 
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”Rick van den Bosch
 
Take control of your deployments with Release Management
Take control of your deployments with Release ManagementTake control of your deployments with Release Management
Take control of your deployments with Release ManagementRick van den Bosch
 

Mehr von Rick van den Bosch (12)

Configuration in azure done right
Configuration in azure done rightConfiguration in azure done right
Configuration in azure done right
 
Getting started with Azure Cognitive services
Getting started with Azure Cognitive servicesGetting started with Azure Cognitive services
Getting started with Azure Cognitive services
 
From .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacyFrom .NET Core 3, all the rest will be legacy
From .NET Core 3, all the rest will be legacy
 
Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)Getting sh*t done with Azure Functions (on AKS!)
Getting sh*t done with Azure Functions (on AKS!)
 
SAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud ConferenceSAFwAD @ Intelligent Cloud Conference
SAFwAD @ Intelligent Cloud Conference
 
Securing an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active DirectorySecuring an Azure Function REST API with Azure Active Directory
Securing an Azure Function REST API with Azure Active Directory
 
Azure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data LakeAzure Lowlands: An intro to Azure Data Lake
Azure Lowlands: An intro to Azure Data Lake
 
An intro to Azure Data Lake
An intro to Azure Data LakeAn intro to Azure Data Lake
An intro to Azure Data Lake
 
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event GridTechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
TechDays 2017 - Going Serverless (2/2): Hands-on with Azure Event Grid
 
Dude, Where's my Server?
Dude, Where's my Server?Dude, Where's my Server?
Dude, Where's my Server?
 
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
TechDays 2016 - Case Study: Azure + IOT + LoRa = ”Leven is Water”
 
Take control of your deployments with Release Management
Take control of your deployments with Release ManagementTake control of your deployments with Release Management
Take control of your deployments with Release Management
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...software pro Development
 

Kürzlich hochgeladen (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...How to Choose the Right Laravel Development Partner in New York City_compress...
How to Choose the Right Laravel Development Partner in New York City_compress...
 

.Net Core - not your daddy's dotnet

  • 1. © Betabit Nederland B.V. Oscar van Tol o.van.tol@betabit.nl @oscarvantol Rick van den Bosch r.van.den.bosch@betabit.nl @rickvdbosch .NET Core Not your daddy’s DOT NET
  • 2. © Betabit Nederland B.V. Who’s who? Oscar van Tol Rick van den Bosch
  • 3. © Betabit Nederland B.V. The plan .NET Core - the basics Why the reboot .NET Standard Tooling * EF Core * Caffeine ASP.NET Core ASP.NET Core – Web API * ASP.NET Core – MVC * What’s next * == code!
  • 4. © Betabit Nederland B.V. .NET Core - the basics
  • 5. © Betabit Nederland B.V. .NET Core “.NET Core is a general purpose development platform maintained by Microsoft and the .NET community on GitHub. It is cross-platform, supporting Windows, macOS and Linux, and can be used in device, cloud, and embedded/IoT scenarios.” source: https://docs.microsoft.com/en-us/dotnet/articles/core
  • 6. © Betabit Nederland B.V. What is .NET Core 1/2 • Flexible deployment: Can be included in your app or installed side-by-side user- or machine-wide.​ • Cross-platform: Runs on Windows, macOS and Linux; can be ported to other OSes. The supported Operating Systems (OS), CPUs and application scenarios will grow over time, provided by Microsoft, other companies, and individuals.​ • Command-line tools: All product scenarios can be exercised at the command-line.
  • 7. © Betabit Nederland B.V. What is .NET Core 2/2 • Compatible: .NET Core is compatible with .NET Framework, Xamarin and Mono, via the .NET Standard Library.​ • Open source: The .NET Core platform is open source, using MIT and Apache 2 licenses. Documentation is licensed under CC-BY. .NET Core is a .NET Foundation project.​ • Supported by Microsoft: .NET Core is supported by Microsoft, per .NET Core Support
  • 9. © Betabit Nederland B.V. Why the reboot .NET Framework was too monolithic​ Too many dependencies (preventing cross-platform)​ Maintaining compatibility slowed down Framework development​ Removed dependency on OS​ Faster startup​ New runtime next to full framework (maintaining compatibility)
  • 10. © Betabit Nederland B.V. .NET Standard Multiple runtimes:​ • Reusing code?​ • Dependencies?​ • Creating libraries?​ • OS related stuff? (for example: disk access)​
  • 12. © Betabit Nederland B.V. .NET Standard We have Portable Class Libraries (PCL) for that. Right? • Target ‘least common denominator’ API for platforms • Not a sustainable model
  • 13. © Betabit Nederland B.V. .NET Standard • A version of the .NET Standard is a definition of a collection of standard Api’s.​ • A runtime can support one or more versions of the .NET Standard.​ • A library can target one or more versions of the .NET Standard.​
  • 14. © Betabit Nederland B.V. .NET Standard: versions
  • 15. © Betabit Nederland B.V. So what do we do with PCL?
  • 16. © Betabit Nederland B.V. .NET Standard 2.0
  • 17. © Betabit Nederland B.V. .NET Core SDK Command line tools Libraries & runtime dotnet driver (CLI) Primary layer Cross platform
  • 18. © Betabit Nederland B.V. DEMO .NET Core Tooling
  • 19. © Betabit Nederland B.V. dotnet.exe new migrate restore run build test publish pack Meer info: http://bit.ly/nyddn-cmds
  • 20. © Betabit Nederland B.V. EF Core
  • 21. © Betabit Nederland B.V. EF Core “EF Core is a lightweight, extensible, and cross-platform version of the popular Entity Framework data access technology. It is an object-relational mapper that enables .NET developers to work with a database using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write” source: https://docs.microsoft.com/en-us/ef/core
  • 22. © Betabit Nederland B.V. EF Core Lightweight Extensible Cross-platform
  • 23. © Betabit Nederland B.V. EF Core Not complete! EF6.x is still alive and will continue to be updated. https://github.com/aspnet/EntityFramework6 “very much a v1 product” Not Supported: Complex/value types, Simple type conversions, Spatial data types, Many-to-many without join entity, Lazy loading, Simple ccommand interception, Stored procedure mapping, Update model from database, Seed data, …
  • 24. © Betabit Nederland B.V. Which one is right for you? EF6.x most suitable for most applications Use EF Core: • In new applications that do not require missing features • In applications that target .NET Core “You should view the move from EF6.x to EF Core as a port rather than an upgrade”
  • 25. © Betabit Nederland B.V. DEMO Entity Framework Core
  • 26. © Betabit Nederland B.V. Hands on with .NET Core? Workshop .NET Core @Betabit Utrecht Hands on Registration form available on the tables
  • 27. © Betabit Nederland B.V. WINACTIE Wat: Security workshop Waar: Betabit Utrecht Wanneer: 5 & 6 juni 2017 Lever het formulier vandaag in! Let op! Maandag 5 juni is 2de pinksterdag
  • 28. © Betabit Nederland B.V. Lets have a <br> Warning: we really respect your privacy and EU law requirements require us to inform you that this caffeine break will contain cookies. [accept]
  • 29. © Betabit Nederland B.V. ASP.NET Core
  • 30. © Betabit Nederland B.V. ASP.NET Core “ASP.NET Core is a new open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends.” source: https://docs.microsoft.com/en-us/aspnet/core
  • 31. © Betabit Nederland B.V. ASP.NET Core ASP.NET Core != .NET Core Can target .NET Core and Full Framework Develop & run on Windows, Mac or Linux
  • 32. © Betabit Nederland B.V. Why ASP.NET Core? ASP.NET 1st version: 15 years ago Lots of added & evolved capabilities Much leaner and more compact No longer based on System.Web.dll (but on NuGet packages) Tighter security Reduced servicing Improved performance Decreased costs in pay-per-use model
  • 33. © Betabit Nederland B.V. ASP.NET Core – Startup Startup class is required Constructor can accept dependencies provided by DI IHostingEnvironment ILoggerFactory Must include Configure method Adding middleware Can include ConfigureServices Called before Configure Setup DI etc.
  • 34. © Betabit Nederland B.V. ASP.NET Core – Middleware Assembled into pipeline Handles requests and responses Calls next or short-circuits the chain In-line or reusable Executed in order! Critical to security, performance and functionality
  • 35. © Betabit Nederland B.V. ASP.NET Core – Middleware example
  • 36. © Betabit Nederland B.V. What’s ‘wrong’ here…???
  • 37. © Betabit Nederland B.V. ASP.NET Core – Configuration Configure app based on a list of name-value pairs Can be read at runtime from multiple sources Supports • File formats (INI, JSON and XML) • Command-line arguments • Environment variables • In-memory .NET objects • An encrypted user store • Azure Key Vault • Custom providers (install or create)
  • 38. © Betabit Nederland B.V. ASP.NET Core – Options pattern Uses custom options classes to represent a group of related settings Enables using decoupled classes for each feature Interface Segregation Principle (ISP) Separation of Concerns IOptionsSnapshot supports reloading configuration on file change
  • 39. © Betabit Nederland B.V. ASP.NET Core – Hosting ASP.NET Core requires a host in which to execute Must implement IWebHost Typically created using WebHostBuilder Responsible for application startup and lifetime management
  • 40. © Betabit Nederland B.V. ASP.NET Core – Web server ASP.NET Core runs with an in-process HTTP Server implementation Listens for HTTP Requests Surfaces them to application as sets of request features composed into an HttpContext ASP.NET Core ships with two server implementations: • Kestrel (Cross-platform, based on Libuv) • WebListener (Windows-only, based on Http.Sys)
  • 41. © Betabit Nederland B.V. ASP.NET Core – Kestrel Included by default Internal facing: just Kestrel Internet facing: IIS, Nginx or Apache as reverse proxy
  • 42. © Betabit Nederland B.V. ASP.NET Core – WebListener Internal facing: WebListener Internet facing (without IIS): WebListener Internal facing: Kestrel recommended, unless WebListener features needed
  • 43. © Betabit Nederland B.V. ASP.NET Core Web API What's new? • Nothing, it's gone • Use MVC 6 for REST • No major issues migrating (Microsoft.AspNetCore.Mvc.WebApiCompatShim) • Heads up: Json formatting now default in camelCase
  • 44. © Betabit Nederland B.V. DEMO ASP.NET Core Web API
  • 45. © Betabit Nederland B.V. ASP.NET Core MVC What’s new? • wwwroot • Razor syntax • Tag helpers • Dependency Injection in Views • …
  • 46. © Betabit Nederland B.V. wwwroot Meant for static files Add static file middleware URLs for static content are relative to wwwroot Clean separation between code and static files
  • 47. © Betabit Nederland B.V. Razor & Tag helpers
  • 48. © Betabit Nederland B.V. DI into views @inject (adds a ‘property’ to your view Can be usefull for View-specific services (localization) Maintain a Separation of Concerns (Most of the) data your view displays should be passed in from the controller Can be used to override services Heads-up: register services you want to inject
  • 49. © Betabit Nederland B.V. DEMO ASP.NET Core MVC
  • 50. © Betabit Nederland B.V. ASP.NET or ASP.NET Core?
  • 51. © Betabit Nederland B.V. Recap .NET Core Command line interface .NET Standard Entity Framework Core ASP.NET Core
  • 52. © Betabit Nederland B.V. FINAL DEMO
  • 53. © Betabit Nederland B.V. FX: To Core or not to Core? .NET Core .NET Framework Cross-platform needs Currently using .NET Targeting micro-services 3rd party libraries / NuGet packages Using Docker Techologies not (yet) supported High performance & scalability Side by side .NET versions
  • 54. © Betabit Nederland B.V. What's next source: https://github.com/dotnet/core/blob/master/roadmap.md
  • 55. © Betabit Nederland B.V. Did you know?
  • 56. © Betabit Nederland B.V. Resources .NET Core Source Browser https://source.dot.net dotnet.exe commands http://bit.ly/nyddn-cmds Roadmap https://github.com/dotnet/core/blob/master/roadmap.md
  • 58. Bedankt voor je aandacht © Betabit Nederland B.V.

Hinweis der Redaktion

  1. Rick
  2. Original ecosystem
  3. Introducing .NET Standard
  4. are used to build applications allow applications to both be built and run for running the CLI commands as well as running applications
  5. Explain project systems, project.json, why dropping it;​ And that it is ‘either / or ‘​ Visual Studio 2015​ Project.json​ Visual Studio 2017​ .Csproj dotnet.exe dotnet new console dotnet restore dotnet build --output bin (build met --output /bin plaatst dll in c:\bin !!! Zonder (back)slash gaat het goed) dotnet bin/project.dll Ook mogelijk: run csproj
  6. Scaffolding Setup in project / DI   In-Memory testing
  7. Exception handler first: catches all exceptions in middleware later Then static files: returns static files and doesn’t process further (short-circuits) TIP: Static Files doesn’t do authorization checks! Find more info online Identity middleware performs authentication. No short-circuit, since no authorization!
  8. 1 SETUP OF ASP.NET 2 ADD SWAGGER 3 LOGGING 4 CONFIGURATION 5 CUSTOM MIDDLEWARE 6 DEPENDENCY INJECTION 7 EF DI 8 SHOW ANGULAR(BONUS)
  9. Large part of Web API DEMO applies Program.cs Startup.cs Dependencies Wwwroot Views (Razor) TagHelpers Custom Taghelpers _ViewImports.cshtml Bower Bundling & Minification (incl. environments & fallback)
  10. Infographic van juni 2016 Specific implementations & conditional compilation (bias towards the latter) Windows groter: wel Windows specifieke implementaties (registry) nog geen unix specifieke implementatie CoreCLR == platform specific (C/C++, so by construction) System.IO & Security.Cryptography.Algoritms == platform specific, slightly different implementations System.Collections & System.Linq are platform-neutral