SlideShare a Scribd company logo
1 of 18
The ViewModel Pattern Simone ChiarettaArchitect, Council of the EU http://codeclimber.net.nz Twitter: @simonech June 23rd, 2010
Who the hell am I? Simone Chiaretta Microsoft MVP ASP.NET ASP Insider Blogger – http://codeclimber.net.nz ItalianALT.NET UG Founder OpenSource developer Climber All Around Nice Guy Disclaimer:"The viewsexpressed are purelythose of the speaker and may not in anycircumstancesberegarded as stating an official position of the Council"
WhatisViewModel
Workflow of a MVC Application Controller asks for the data to the Model The request gets to the Controller Model 2 1 3 Controller Browser Model returns the data back to the Controller Controller formats data and sends them to the View View 4 5 View builds the page that is sent back to the Browser 3
Workflow of a MVC Application Controller asks for the DomainModel to the BLL The request gets to the Controller BLL 2 1 3 Controller Browser BLL returns the DomainModel to the Controller Controller formats DomainModelinto ViewModeland sends it to the View View 4 5 View builds the page that is sent back to the Browser 4
DomainModel != ViewModel DomainModel Data + Behaviours Hierarchical, complex types ViewModel Only Data Flat, only strings
WhyDomainModelisnotgood? Viewsshouldnotknowhowto traverse the DM Viewsusuallyneedlessproperties UsingORMsyoumight start a SQL querybymistake
Howto do it? Copy the propertiesneededfrom DM to VM Possiblyflatten data
DomainModel != ViewModel How to avoid getting bored writing tedious mapping code?
IntroducingAutoMapper
Automapper DevelopedbyJimmyBogard Latestrelease 1.1 Active Mailing list Downloadablefrom: http://automapper.codeplex.com/
Features Flattening Projection FluentAPIconfiguration Mapping of List and Collections Mapping of NestedObjects CustomTypeConverter CustomValueResolver CustomFormatters NullSubstitution
Basic Usage DefineMapping Mapper.CreateMap<Post, ShowPostModel>(); UseMapping Mapper.Map<ListModel, ListViewModel>(viewModel)
Projection Mapper.CreateMap<EditPageViewModel, Post>() 	.ForMember( 			p => p.Id, opt => opt.MapFrom(src => src.Post.Id))
CustomValueResolver Mapper.CreateMap<EditPageViewModel, Post>() 	.ForMember( 		p => p.Category, opt => opt.ResolveUsing<CustomResolver>() ) public class CustomResolver : ValueResolver<EditPageViewModel, Category> { 	protected override Category ResolveCore( EditPageViewModel source) 	{ 		return new InMemoryPostModel() 			.GetCategory(source.Post.CategoryId); 	} }
NullSubstitution Mapper.CreateMap<Post, ShowPostModel>()         .ForMember( 			p => p.CategoryName, opt => opt.NullSubstitute("No Category") 		);
Contacts – Simone Chiaretta MSN: simone_ch@hotmail.com Blog: English: http://codeclimber.net.nz/ Italian: http://blogs.ugidotnet.org/piyo/ Twitter: @simonech 16
Rating If you liked this talk, please consider rating it: http://speakerrate.com/talks/3670-the-viewmodel-pattern 17 Disclaimer:"The viewsexpressed are purelythose of the speaker and may not in anycircumstancesberegarded as stating an official position of the Council"

More Related Content

Similar to The ViewModel Pattern with AutoMapper for Flattening and Mapping Data

ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC Introductionkishanzunjare
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsCallon Campbell
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC StructureDipika Wadhvani
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Thomas Robbins
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architectureravindraquicsolv
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe
 
Joe Ulyatt MVC Lecture
Joe Ulyatt MVC LectureJoe Ulyatt MVC Lecture
Joe Ulyatt MVC Lecturessuser7e32f9
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksCiklum Ukraine
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Jennie Gajjar
 
Introduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsIntroduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsCallon Campbell
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Rich Helton
 
OpenB Web Engine - Conceptual overview
OpenB Web Engine - Conceptual overviewOpenB Web Engine - Conceptual overview
OpenB Web Engine - Conceptual overviewWilko van der Veen
 

Similar to The ViewModel Pattern with AutoMapper for Flattening and Mapping Data (20)

ASP.NET MVC Introduction
ASP.NET MVC IntroductionASP.NET MVC Introduction
ASP.NET MVC Introduction
 
Mvc part 1
Mvc part 1Mvc part 1
Mvc part 1
 
Mvc
MvcMvc
Mvc
 
Serverless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable FunctionsServerless Orchestration with Azure Durable Functions
Serverless Orchestration with Azure Durable Functions
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Ppt of Basic MVC Structure
Ppt of Basic MVC StructurePpt of Basic MVC Structure
Ppt of Basic MVC Structure
 
L10 Web Programming
L10 Web ProgrammingL10 Web Programming
L10 Web Programming
 
Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013Getting started with MVC 5 and Visual Studio 2013
Getting started with MVC 5 and Visual Studio 2013
 
Introduction to mvc architecture
Introduction to mvc architectureIntroduction to mvc architecture
Introduction to mvc architecture
 
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
 
Joe Ulyatt MVC Lecture
Joe Ulyatt MVC LectureJoe Ulyatt MVC Lecture
Joe Ulyatt MVC Lecture
 
Model-View-Controller: Tips&Tricks
Model-View-Controller: Tips&TricksModel-View-Controller: Tips&Tricks
Model-View-Controller: Tips&Tricks
 
ASP.NET MVC
ASP.NET MVCASP.NET MVC
ASP.NET MVC
 
No brainer
No brainerNo brainer
No brainer
 
Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01Mvc 130330091359-phpapp01
Mvc 130330091359-phpapp01
 
