SlideShare ist ein Scribd-Unternehmen logo
1 von 30
A Smooth
Transition to
HTML5

Using MVVM
Development Patterns
About: me



Chris Bannon
@b4nn0n
chrisb@wijmo.com
Wijmo

• 40+ Widgets
• Built on jQuery UI
• Powered by HTML5
• Themed with Themeroller
• Supports MVVM
About: session

• Philosophical (warning: lot’s of talking)
• Share our approach on porting to HTML5
  – General guidelines
  – Tools
  – Pitfalls
• Show some code!
Real World
Examples
Why Use
HTML5?


“Virtually every
computing device
supports HTML and
JavaScript”
Benefits of Using
HTML5
• Mobile
• Performance
• Shared code in multiple platforms
  – Mobile Web
  – Native Mobile (PhoneGap)
  – Desktop Web
  – Native Desktop (Win8)
Principles When
Migrating to HTML5

• Port your programming knowledge
• Port your patterns & practices
• Port your code conventions
• Port your business logic, not your code
How to Migrate
to HTML5
How Can You Port
to HTML5?
Use a familiar development pattern: MVVM
  – Widely used by Silverlight developers
  – Use Knockout for MVVM in JavaScript
  – Use UI controls with MVVM support for
   quicker development
What is MVVM?

• Model
  – Data for an application
  – Example: Web service
• ViewModel
  – Pure code representation of UI Model
  – Example: JavaScript Class or Object
• View
  – Visible and Interactive UI
  – Example: HTML, CSS & JavaScript UI
Example
ViewModel Usage
var myViewModel = {
    personName: ko.observable('Bob'),
    personAge: ko.observable(123)
};
ko.applyBindings(myViewModel);



<span data-bind="text: personName"></span>
MVVM Examples



Using Knockout for
MVVM in JavaScript
Porting the Model

Use the same Model/Datasource
  – Most JavaScript apps can use the same
   services
Porting the
ViewModel
Port the ViewModel
  – Create JavaScript Objects/Classes that match
   their equivalents in C#
  – Hook up observability using Knockout
  – Remember to focus on porting business
   logic, not code
Porting the View

Port the View
  – Create HTML markup that represents your UI
   (similar to what you have in XAML)
  – Add data-bind attributes to bind markup to the
   View-Model
  – Use data-bind attributes to turn markup into
   UI Controls (like jQuery UI widgets)
The Benefits of
Using MVVM
Shorter
Development Cycles
• MVVM separates development clearly
  between Data, Code and UI
• Each layer can be developed in parallel
  and individually
• Minimizes turnaround time
Improved Reliability
& Easier
Maintenance
• ViewModels are testable
• ViewModels easily integrate with Unit
  Tests
• Unit Tests become assets to the project
  during the lifecycle of the application
• Maintenance made easier with automated
  tests
More Predictable
Development Cycles
• Our steps in development:
  – Design the View (general appearance and
    behavior)
  – Design the ViewModel to support the View
  – Implement the ViewModel
  – Implement the View
• This allows us to more easily estimate
  time/cost for each step
Improved Quality

• Less overlap between developers and
  designers
• Each can focus on their specialty and
  deliver higher quality
• Both can work simultaneously
Flexibility

• Loose coupling between Views and
  ViewModels
• Multiple Views can use a single
  ViewModel
• Easily make Mobile, Desktop or other
  custom Views against a single ViewModel
Standardization

• Use the same binding mechanisms in multiple
  applications
• Once initially developed these assets can be
  reused in new applications
  –   Markup
  –   Styles
  –   UI Controls
  –   Common Input Forms
  –   Libraries (Globalization, shared functions, etc)
Challenges
When Porting to
HTML5
Development
Tools
JavaScript development tools are not as
mature as Silverlight’s
  – Compile-time error detection
  – Code re-factoring
  – IntelliSense (Code Auto-complete /
    Suggestions)
UI Controls

Silverlight has a wider variety of UI controls
available to developers
  – Only basic elements in HTML to use
  – Usually need to use a library of UI Controls
  – More difficult to create controls in HTML than
    in Silverlight
Data Access

Silverlight provides a rich and mature set of
business data tools
  – No concept of data queries
  – Rich data features are not native to
    collections (arrays)
  – Must use ajax to call services and consume
    data
Questions?
Resources

• Wijmo MVVM Support
  http://wijmo.com/widgets/mvvm-support/
• Download Wijmo
  http://wijmo.com/downloads/
• Knockout
  http://knockoutjs.com/
• Contact Me
  @b4nn0n
  chrisb@wijmo.com
Thanks for
Joining!

Weitere ähnliche Inhalte

Was ist angesagt?

Building web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm patternBuilding web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm patternAspenware
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentationJohn Staveley
 
AngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoAngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoChris Bannon
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introductionBhagath Gopinath
 
Website development &amp; it's trends
Website development &amp; it's trendsWebsite development &amp; it's trends
Website development &amp; it's trendsSunCart Store
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSM R Rony
 
Visualizing large data sets with wijmo enterprise webinar
Visualizing large data sets with wijmo enterprise webinarVisualizing large data sets with wijmo enterprise webinar
Visualizing large data sets with wijmo enterprise webinarRoss Dederer
 
Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizLohith Goudagere Nagaraj
 
