Slides for my session at Microsoft WebCamp Lisbon, Dec 2015. Based on CoreCLR RC1-Update1. Full project at https://github.com/theplastictoy/webcamp2015-aspnet
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
ASP.NET on Mac, Linux and the Open-Source culture
1.
2. ASP.NET
on Mac,
Linux
and
the Open-‐Source culture
Ricardo
Fiel
3. About
me
• Born
1978
in
Leiria
• Dad
of
one,
Lucas,
4yr
• Started
programming
in
a
ZX
Spectrum
• Graduated
from
ISEL,
Lisbon
Polytechnic
• ~12
years
exp.
in
software
teams
• Community
evangelist
• Noisy
guitar
player,
some
albums
out,
~300
gigs
• Currently
CTO
@ RUPEAL
@theplastictoy
http://ricardofiel.com
ricardo.fiel@rupeal.com
16. 64-‐bit
JIT
+
SIMD
Garbage
Collector
Runtime
components Compilers
.NET
Compiler
Platform
(Roslyn)
Languages
innovation
.NET Framework 4.6 .NET Core 5
Fully-‐featured
and
integrated
.NET
libraries
and
runtime
for
Windows
Modular
and
optimized
.NET
libraries
and
runtimes
Base
class
libraries
NuGet
packages
Libraries
.NET
on
Linux
and
OS
X
17. .NET
Core
+
CoreCLR
• .NET
Core:
• CoreFX (libraries)
+
CoreCLR (small,
optimized
runtime)
• Cross
platform:
Windows,
Linux,
Mac
• Side
by
side
installation,
no
shared
code
• Modular,
use
only
what
you
need
• Xcopy deployments
• CoreCLR:
• Runtime
implementation
for
.NET
Core
• Includes
RyuJIT,
.NET
GC,
native
interop,
etc…
• Everything
is
open-‐source
on
GitHub
• EntityFramework 7
is
supported
19. Getting
up
and
running
https://github.com/aspnet/Home
• .NET
Core
already
installed
as
part
of
VS2015
RC
• Clone
repo
on
GitHub
and
build
from
source
(advanced)
• Download
installer
• Use
Homebrew
formula
on
GitHub
• Manual
install
• Download
&
install
tar
file
• Create
VM
on
Azure
Marketplace
• Use
Dockerfile
on
Docker Hub
20. Editors
and
IDEs
– OmniSharp community
effort
Let’s
focus
on
Yeoman
+
VS
Code
21. Building
and
Running
– the
tools
• dnvm (.NET
Version
Manager)
• Run
multiple
versions
side
by
side
• Same
concepts
as
rvm and
rbenv for
Ruby
• dnu (.NET
Development
Utility)
• Build
and
publish
• Manage
dependencies
• dnx (.NET
Execution
Environment)
• Runs
web
and
console
apps
(non-‐native)
• For
web,
on
a
Mac,
uses
kestrel
web
server
23. Building
and
Running
– the
tools
– RECAP!
• dnvm (.NET
Version
Manager)
• Run
multiple
versions
side
by
side
• Same
concepts
as
rvm and
rbenv for
Ruby
• dnu (.NET
Development
Utility)
• Build
and
publish
• Manage
dependencies
• dnx (.NET
Execution
Environment)
• Runs
web
and
console
apps
(non-‐native)
• For
web,
on
a
Mac,
uses
kestrel
web
server
# make sure we’re on the latest
# engine
dnvm upgrade
# update dependencies
dnu restore
# build and run
dnx web
24. Anatomy
of
an
app
• Project.json
• Similar
to
node.js ‘package.json’
• Target
frameworks,
dependencies,
commands,
scripts
• A
DNX
app
is
basically
project.json and
a
startup.cs (or
other
name)
file
• Project.lock.json
• Similar
to
rails
‘Gemfile.lock’
• Contains
the
dependency
tree
generated
by
‘dnx restore’
• Used
at
app
boot
time
• Multiple
projects (aka
Solutions)
• global.json file
• More
info: http://docs.asp.net/en/latest/dnx/projects.html
27. Choosing
the
right
.NET
for
You
• .NET
Framework
• Windows
only
• Fully
featured
• NOT
open
source
• .NET
Core
• CoreFX (libraries)
+
CoreCLR(small,
optimized
runtime)
• Cross
platform:
Windows,
Linux,
Mac
• Open
source
• Mono
• .NET
for
non-‐Windows
platforms,
been
around
for
years
• Community-‐driven,
supported
by
Xamarin
• Best
choice
for
mobile
apps,
BUT
not
ready
for
server/cloud
workloads
• Open-‐source
• More
Info:
https://docs.asp.net/en/latest/getting-‐started/choosing-‐the-‐right-‐dotnet.html
28. • .NET
Core
apps
can
run
in
a
production
Linux
environment,
including
Docker
containers
(both
on-‐prem and
in
the
cloud)
• Developers
can
edit,
compile
and
debug
their
.NET
code
on
Mac
OS
X
using
Visual
Studio
Code
(or
their
favorite
editor).
• Apps
built
using
platform-‐agnostic
features have
identical
behavior
on
Windows
and
x-‐platform
• .NET
Core
brings
along
existing
.NET
cloud
ecosystem
of
libraries
to
Linux
• Microsoft
will
support,
service
and
maintain
.NET
on
Linux
like
any
other
Microsoft
product
Plan
of
Record
(Microsoft’s
Promise
@
RTM)
It
Will
Work!
J
29. Call
to
Action!
Download
.NET
Core
+
ASP.NET
5 (Linux
|
OS
X)
OS
X:
https://dotnet2015.blob.core.windows.net/binaries/PartsUnlimited-‐demo-‐app-‐darwin.tar.gz
Linux:
https://dotnet2015.blob.core.windows.net/binaries/PartsUnlimited-‐demo-‐app-‐linux.tar.gz
Download
Visual
Studio
Code (Windows
|
Linux
|
OS
X)
http://code.visualstudio.com
Download
Visual
Studio
2015
RC
Tools
for
Docker Preview
http://aka.ms/vslovesdocker
Evaluate
.NET
Core
on
Linux
via
the
Azure
VM
Gallery
http://azure.microsoft.com/en-‐us/marketplace/
Check
out
the
.NET
Cross-‐Platform
Tutorials
Create
Cross-‐Platform
.NET
Apps
Learn
about
the
Parts
Unlimited Sample
App
https://github.com/Microsoft/PartsUnlimited
Get
involved
and
become
a
contributor
to
.NET
Core!
http://github.com/dotnet