mvvm avançado para o windows phone 7 wph304 andré carlucci arquiteto de soluções way2 technology
TRANSCRIPT
![Page 1: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/1.jpg)
![Page 2: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/2.jpg)
MVVM avançado para o Windows Phone 7WPH304
André CarlucciArquiteto de SoluçõesWay2 Technology
![Page 3: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/3.jpg)
Mais um acrônimo esquisito?
MVVMMVC? MVP? ASDF?
APPI306: Alexandre Nardi, Jorge Tessinoe Leandro Lopes: 17:20
![Page 4: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/4.jpg)
MVVM
Model – View - ViewModel
OrtogonalidadeTestabilidade
Blendabilidade
![Page 5: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/5.jpg)
Presentation Model (MVVM)
Data Binding
Model View
Controller(ViewModel)
![Page 6: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/6.jpg)
MVVM - DataBinding
DataContext->Titulo
DataContext->Data
DataContext->Descrição
View ViewModel
![Page 7: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/7.jpg)
INotifyPropertyChanged
Aos interessados, novos valores!
Opa, vou me atualizar já!
View ViewModel
![Page 8: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/8.jpg)
demo
Conectando View e ViewModel
![Page 9: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/9.jpg)
Ações de Usuário
![Page 10: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/10.jpg)
Comandos
Mensagem da view para o viewmodelAplicável à
controles “button based”
ICommand interfaceEvent to
Command Frameworks
![Page 11: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/11.jpg)
ICommand
Posso executar?
Hmm... Ok!
Comando.Execute!
NotifyPropertyChanged
Model ViewModel
![Page 12: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/12.jpg)
demo
Mapeando eventos para métodos
![Page 13: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/13.jpg)
Separação de Responsabilidades
![Page 14: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/14.jpg)
O que não fica no ViewModel?
Chamadas para storage
WebServicesNavegação
O que for difícil de testar
![Page 15: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/15.jpg)
demo
Turbinando os ViewModelscom Serviços
![Page 16: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/16.jpg)
Fornecendo dados de design
![Page 17: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/17.jpg)
Pra quê?
Ver os dados em design mode
Facilita a vida do designer
Verificação visual de bindings
![Page 18: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/18.jpg)
Como?
Serviços reais não funcionam no designerUse serviços que fornecem dados “fake”
Service Providers
If (Em Modo Design) Use serviços de design
ElseUse serviços reais
![Page 19: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/19.jpg)
demo
Criando Design Time Data
![Page 20: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/20.jpg)
Comunicação Desacoplada
![Page 21: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/21.jpg)
Message Broker
PublicarMensagem
Mensagem
Mensagem
ViewModel
Messenger
ViewModel
View
Serviço
![Page 22: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/22.jpg)
demo
Utilizando umEvent Aggregator
![Page 23: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/23.jpg)
Conteúdo Relacionadotechnet.microsoft.com/pt-br/query/gg490347
Sudoku
create.msdn.com / Ferramentas e SDK
msdn.microsoft.com/pt-br/windowsphone
www.andrecarlucci.com
msdn.microsoft.com/pt-br/hh230679?ocid=otc-n-br-dca--ted_phone
![Page 24: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/24.jpg)
Palestras RelacionadasAPPI306 | MVC, MVP e MVVM: Uma Comparação
de Padrões Arquiteturais: 18:30
Resource 2
Resource 3
Resource 4
![Page 25: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/25.jpg)
Recursos
Recursos para IT Pros
Recursos para Desenvolvedores
http://technet.microsoft.com/pt-br
http://msdn.microsoft.com/pt-br
Getthefreemobileappforyourphonehttp://gettag.mobi
Getthefreemobileappforyourphonehttp://gettag.mobi
![Page 26: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/26.jpg)
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
?André Carlucciandrecarlucci.com@andrecarlucci
![Page 27: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/27.jpg)
Não esqueça de preencher sua
avaliação onlinewww.teched.com.br/
avaliacao
Getthefreemobileappforyourphonehttp://gettag.mobi
![Page 28: MVVM avançado para o Windows Phone 7 WPH304 André Carlucci Arquiteto de Soluções Way2 Technology](https://reader035.vdocuments.net/reader035/viewer/2022062316/570638481a28abb8238f4038/html5/thumbnails/28.jpg)
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.