O slideshow foi denunciado.

.NET Core on Mac

2

Compartilhar

Próximos SlideShares
Introduction to .NET Core
Introduction to .NET Core
Carregando em…3
×
1 de 56
1 de 56

.NET Core on Mac

2

Compartilhar

Baixar para ler offline

Here you can see how easy it is to do development to Mac using free tools and frameworks provided by Microsoft.

What is all About? - Fast website development using .Net Core, Visual Studio Code; from the installation to continuos deployment on Azure.

Here you can see how easy it is to do development to Mac using free tools and frameworks provided by Microsoft.

What is all About? - Fast website development using .Net Core, Visual Studio Code; from the installation to continuos deployment on Azure.

Mais Conteúdo rRelacionado

Audiolivros relacionados

Gratuito durante 14 dias do Scribd

Ver tudo

.NET Core on Mac

  1. 1. .NET CORE ON MAC MELANIA ANDRISAN
  2. 2. ME MELANIA ANDRISAN ▸ Mother ▸ Engineer ▸ Software Architect at Haufe Group ▸ Apple fan ▸ .NET Developer for over 10 years
  3. 3. MELA.RO JEKYLL GIT & MD @melaniadanciu
  4. 4. NEW DEVELOPMENT TODAY
  5. 5. MICROSERVICES, CI, MODULARIZATION, MOBILE DEV
  6. 6. ANY APPLICATION ON ANY PLATFORM GOAL
  7. 7. NEW DEVELOPMENT TODAY .NET TODAY .NET FRAMEWORK .NET CORE XAMARIN Platform for .NET applications on Windows Cross-platform and open-source framework optimized for modern app needs and developer workflow Cross-platform and open-source Mono- based runtime for iOS, OS X & Android devices https://www.microsoft.com/net
  8. 8. NEW DEVELOPMENT TODAY .NET TODAY .NET FRAMEWORK .NET CORE XAMARIN Platform for .NET applications on Windows Cross-platform and open- source framework optimized for modern app needs and developer workflow Cross-platform and open- source Moni-based runtime for iOS, OSX & Android devices Distributed with Windows Distributed with app Distributed with app
  9. 9. NEW DEVELOPMENT TODAY .NET TOMORROW .NET FRAMEWORK WPF, Win Forms, ASP.NET .NET CORE UWP, ASP.NET Core XAMARIN iOS, Android, OS X .NET Standard Library One library across them all COMMON INFRASTRUCTURE Compilers, Languages, Runtime components
  10. 10. WHAT IS ALL ABOUT FAST WEBSITES DEVELOPMENT USING .NET CORE IN VISUAL STUDIO CODE. FROM THE TOOLS INSTALLATION TO CONTINUOUS DEPLOYMENT ON AZURE.
  11. 11. .NET CORE
  12. 12. HTTPS://DOCS.MICROSOFT.COM/EN-US/DOTNET/ARTICLES/CORE/INDEX CORE FX
  13. 13. IT IS VERY EASY TO GET STARTED WITH .NET CORE ON YOUR PLATFORM OF CHOICE. YOU JUST NEED A SHELL, A TEXT EDITOR AND 10 MINUTES OF YOUR TIME. .NET Core Website .NET CORE
  14. 14. HTTPS://WWW.MICROSOFT.COM/NET/CORE/PLATFORM .NET CORE ▸ .NET Core is a blazing fast, lightweight and modular platform for creating web applications and services that run on Windows, Linux and Mac.
  15. 15. CROSS- PLATFORM
  16. 16. .NET CORE CROSS-PLATFORM ▸ You can create .NET Core apps that run on Windows, Linux and macOS.
  17. 17. .NET CORE UNIFIED ▸ Leverage the unified .NET Standard library to target all platforms with the same code and use the same languages and tools to reuse your skills.
  18. 18. FAST
  19. 19. .NET CODE FAST ▸ High performance server runtime for Windows Server and Linux make .NET 8x faster than Node.js and 3x faster than Go. That means applications provide better response times and require less compute power. https://github.com/aspnet/benchmarks
  20. 20. LIGHTWEIGHT
  21. 21. .NET CORE LIGHTWEIGHT ▸ No impact deployment and a modular development model where you only take dependencies on the minimal set of packages you need.
  22. 22. MODERN
  23. 23. .NET CORE MODERN ▸ Multiple language support with C#, VB, F# and modern constructs like generics, Language Integrated Query (LINQ), async support and more.
  24. 24. OPEN SOURCE
  25. 25. .NET CORE OPEN SOURCE ▸ Runtime, libraries, compiler, languages and tools are all open source on GitHub where contributions are accepted, tested and fully supported. https://github.com/dotnet/core/
  26. 26. INSTALL HTTPS://WWW.MICROSOFT.COM/NET/CORE#MACOS
  27. 27. DEMO 1...
  28. 28. INSTALL DEMO ▸ Homebrew and OpenSSL ▸ Install .NET Core SDK using installer ▸ Create a console app - macapp using the Terminal mkdir macapp cd macapp dotnet new dotnet restore dotnet run
  29. 29. BUILD A WEBSITE... https://github.com/aspnet/KestrelHttpServer
  30. 30. DOTNET NEW -T WEB -L C#
  31. 31. HTTP://YEOMAN.IO/ https://github.com/omnisharp/generator-aspnet#readme
  32. 32. APP BUILDING YEOMAN.IO ▸ THE WEB'S SCAFFOLDING TOOL FOR MODERN WEBAPPS npm install -g yo ▸ scaffolding, building and package manager
  33. 33. YEOMAN.IO - GENERATE AN ASP .NET APP
  34. 34. DEMO 2...
  35. 35. DEMO AN APP FROM START TO END IN TERMINAL ▸ have .NET Core installed ▸ yo aspnet ▸ git init ▸ create azure web app ▸ deployment settings - git ▸ git push
  36. 36. DEVELOP THE WEBSITE...
  37. 37. VISUAL STUDIO CODE https://code.visualstudio.com/docs
  38. 38. DEVELOP VISUAL STUDIO CODE ▸ Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, Mac and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C+ +, C#, Python, PHP) and runtimes. https://go.microsoft.com/fwlink/?LinkID=620882 - direct link to download
  39. 39. OPEN SOURCE https://github.com/ Microsoft/vscode
  40. 40. YO ASPNET WEB APPLICATION
  41. 41. ADD REFERENCES...
  42. 42. PACKAGE.JSON PACKAGE REFERENCE NO ASSEMBLY REFERENCE
  43. 43. "dependencies": { "Microsoft.NETCore.App": { "version": "1.0.0", "type": "platform" }, "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", "Microsoft.AspNetCore.Diagnostics": "1.0.0", "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", "Microsoft.AspNetCore.Mvc": "1.0.0", "Microsoft.AspNetCore.Razor.Tools": { "version": "1.0.0-preview2-final", "type": "build" }, "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
  44. 44. BOWER
  45. 45. { "name": "melasapp", "private": true, "dependencies": { "bootstrap": "3.3.6", "jquery": "2.2.3", "jquery-validation": "1.15.0", "jquery-validation-unobtrusive": "3.2.6" } }
  46. 46. ENTITY FRAMEWORK https://docs.efproject.net/en/latest/providers/index.html dotnet ef migrations add init dotnet ef database update
  47. 47. DEMO 3...
  48. 48. DEMO DIFFERENT APPS AS ONE ▸ Created a console app ▸ Changed it into a web server ▸ Added MVC app
  49. 49. DEPLOY ON MULTIPLE TARGETS http://www.hanselman.com/blog/SelfcontainedNETCoreApplications.aspx
  50. 50. .NET CORE DEPLOY ON MULTIPLE TARGETS "runtimes": { "win10-x64": {}, "osx.10.10-x64": {}, "ubuntu.14.04-x64": {} } dotnet build -r win10-x64 dotnet build -r osx.10.10-x64 dotnet build -r ubuntu.14.04-x64 dotnet publish -c release -r win10-x64 dotnet publish -c release -r osx.10.10-x64 dotnet publish -c release -r ubuntu.14.04-x64
  51. 51. DOCKER https://hub.docker.com/r/microsoft/dotnet/ https://docs.microsoft.com/en-us/dotnet/articles/core/docker/building-net-docker-images
  52. 52. DOCKER ▸ npm install -g generator-docker
  53. 53. SEE A SAMPLE OF A COMPLEX APP
  54. 54. TEXT RETROSPECTIVE ▸ fast installation ▸ just a console app ▸ easy development using VS Code ▸ packages no assemblies ▸ Entity Framework as you know it ▸ Docker containers ▸ fast Azure deployment
  55. 55. TEXT RESOURCES ▸ Building .NET apps for Linux and Mac ▸ Dotnet on OS X ▸ Adding project to git ▸ Create an ASP MVC App with VS Code
  56. 56. SEE YOU SOON!

Notas

  • About technology
  • http://www.hanselman.com/blog/ExploringDotnetNewWithNETCore.aspx

    https://weblog.west-wind.com/posts/2016/Jun/13/ASPNET-Core-and-NET-Core-Overview

    https://github.com/RickStrahl/AspNetCoreFromScratchSample/blob/master/Program.cs
  • Press Ctrl + '`' (the back-quote character) to open an embedded terminal in VS Code.
  • https://weblog.west-wind.com/posts/2016/Jun/13/ASPNET-Core-and-NET-Core-Overview

    https://chocolatey.org/
    http://brew.sh/
  • There is no IIS on mac is Kestrel
  • http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/
  • have a finder window opened.
    have vs opened.
    have a terminal opened:
    yo aspnet
    create an web app
    create db
    run
    open VS

    deploy to Azure

    https://azure.microsoft.com/en-us/documentation/articles/web-sites-create-web-app-using-vscode/

    Open the browser and go to Azure Portal
    have already created app
    add to git
    add git url
    test the app


    open the project in vs

    code .

    project mvc description

  • http://code.visualstudio.com/docs/setup/mac

    https://marketplace.visualstudio.com/search?target=VSCode&category=Languages&sortBy=Downloads

    https://code.visualstudio.com/Docs/editor/codebasics

    Command Palette (⇧⌘P)
  • intellisense
    extensions
    debug
    git integration

    Control+Space - intellisense
    FN+F1 - see all commands
    Command+P - quick open
  • Tried it with Postgres and SQLLite

    Almost all data access code is the same as in the EF6
  • https://weblog.west-wind.com/posts/2016/Jun/29/First-Steps-Exploring-NET-Core-and-ASPNET-Core#CoreAnalysis
  • https://docs.microsoft.com/en-us/dotnet/articles/core/deploying/index

    https://docs.microsoft.com/en-us/dotnet/articles/core/rid-catalog
  • https://github.com/gulpjs/gulp/blob/master/docs/API.md
  • ×