Combining HTML5 with MVC framework to simplify realtime collaboration for we...
Combining HTML5 with MVC framework to simplify  realtime collaboration for we...Combining HTML5 with MVC framework to simplify  realtime collaboration for we...
Combining HTML5 with MVC framework to simplify realtime collaboration for we...Gopikrishnan Sasikumar
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and FrameworkChandrasekar G
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSirwan Afifi
 
Single page applications
Single page applicationsSingle page applications
Single page applicationsDiego Cardozo
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)Hatem Hamad
 

Was ist angesagt? (20)

Building web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm patternBuilding web applications using kendo ui and the mvvm pattern
Building web applications using kendo ui and the mvvm pattern
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 
AngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo TokyoAngularJS - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo Tokyo
 
Asp.net mvc basic introduction
Asp.net mvc basic introductionAsp.net mvc basic introduction
Asp.net mvc basic introduction
 
Asp.net mvc 4
Asp.net mvc 4Asp.net mvc 4
Asp.net mvc 4
 
Website development &amp; it's trends
Website development &amp; it's trendsWebsite development &amp; it's trends
Website development &amp; it's trends
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
Visualizing large data sets with wijmo enterprise webinar
Visualizing large data sets with wijmo enterprise webinarVisualizing large data sets with wijmo enterprise webinar
Visualizing large data sets with wijmo enterprise webinar
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataViz
 
MVVM with Kendo UI
MVVM with Kendo UIMVVM with Kendo UI
MVVM with Kendo UI
 
Combining HTML5 with MVC framework to simplify realtime collaboration for we...
Combining HTML5 with MVC framework to simplify  realtime collaboration for we...Combining HTML5 with MVC framework to simplify  realtime collaboration for we...
Combining HTML5 with MVC framework to simplify realtime collaboration for we...
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
Mvc
MvcMvc
Mvc
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
MVVM & Validation with Kendo UI
MVVM & Validation with Kendo UIMVVM & Validation with Kendo UI
MVVM & Validation with Kendo UI
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Mvc fundamental
Mvc fundamentalMvc fundamental
Mvc fundamental
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
Asp.net mvc
Asp.net mvcAsp.net mvc
Asp.net mvc
 

Ähnlich wie A Smooth Transition to HTML5 Using MVVM

Divya ASP Developer
Divya ASP Developer Divya ASP Developer
Divya ASP Developer divya k
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Gill Cleeren
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Jeremy Likness
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncubeMalisa Ncube
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVMJiri Danihelka
 
Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Jon Petter Hjulstad
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern ApplicationsJeremy Likness
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservicesAnil Allewar
 
Introduction to Visual studio 2012
Introduction to Visual studio 2012 Introduction to Visual studio 2012
Introduction to Visual studio 2012 Prashant Chaudhary
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
Visual Studio 2015 - Lançamento está próximo
Visual Studio 2015 - Lançamento está próximoVisual Studio 2015 - Lançamento está próximo
Visual Studio 2015 - Lançamento está próximoDaniel Semedo
 
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...SPTechCon
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonMike Byrne
 
Ruby on Rails & Version Control
Ruby on Rails & Version ControlRuby on Rails & Version Control
Ruby on Rails & Version ControlYash Mittal
 
Webpage Design Using Templates and Online WYSIWYG Platforms
Webpage Design Using Templates and Online WYSIWYG PlatformsWebpage Design Using Templates and Online WYSIWYG Platforms
Webpage Design Using Templates and Online WYSIWYG Platformsshelanie oliquino
 

Ähnlich wie A Smooth Transition to HTML5 Using MVVM (20)

Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Divya ASP Developer
Divya ASP Developer Divya ASP Developer
Divya ASP Developer
 
Advanced MVVM in Windows 8
Advanced MVVM in Windows 8Advanced MVVM in Windows 8
Advanced MVVM in Windows 8
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
ASP.NET MVC Best Practices malisa ncube
ASP.NET MVC Best Practices   malisa ncubeASP.NET MVC Best Practices   malisa ncube
ASP.NET MVC Best Practices malisa ncube
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Prism library and MVVM
Prism library and MVVMPrism library and MVVM
Prism library and MVVM
 
Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17Status Quo on the automation support in SOA Suite OGhTech17
Status Quo on the automation support in SOA Suite OGhTech17
 
Mvc part 1
Mvc part 1Mvc part 1
Mvc part 1
 
MVVM for Modern Applications
MVVM for Modern ApplicationsMVVM for Modern Applications
MVVM for Modern Applications
 
Adopting MVVM
Adopting MVVMAdopting MVVM
Adopting MVVM
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
Introduction to Visual studio 2012
Introduction to Visual studio 2012 Introduction to Visual studio 2012
Introduction to Visual studio 2012
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Visual Studio 2015 - Lançamento está próximo
Visual Studio 2015 - Lançamento está próximoVisual Studio 2015 - Lançamento está próximo
Visual Studio 2015 - Lançamento está próximo
 
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
 
