ASP.NET vNext no .NET Architects Days 2014
-
Upload
giovanni-bassi -
Category
Technology
-
view
461 -
download
2
description
Transcript of ASP.NET vNext no .NET Architects Days 2014
![Page 1: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/1.jpg)
Globalcode – Open4education
ASP.NET vNext
Giovanni Bassi
@giovannibassi
Victor Cavalcante
@vcavalcante
![Page 2: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/2.jpg)
@VCavalcante
@GiovanniBassi
![Page 3: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/3.jpg)
![Page 4: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/4.jpg)
![Page 5: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/5.jpg)
Globalcode – Open4education
História
2002 – Lançado ASP.NET e WebFormsFoco: trazer o desenvolvedor VB6 pra web
Desenvolvedores web de verdade choram ou tiram sarro do WebForms
2004 – Lançado JSF seguindo ideia muito semelhante ao WebForms
2004 – Primeira versão do Ruby on Rails
2005 – Victor já avisava todo mundo sobre o que a Web era e o que não era
e criticava o WebForms
![Page 6: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/6.jpg)
Globalcode – Open4education
História
~2005/2006 – Lançado MonoRail (Rails pra .NET)
2007 – Nasce SilverlightE Microsoft desiste do HTML
12/2007 – CTP do ASP.NET MVCE Microsoft volta pro HTML \o/
2008 – Criado .NET ArchitectsDiscussões homéricas sobre Silverlight, WebForms e MVC
(E DDD. O tempo todo. E repositórios. Sim, desde 2008.)
2009 – 1.0 do ASP.NET MVC
2009 – Lançado NodeJS
![Page 7: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/7.jpg)
Globalcode – Open4education
História
2011 – Última versão do Silverlight
2012 – SPA, SPA, SPA, SPA!
2012 – Palestra sobre “Nova Web” no DNADNós avisamos!
Final de 2013 – Começa desenvolvimento do ASP.NET vNext
2014 – ASP.NET vNext aberto a público
2015 – Lançamento do ASP.NET vNext?
![Page 8: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/8.jpg)
Globalcode – Open4education
Dúvidas comuns
Muda alguma coisa na arquitetura?
Cadê o WebForms? <o>
Se não tem dll quer dizer que é interpretado?
Vai ficar mais lento?
Vou ter que codar na linha de comando?
Vou conseguir migrar meus projetos?
A Microsoft me abandonou?
![Page 9: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/9.jpg)
Globalcode – Open4education
ASP.NET vNext e a web moderna
Totalmente modular
Ciclo de desenvolvimento rápido
Transição transparente entre nuvem e on-premises
Escolha seus editores e ferramentas
Código aberto com contribuições externas
Cross-Platform
Rápido
Faster Development Cycle
![Page 10: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/10.jpg)
Globalcode – Open4education
Platform Framework Tools
Providing the best end-to-end development experience…
…on your terms
…or bring your own …or bring your own …or bring your own
ASP.NET vNext - Resumo
![Page 11: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/11.jpg)
Globalcode – Open4education
MVC6Web Pages
HTML Helpers
Web Api
Controllers
Actions
Filters
Model Biding
DI
Frameworks Web Hoje
ASP.NET MVC 5
HTML Helpers
Controllers
Actions
Filters
Model Biding
DI
RazorRazor
ASP.NET vNext
ASP.NET MVC 6
![Page 12: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/12.jpg)
Globalcode – Open4education
Pague pelo que usar
A versão atual do ASP.NET te obriga a passar por um pipeline gigantesco
Isso impacta desempenho
No vNext você vai escolher o que vai usar, e o que não for carregado não traz overhead
Você sabia que o IIS é um dos servidores web mais rápidos do mercado?
![Page 13: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/13.jpg)
Globalcode – Open4education
![Page 14: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/14.jpg)
Globalcode – Open4education
Windows 7 ou maiorWindows Server 2008 R2 +NET 4.5.1 for hosting in IIS
Mono >= 3.41 https://github.com/mono/mono
github.com/aspnet/home
![Page 15: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/15.jpg)
Globalcode – Open4education
Uma conversa no Jabbr.net
- Esse “vNext” é do .NET ou do ASP.NET?- É do ASP.NET.- Mas tem uma app console lá. Console, não é
ASP.NET!- Porque não?- Ok, você venceu.
![Page 16: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/16.jpg)
Globalcode – Open4education
Diferenças fundamentais
![Page 17: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/17.jpg)
Globalcode – Open4education
Sem WebForms!
![Page 18: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/18.jpg)
Globalcode – Open4education
Diferenças fundamentais
Assemblies em disco opcionais
Sem WebForms
Diferenças no framework,quebra de compatibilidade em APIs
Linha de comando é um cenário 100% funcional
Evolução independente do Windows Server e do .NET Framework
100% testável
100% portável
![Page 19: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/19.jpg)
Globalcode – Open4education
KRE
![Page 20: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/20.jpg)
Globalcode – Open4education
Estrutura do KRE
Onde fica?%USERPROFILE%\.kre
O que tem lá?
![Page 21: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/21.jpg)
Globalcode – Open4education
Otimizado para a nuvem
![Page 22: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/22.jpg)
Globalcode – Open4education
ASP.NET vNext - Resumo
Feature ASP.NET vNext
ASP.NET vNext (Cloud Optimized)
Cloud Ready * *
Design Modular * *
Injeção de Dependência * *
Tracing / Debugging Consistente * *
Desenvolvimento Rápido (Sem o passo de build) * *
Open Source * *
Full Side by Side (framework deployed inside application) *
Fast startup, Low memory / High throughput (best of class) *
MVC, Web API, Web Pages 6, SignalR 3, EF 7
![Page 23: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/23.jpg)
Globalcode – Open4education
Command Line
KÉ a comando de entrada para o runtime
KVMÉ o gerenciador de versão, ele é o responsável por manter várias versões ao mesmo tempo.
KPMÉ o gerenciador de pacotes, ele é o responsável por instalar pacotes e empacotar sua aplicação
![Page 24: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/24.jpg)
Globalcode – Open4education
KVM
listLista os KREs disponíveis
upgradeInstala a última versão do KRE
Padrão é não usar o cloud optimized
Já deixa essa versão como sendo a padrão
installInstala uma versão específica do KRE
useEscolhe uma versão
![Page 25: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/25.jpg)
Globalcode – Open4education
KPM
restoreRestaura seus pacotes
Pacotes vão parar em $HOME/.kpm/packages
packPrepara a aplicação pra deploy (mas não compila)
buildCompila o projeto e gera a dll e o nupkg (para k10 e net45)
addAdiciona uma dependência ao projeto
![Page 26: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/26.jpg)
Globalcode – Open4education
Onde ficam os pacotes do KPM?
$HOME/.kpm/packages
![Page 27: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/27.jpg)
Globalcode – Open4education
DemoHello World – Console
![Page 28: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/28.jpg)
Globalcode – Open4education
Anatomia
![Page 29: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/29.jpg)
Globalcode – Open4education
DemoHello World – Visual Studio
![Page 30: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/30.jpg)
Globalcode – Open4education
Project.json
Dependências
{ "dependencies": { "Microsoft.AspNet.ConfigurationModel": "0.1-alpha-*", "SomeProject": "" }}
![Page 31: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/31.jpg)
Globalcode – Open4education
Project.json
Configurações{ "configurations": { "Debug": { "compilationOptions": { "define": ["DEBUG", "TRACE"], "debugSymbols": true } }, "Release": { "compilationOptions": { "define": ["RELEASE", "TRACE"], "optimize": true, "debugSymbols": false } } }}
![Page 32: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/32.jpg)
Globalcode – Open4education
Project.json
Frameworks{ "frameworks": { "net45": {}, "k10": { "dependencies": { "System.Collections": "4.0.0.0", "System.Collections.Concurrent": "4.0.0.0", "System.ComponentModel": "4.0.0.0", "System.Linq": "4.0.0.0", "System.Reflection": "4.0.10.0",
} } }}
![Page 33: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/33.jpg)
Globalcode – Open4education
Project.json
Sources
{ "code": "*.cs", "exclude": "buggy/**/*.cs", "resources": "embed/**/*.*"}
![Page 34: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/34.jpg)
Globalcode – Open4education
Project.json
Commands
{ "commands": { "web": "Microsoft.AspNet.Hosting
server.name=Microsoft.AspNet.Server.WebListener
server.urls=http://localhost:5001", "test": "Xunit.KRunner" }}
![Page 35: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/35.jpg)
Globalcode – Open4education
Project.json
Scripts{ "scripts": { "prebuild": "echo before building", "postbuild": "echo before building", "prepack": "echo before packing", "postpack": "echo after packing", "prerestore": "echo before restoring packages", "postrestore": "echo restoring packages" }}
![Page 36: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/36.jpg)
Globalcode – Open4education
Cadê o Web.Config?
Você pode ter outros tipos de arquivo de configWeb.Config
Config.ini
Config.json
Tudo depende do Configuration Model escolhidoPor padrão é o Microsoft.Framework.ConfigurationModel.Json
![Page 37: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/37.jpg)
Globalcode – Open4education
Compilação em memória
![Page 38: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/38.jpg)
Globalcode – Open4education
Deploy do runtime e framework com a sua
aplicação.
![Page 39: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/39.jpg)
Globalcode – Open4education
Nuget FTW!
![Page 40: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/40.jpg)
Globalcode – Open4education
Impactos na arquitetura(porque isso aqui é um evento de arquitetura)
![Page 41: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/41.jpg)
Globalcode – Open4education
![Page 42: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/42.jpg)
Globalcode – Open4education
O que roda sua aplicação não é uma dll
O código que vai rodar é .cs ou .vb
Você ainda pode precompilar
Deploy muito facilitadokpm pack
xcopy
Dependências locais, tudo que vai rodar está no diretório da aplicação
As dependências são nupkgs, não dlls
![Page 43: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/43.jpg)
Globalcode – Open4education
Servidor web
IIS funciona
Suporte a outros servidores são esperadosSelf host
Kestrel (self host feito pela Microsoft baseado em libuv – o mesmo do Nodejs)
Nginx
Apache
Devices menores agora podem rodar (roteadores wifi, modem, RaspberryPi, IoT, carros, etc)
![Page 44: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/44.jpg)
Globalcode – Open4education
POCO Controllers
Controllers não precisam mais herdar de uma classe base
Colaboram com interfaces que recebem via DI
100% testáveis
Muda bastante
E não muda quase nada
![Page 45: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/45.jpg)
Globalcode – Open4education
![Page 46: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/46.jpg)
Globalcode – Open4education
Projetos no .NET Foundation
ASP.NET MVC
ASP.NET SignalR
ASP.NET vNext
ASP.NET Web Pages
ASP.NET Web API
Composition (MEF2)
Couchbase for .NET
Entity Framework
Linq to Hive
Mailkit
Mimekit
MEF
MVVM Light Toolkit
.NET API for Hadoop WebClient
.NET Compiler Platform ("Roslyn")
.NET Map Reduce API for Hadoop
.NET Micro Framework
Open XML SDK
OWIN Authentication Middleware
Web Protection Library
Windows Azure .NET SDK
Windows Phone Toolkit
Salesforce Toolkits for .NET
System.Drawing
Xamarin.Auth
Xamarin.Mobile
![Page 47: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/47.jpg)
Globalcode – Open4education
Mais recursos
Home: http://asp.net/vnext
Repositório principal: https://github.com/aspnet/Home
Controle de projeto: http://huboard.com/aspnet/kruntime
Sala de chat: https://jabbr.net/#/rooms/AspNetvNext
Podcast Tecnoretórica:http://bit.ly/aspnetvnextpodcast1http://bit.ly/aspnetvnextpodcast2
ASP.NET vNext no blog da Lambda3:http://bit.ly/aspnetvnextlambda3
![Page 48: ASP.NET vNext no .NET Architects Days 2014](https://reader033.fdocuments.in/reader033/viewer/2022061210/548eec51b479594a748b46d3/html5/thumbnails/48.jpg)
Globalcode – Open4education
Obrigado!Giovanni Bassi
@giovannibassi
Victor Cavalcante
@vcavalcante