Introduction to serverless compute with azure functions
Introduction to serverless compute with azure functionsIntroduction to serverless compute with azure functions
Introduction to serverless compute with azure functions
 
Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4Overview of CSharp MVC3 and EF4
Overview of CSharp MVC3 and EF4
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 
OpenB Web Engine - Conceptual overview
OpenB Web Engine - Conceptual overviewOpenB Web Engine - Conceptual overview
OpenB Web Engine - Conceptual overview
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 

More from Simone Chiaretta

Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...Simone Chiaretta
 
OpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the oceanOpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the oceanSimone Chiaretta
 
What's new in asp.net mvc 4
What's new in asp.net mvc 4What's new in asp.net mvc 4
What's new in asp.net mvc 4Simone Chiaretta
 
FeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReaderFeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReaderSimone Chiaretta
 
Ruby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVCRuby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVCSimone Chiaretta
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Simone Chiaretta
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comLavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comSimone Chiaretta
 

More from Simone Chiaretta (10)

Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
Fast and furious(ly) multilingual: Publishing of EU politics in 24 languages ...
 
OpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the oceanOpenROV: Node.js takes a dive into the ocean
OpenROV: Node.js takes a dive into the ocean
 
La UX delle cose
La UX delle coseLa UX delle cose
La UX delle cose
 
UGIALT.net Keynote
UGIALT.net KeynoteUGIALT.net Keynote
UGIALT.net Keynote
 
What's new in asp.net mvc 4
What's new in asp.net mvc 4What's new in asp.net mvc 4
What's new in asp.net mvc 4
 
FeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReaderFeedTso, History of a WP7 FeedReader
FeedTso, History of a WP7 FeedReader
 
Ruby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVCRuby on Rails vs ASP.NET MVC
Ruby on Rails vs ASP.NET MVC
 
Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)Design for testability as a way to good coding (SOLID and IoC)
Design for testability as a way to good coding (SOLID and IoC)
 
ASP.NET MVC Extensibility
ASP.NET MVC ExtensibilityASP.NET MVC Extensibility
ASP.NET MVC Extensibility
 
Lavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.comLavorare con applicazioni Brownfield: il caso di 39x27.com
Lavorare con applicazioni Brownfield: il caso di 39x27.com
 

Recently uploaded

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 

The ViewModel Pattern with AutoMapper for Flattening and Mapping Data

  • 1. The ViewModel Pattern Simone ChiarettaArchitect, Council of the EU http://codeclimber.net.nz Twitter: @simonech June 23rd, 2010
  • 2. Who the hell am I? Simone Chiaretta Microsoft MVP ASP.NET ASP Insider Blogger – http://codeclimber.net.nz ItalianALT.NET UG Founder OpenSource developer Climber All Around Nice Guy Disclaimer:"The viewsexpressed are purelythose of the speaker and may not in anycircumstancesberegarded as stating an official position of the Council"
  • 4. Workflow of a MVC Application Controller asks for the data to the Model The request gets to the Controller Model 2 1 3 Controller Browser Model returns the data back to the Controller Controller formats data and sends them to the View View 4 5 View builds the page that is sent back to the Browser 3
  • 5. Workflow of a MVC Application Controller asks for the DomainModel to the BLL The request gets to the Controller BLL 2 1 3 Controller Browser BLL returns the DomainModel to the Controller Controller formats DomainModelinto ViewModeland sends it to the View View 4 5 View builds the page that is sent back to the Browser 4
  • 6. DomainModel != ViewModel DomainModel Data + Behaviours Hierarchical, complex types ViewModel Only Data Flat, only strings
  • 7. WhyDomainModelisnotgood? Viewsshouldnotknowhowto traverse the DM Viewsusuallyneedlessproperties UsingORMsyoumight start a SQL querybymistake
  • 8. Howto do it? Copy the propertiesneededfrom DM to VM Possiblyflatten data
  • 9. DomainModel != ViewModel How to avoid getting bored writing tedious mapping code?
  • 11. Automapper DevelopedbyJimmyBogard Latestrelease 1.1 Active Mailing list Downloadablefrom: http://automapper.codeplex.com/
  • 12. Features Flattening Projection FluentAPIconfiguration Mapping of List and Collections Mapping of NestedObjects CustomTypeConverter CustomValueResolver CustomFormatters NullSubstitution
  • 13. Basic Usage DefineMapping Mapper.CreateMap<Post, ShowPostModel>(); UseMapping Mapper.Map<ListModel, ListViewModel>(viewModel)
  • 14. Projection Mapper.CreateMap<EditPageViewModel, Post>() .ForMember( p => p.Id, opt => opt.MapFrom(src => src.Post.Id))
  • 15. CustomValueResolver Mapper.CreateMap<EditPageViewModel, Post>() .ForMember( p => p.Category, opt => opt.ResolveUsing<CustomResolver>() ) public class CustomResolver : ValueResolver<EditPageViewModel, Category> { protected override Category ResolveCore( EditPageViewModel source) { return new InMemoryPostModel() .GetCategory(source.Post.CategoryId); } }
  • 16. NullSubstitution Mapper.CreateMap<Post, ShowPostModel>() .ForMember( p => p.CategoryName, opt => opt.NullSubstitute("No Category") );
  • 17. Contacts – Simone Chiaretta MSN: simone_ch@hotmail.com Blog: English: http://codeclimber.net.nz/ Italian: http://blogs.ugidotnet.org/piyo/ Twitter: @simonech 16
  • 18. Rating If you liked this talk, please consider rating it: http://speakerrate.com/talks/3670-the-viewmodel-pattern 17 Disclaimer:"The viewsexpressed are purelythose of the speaker and may not in anycircumstancesberegarded as stating an official position of the Council"