NServiceBus Mule ESB Comparison
NServiceBus Mule ESB ComparisonNServiceBus Mule ESB Comparison
NServiceBus Mule ESB Comparison
 
Ruby on Rails & Version Control
Ruby on Rails & Version ControlRuby on Rails & Version Control
Ruby on Rails & Version Control
 
Webpage Design Using Templates and Online WYSIWYG Platforms
Webpage Design Using Templates and Online WYSIWYG PlatformsWebpage Design Using Templates and Online WYSIWYG Platforms
Webpage Design Using Templates and Online WYSIWYG Platforms
 

Kürzlich hochgeladen

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Kürzlich hochgeladen (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

A Smooth Transition to HTML5 Using MVVM

  • 1. A Smooth Transition to HTML5 Using MVVM Development Patterns
  • 3. Wijmo • 40+ Widgets • Built on jQuery UI • Powered by HTML5 • Themed with Themeroller • Supports MVVM
  • 4. About: session • Philosophical (warning: lot’s of talking) • Share our approach on porting to HTML5 – General guidelines – Tools – Pitfalls • Show some code!
  • 6. Why Use HTML5? “Virtually every computing device supports HTML and JavaScript”
  • 7. Benefits of Using HTML5 • Mobile • Performance • Shared code in multiple platforms – Mobile Web – Native Mobile (PhoneGap) – Desktop Web – Native Desktop (Win8)
  • 8. Principles When Migrating to HTML5 • Port your programming knowledge • Port your patterns & practices • Port your code conventions • Port your business logic, not your code
  • 10. How Can You Port to HTML5? Use a familiar development pattern: MVVM – Widely used by Silverlight developers – Use Knockout for MVVM in JavaScript – Use UI controls with MVVM support for quicker development
  • 11. What is MVVM? • Model – Data for an application – Example: Web service • ViewModel – Pure code representation of UI Model – Example: JavaScript Class or Object • View – Visible and Interactive UI – Example: HTML, CSS & JavaScript UI
  • 12. Example ViewModel Usage var myViewModel = { personName: ko.observable('Bob'), personAge: ko.observable(123) }; ko.applyBindings(myViewModel); <span data-bind="text: personName"></span>
  • 13. MVVM Examples Using Knockout for MVVM in JavaScript
  • 14. Porting the Model Use the same Model/Datasource – Most JavaScript apps can use the same services
  • 15. Porting the ViewModel Port the ViewModel – Create JavaScript Objects/Classes that match their equivalents in C# – Hook up observability using Knockout – Remember to focus on porting business logic, not code
  • 16. Porting the View Port the View – Create HTML markup that represents your UI (similar to what you have in XAML) – Add data-bind attributes to bind markup to the View-Model – Use data-bind attributes to turn markup into UI Controls (like jQuery UI widgets)
  • 18. Shorter Development Cycles • MVVM separates development clearly between Data, Code and UI • Each layer can be developed in parallel and individually • Minimizes turnaround time
  • 19. Improved Reliability & Easier Maintenance • ViewModels are testable • ViewModels easily integrate with Unit Tests • Unit Tests become assets to the project during the lifecycle of the application • Maintenance made easier with automated tests
  • 20. More Predictable Development Cycles • Our steps in development: – Design the View (general appearance and behavior) – Design the ViewModel to support the View – Implement the ViewModel – Implement the View • This allows us to more easily estimate time/cost for each step
  • 21. Improved Quality • Less overlap between developers and designers • Each can focus on their specialty and deliver higher quality • Both can work simultaneously
  • 22. Flexibility • Loose coupling between Views and ViewModels • Multiple Views can use a single ViewModel • Easily make Mobile, Desktop or other custom Views against a single ViewModel
  • 23. Standardization • Use the same binding mechanisms in multiple applications • Once initially developed these assets can be reused in new applications – Markup – Styles – UI Controls – Common Input Forms – Libraries (Globalization, shared functions, etc)
  • 25. Development Tools JavaScript development tools are not as mature as Silverlight’s – Compile-time error detection – Code re-factoring – IntelliSense (Code Auto-complete / Suggestions)
  • 26. UI Controls Silverlight has a wider variety of UI controls available to developers – Only basic elements in HTML to use – Usually need to use a library of UI Controls – More difficult to create controls in HTML than in Silverlight
  • 27. Data Access Silverlight provides a rich and mature set of business data tools – No concept of data queries – Rich data features are not native to collections (arrays) – Must use ajax to call services and consume data
  • 29. Resources • Wijmo MVVM Support http://wijmo.com/widgets/mvvm-support/ • Download Wijmo http://wijmo.com/downloads/ • Knockout http://knockoutjs.com/ • Contact Me @b4nn0n chrisb@wijmo.com

Hinweis der Redaktion

  1. Complete kit of UI widgets for HTML5 and jQuery developmentUnmatched Data Visualization  and Grid componentsHandcrafted CSS3 Themes and infinite possibilities  with ThemerollerWorks everywhere – devices and browsers supported40+ jQuery UI Widgets
  2. Design the View (general appearance and behavior of the application)Design the ViewModel to support the ViewImplement the ViewModelImplement the View