1 / 17

Calidad de Software y patrones de diseño en Windows Phone 7.5

Calidad de Software y patrones de diseño en Windows Phone 7.5 . Luis Guerrero (lguerrero@plainconcepts.com) Senior Developer at Plain Concepts. Agenda. El patrón MVVM ( Model -View View- Model ) Testing unitario con Visual Studio 2010 Integración con Visual Studio Team Building.

kagami
Download Presentation

Calidad de Software y patrones de diseño en Windows Phone 7.5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Calidad de Software y patrones de diseño en Windows Phone 7.5 Luis Guerrero (lguerrero@plainconcepts.com) SeniorDeveloper at PlainConcepts

  2. Agenda El patrón MVVM (Model-View View-Model) Testing unitario con Visual Studio 2010 Integración con Visual Studio TeamBuilding

  3. MV-VM View Model Model View Model INotifyPropertyChanged Commands Execute PropertyChanged Binding View

  4. Frameworks de MVVM Prism – Microsoft MVVM Light Simple MVVM Caliburn

  5. Silverlight 4 • Windows Phone 7.5 (Mango) soporta Silverlight 4 al completo, incluyendo: • Soporte completo a comandos • Interfaz ICommand • Button tiene soporte de comandos

  6. Implementando MVVM Podemos implementar MVVM con una clase base que implemente INotifyPropertyChanged

  7. Lector RSS

  8. Demo CreandonuestrosViewModel

  9. Testing Si queremos hacer nuestros ViewModeltesteables, podemos separar la funcionalidad que obtiene los datos del ViewModel en sí. Para conseguir esto podemos usar inversión de control (IoC) y luego hacer un mock sobre el componente que descarga los datos.

  10. Services RssViewModel RssService IRssService Visual Studio 2010 Testing MockRssService

  11. Moq es una librería de mocking que permite generar objetos virtuales para simular objetos durante el testing. http://code.google.com/p/moq/

  12. Demo Descargando los datos

  13. Testeando nuestro ViewModel Podemos usar Visual Studio para el testing de nuestros ViewModels. Silverlight 4 es compatible a nivel binario con WPF4. Podemos crear un nuevo proyecto de Testing y agregar las referencias de Silverlight al proyecto para compilar.

  14. Demo Escribiendo test unitarios de nuestros ViewModels

  15. Conclusiones Con Windows Phone 7.5 ya no tenemos excusa para hacer testing de nuestros ViewModels Podemos integrar el testing en Visual Studio 2010 y en TFS Build.

  16. Gracias  ¿Preguntas?

More Related