SlideShare a Scribd company logo
© 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.

More Related Content

What's hot

(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code
Amazon Web Services
 
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
Shahed Chowdhuri
 
Infrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleInfrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and Ansible
DevOps Meetup Bern
 
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Edureka!
 
AWS networking fundamentals
AWS networking fundamentalsAWS networking fundamentals
AWS networking fundamentals
Amazon Web Services
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
Lushanthan Sivaneasharajah
 
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony LinAnsible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Vietnam Open Infrastructure User Group
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
Santosh Kumar Kar
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Steve Pember
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as Code
WinWire Technologies Inc
 
AWS Deployment Best Practices
AWS Deployment Best PracticesAWS Deployment Best Practices
AWS Deployment Best Practices
Amazon Web Services
 
.Net framework
.Net framework.Net framework
.Net framework
Om Vikram Thapa
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
Amazon Web Services
 
.Net Core
.Net Core.Net Core
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
Amazon Web Services
 
Clean architectures with fast api pycones
Clean architectures with fast api   pyconesClean architectures with fast api   pycones
Clean architectures with fast api pycones
Alvaro Del Castillo
 
Creating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformCreating AWS infrastructure using Terraform
Creating AWS infrastructure using Terraform
Knoldus Inc.
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
NGINX, Inc.
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Amazon Web Services
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
MongoDB
 

What's hot (20)

(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code(ARC307) Infrastructure as Code
(ARC307) Infrastructure as Code
 
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
 
Infrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and AnsibleInfrastructure as Code with Terraform and Ansible
Infrastructure as Code with Terraform and Ansible
 
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
Azure Interview Questions And Answers | Azure Tutorial For Beginners | Azure ...
 
AWS networking fundamentals
AWS networking fundamentalsAWS networking fundamentals
AWS networking fundamentals
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony LinAnsible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as Code
 
AWS Deployment Best Practices
AWS Deployment Best PracticesAWS Deployment Best Practices
AWS Deployment Best Practices
 
.Net framework
.Net framework.Net framework
.Net framework
 
Introduction to Amazon EC2
Introduction to Amazon EC2Introduction to Amazon EC2
Introduction to Amazon EC2
 
.Net Core
.Net Core.Net Core
.Net Core
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 
Clean architectures with fast api pycones
Clean architectures with fast api   pyconesClean architectures with fast api   pycones
Clean architectures with fast api pycones
 
Creating AWS infrastructure using Terraform
Creating AWS infrastructure using TerraformCreating AWS infrastructure using Terraform
Creating AWS infrastructure using Terraform
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
 
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
Using HashiCorp’s Terraform to build your infrastructure on AWS - Pop-up Loft...
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 

Similar to .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 Utrecht
Daniël te Winkel
 
Porting Projects to .NET 5
Porting Projects to .NET 5Porting Projects to .NET 5
Porting Projects to .NET 5
Immo Landwerth
 
DOT NET TRaining
DOT NET TRainingDOT NET TRaining
DOT NET TRaining
sunil kumar
 
Pottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net CorePottnet Meetup Essen - ASP.Net Core
Pottnet Meetup Essen - ASP.Net Core
Malte Lantin
 
Pottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net CorePottnet MeetUp Essen - ASP.Net Core
Pottnet MeetUp Essen - ASP.Net Core
Malte Lantin
 
Rcs project Training Bangalore
Rcs project Training BangaloreRcs project Training Bangalore
Rcs project Training Bangalore
Sunil 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 development
KBA 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 development
KBA Systems
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
Ken Cenerelli
 
.Net: Introduction, trends and future
.Net: Introduction, trends and future.Net: Introduction, trends and future
.Net: Introduction, trends and future
Bishnu Rawal
 
【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
Tadeusz 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 comparison
Katy Slemon
 
Cloud-Native .NET
Cloud-Native .NETCloud-Native .NET
Cloud-Native .NET
VMware Tanzu
 
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
NishitPatel409228
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
Abanti 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 .NET9
Jü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 webservices
Daniel Fisher
 
DotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcementsDotnetConf - Cloud native and .Net5 announcements
DotnetConf - Cloud native and .Net5 announcements
Sajeetharan
 

Similar to .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
 
ASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bitsASP.NET Core: The best of the new bits
ASP.NET Core: The best of the new bits
 
.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
 

More from Rick van den Bosch

Configuration in azure done right
Configuration in azure done rightConfiguration in azure done right
Configuration in azure done right
Rick 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 services
Rick 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 legacy
Rick 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 Conference
Rick 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 Directory
Rick 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 Lake
Rick van den Bosch
 
An intro to Azure Data Lake
An intro to Azure Data LakeAn intro to Azure Data Lake
An intro to Azure Data Lake
Rick 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 Grid
Rick van den Bosch
 
Dude, Where's my Server?
Dude, Where's my Server?Dude, Where's my Server?
Dude, Where's my Server?
Rick 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 Management
Rick van den Bosch
 

More from 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
 

Recently uploaded

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
Luigi Fugaro
 
TMU毕业证书精仿办理
TMU毕业证书精仿办理TMU毕业证书精仿办理
TMU毕业证书精仿办理
aeeva
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Luigi Fugaro
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio, Inc.
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
Alina Yurenko
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
mohitd6
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
michniczscribd
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
Patrick Weigel
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdfThe Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
kalichargn70th171
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
campbellclarkson
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 

Recently uploaded (20)

Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
WMF 2024 - Unlocking the Future of Data Powering Next-Gen AI with Vector Data...
 
TMU毕业证书精仿办理
TMU毕业证书精仿办理TMU毕业证书精仿办理
TMU毕业证书精仿办理
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
bgiolcb
bgiolcbbgiolcb
bgiolcb
 
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
Voxxed Days Trieste 2024 - Unleashing the Power of Vector Search and Semantic...
 
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data PlatformAlluxio Webinar | 10x Faster Trino Queries on Your Data Platform
Alluxio Webinar | 10x Faster Trino Queries on Your Data Platform
 
Going AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applicationsGoing AOT: Everything you need to know about GraalVM for Java applications
Going AOT: Everything you need to know about GraalVM for Java applications
 
The Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdfThe Role of DevOps in Digital Transformation.pdf
The Role of DevOps in Digital Transformation.pdf
 
Beginner's Guide to Observability@Devoxx PL 2024
Beginner's  Guide to Observability@Devoxx PL 2024Beginner's  Guide to Observability@Devoxx PL 2024
Beginner's Guide to Observability@Devoxx PL 2024
 
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdf
 
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
WWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders AustinWWDC 2024 Keynote Review: For CocoaCoders Austin
WWDC 2024 Keynote Review: For CocoaCoders Austin
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdfThe Comprehensive Guide to Validating Audio-Visual Performances.pdf
The Comprehensive Guide to Validating Audio-Visual Performances.pdf
 
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
🏎️Tech Transformation: DevOps Insights from the Experts 👩‍💻
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 

.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.

Editor's Notes

  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