0
Desmistificando o MVVMPedro Lamaspedro.lamas@pocketpt.nethttp://twitter.com/pedrolamashttp://www.pedrolamas.com
Pedro Lamas• Profissional de TI há +11 anos, especializado em tecnologias  Microsoft• Administrador no PocketPT.net, comun...
Desmistificando o MVVM• Introdução• Hello World• Currency Converter• Toolkits & Frameworks• Perguntas
DESMISTIFICANDO O MVVMintrodução
MVVM é…• Model – View – ViewModel• Apenas um pattern• Tudo o resto são helpers, toolkits, frameworks, etc.• Utilizado de b...
Esquematização do MVVM                 View          XAML      Notify         Binding               ViewModel      Notify ...
DESMISTIFICANDO O MVVMhello world
time for some code…
DESMISTIFICANDO O MVVMcurrency converter
Currency Converter• Objectivo base: criar um conversor de moedas• Arquitectura MVVM simples (sem helpers ou toolkits)• Uti...
time for some code…
DESMISTIFICANDO O MVVMtoolkits & frameworks
MVVM Light Toolkit• Laurent Bugnion• http://mvvmlight.codeplex.com• V3 disponibilizada no MIX10, V4 apresentada  no MIX11•...
Caliburn.Micro Framework• Rob Eisenberg• http://caliburnmicro.codeplex.com• Convenção em vez de configuração• Grande parte...
DESMISTIFICANDO O MVVMperguntas
ObrigadoPedro Lamaspedro.lamas@pocketpt.nethttp://twitter.com/pedrolamashttp://www.pedrolamas.com
Upcoming SlideShare
Loading in...5
×

Desmistificando o MVVM

631

Published on

Desmistificando o MVVM

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
631
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • The View is the basic XAML for the user interface (although sometimes it can have a C# file attached to it) that will use Data Binding to read and change properties on the ViewModel, and Actions to invoke the  methods.The ViewModel is the abstraction of the View and will do all the work for binding the View to the Model, with the necessary data conversion.The Model can represent the  actual object model instance in a known state, or just a data access layer.There is one basic rule in MVVM: don’t look up! The Model has no knowledge of either the ViewModel or the View, and the ViewModel has no knowledge of the View.This brings a new challenge on how to make the three components talk between themselves, and that’s where notifications come along! “its” instead of “the”? “represent”? There needs to be a word here.
  • Transcript of "Desmistificando o MVVM"

    1. 1. Desmistificando o MVVMPedro Lamaspedro.lamas@pocketpt.nethttp://twitter.com/pedrolamashttp://www.pedrolamas.com
    2. 2. Pedro Lamas• Profissional de TI há +11 anos, especializado em tecnologias Microsoft• Administrador no PocketPT.net, comunidade portuguesa de suporte a utilizadores de Windows Mobile /Windows Phone• Orador em eventos tecnológicos (Microsoft TechDays & DevDays, Seminários PocketPT.net, Faculdades…)• Actualmente Senior Solution Developer na DevScope• “Geek”
    3. 3. Desmistificando o MVVM• Introdução• Hello World• Currency Converter• Toolkits & Frameworks• Perguntas
    4. 4. DESMISTIFICANDO O MVVMintrodução
    5. 5. MVVM é…• Model – View – ViewModel• Apenas um pattern• Tudo o resto são helpers, toolkits, frameworks, etc.• Utilizado de base no Silverlight e do WPF
    6. 6. Esquematização do MVVM View XAML Notify Binding ViewModel Notify C#, VB.net Model
    7. 7. DESMISTIFICANDO O MVVMhello world
    8. 8. time for some code…
    9. 9. DESMISTIFICANDO O MVVMcurrency converter
    10. 10. Currency Converter• Objectivo base: criar um conversor de moedas• Arquitectura MVVM simples (sem helpers ou toolkits)• Utilizar o Bing como fonte de dados
    11. 11. time for some code…
    12. 12. DESMISTIFICANDO O MVVMtoolkits & frameworks
    13. 13. MVVM Light Toolkit• Laurent Bugnion• http://mvvmlight.codeplex.com• V3 disponibilizada no MIX10, V4 apresentada no MIX11• “Keep it small”• “Keep it simple”
    14. 14. Caliburn.Micro Framework• Rob Eisenberg• http://caliburnmicro.codeplex.com• Convenção em vez de configuração• Grande parte das necessidades do WP7 estão contempladas
    15. 15. DESMISTIFICANDO O MVVMperguntas
    16. 16. ObrigadoPedro Lamaspedro.lamas@pocketpt.nethttp://twitter.com/pedrolamashttp://www.pedrolamas.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×