A Smooth Transition to HTML5
Using MVVM Development Patterns
@b4nn0n
    chrisb@wijmo.com



CHRIS BANNON
WIJMO – UI FOR THE WEB

• 40+ Widgets
• Built on jQuery UI
• Powered by HTML5
• Themed with Themeroller
• Works Everywhere
• Supports MVVM
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 Flex/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>
PORTING THE MODEL

Use the same Model/Datasource
  – Most JavaScript apps can use the same
   services
PORTING THE VIEW-MODEL

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 MXML/XAML)
  – Add data-bind attributes to bind markup to the
    View-Model
  – Use data-bind attributes to turn markup into UI
    Controls (like Wijmo 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 Flex/Silverlight’s
  – Compile-time error detection

  – Code re-factoring

  – IntelliSense (Code Auto-complete /
    Suggestions)
UI CONTROLS

Flex/Silverlight have 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 Flex/Silverlight
DATA ACCESS

Flex/Silverlight provide 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!

More Related Content

PDF
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
PPTX
A Smooth Transition to HTML5 Using MVVM
PDF
ASP.NET MVC 4 Introduction
PPTX
Single page application and Framework
PPT
Comparative analysis of java script framework
PPTX
Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014
PDF
Introduction To Single Page Application
PPTX
Rise of the responsive single page application
Migrating to HTML5, Migrating Silverlight to HTML5, Migration Applications t...
A Smooth Transition to HTML5 Using MVVM
ASP.NET MVC 4 Introduction
Single page application and Framework
Comparative analysis of java script framework
Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014
Introduction To Single Page Application
Rise of the responsive single page application

What's hot (20)

PDF
Single page applications
PPTX
Website development &amp; it's trends
PPT
Introduction to ASP.NET MVC 1.0
PPTX
Lap Around ASP.NET MVC 5
PDF
Single Page Applications
PPTX
Single Page Application Development with backbone.js and Simple.Web
PPT
PPTX
Single Page Application
PPTX
Modern Applications With Asp.net Core 5 and Vue JS 3
PPTX
Micro-frontends – is it a new normal?
PPTX
Eureko frameworks
PPTX
Lightswitch
PPTX
WebNetConf 2012 - Single Page Apps
PPSX
Web technologies practical guide
PPTX
Benefits of developing a Single Page Web Applications using AngularJS
PPTX
Combining HTML5 with MVC framework to simplify realtime collaboration for we...
PPTX
Building web applications using kendo ui and the mvvm pattern
PPTX
Full stack devlopment using django main ppt
KEY
Features: A better way to package stuff in Drupal
PDF
Fork CMS
Single page applications
Website development &amp; it's trends
Introduction to ASP.NET MVC 1.0
Lap Around ASP.NET MVC 5
Single Page Applications
Single Page Application Development with backbone.js and Simple.Web
Single Page Application
Modern Applications With Asp.net Core 5 and Vue JS 3
Micro-frontends – is it a new normal?
Eureko frameworks
Lightswitch
WebNetConf 2012 - Single Page Apps
Web technologies practical guide
Benefits of developing a Single Page Web Applications using AngularJS
Combining HTML5 with MVC framework to simplify realtime collaboration for we...
Building web applications using kendo ui and the mvvm pattern
Full stack devlopment using django main ppt
Features: A better way to package stuff in Drupal
Fork CMS

Similar to A Smooth Transition to HTML5 (20)

PPTX
Training: MVVM Pattern
DOCX
Divya ASP Developer
PDF
The future of web development write once, run everywhere with angular js an...
PPTX
The future of web development write once, run everywhere with angular.js and ...
PPTX
Building databound JavaScript apps with Knockoutjs
PPTX
Introduction to Visual studio 2012
PPTX
Amazon Web Services and PaaS - Enterprise Java for the Cloud Era? - Mark Pric...
PDF
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
DOC
Senior .Net Developer - Senthil Ravindranath
PPTX
Mvc presentation
PPTX
Accelerating time to delivery: Modernizing Application Development
PPTX
Webpage Design Using Templates and Online WYSIWYG Platforms
PDF
Development Workshop on ET1, Android and Motorola RhoElements
PPTX
Getting started with Xamarin forms
PPTX
Mobile and IBM Worklight Best Practices
PPTX
Advanced MVVM in Windows 8
PPTX
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
PPTX
Adopting MVVM
PPTX
Building SPA’s (Single Page App) with Backbone.js
PPTX
Mobile App Architectures & Coding guidelines
Training: MVVM Pattern
Divya ASP Developer
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 ...
Building databound JavaScript apps with Knockoutjs
Introduction to Visual studio 2012
Amazon Web Services and PaaS - Enterprise Java for the Cloud Era? - Mark Pric...
Integrating SharePoint 2010, 2013 and Visual Studio Lightswitch by Rob Windso...
Senior .Net Developer - Senthil Ravindranath
Mvc presentation
Accelerating time to delivery: Modernizing Application Development
Webpage Design Using Templates and Online WYSIWYG Platforms
Development Workshop on ET1, Android and Motorola RhoElements
Getting started with Xamarin forms
Mobile and IBM Worklight Best Practices
Advanced MVVM in Windows 8
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Adopting MVVM
Building SPA’s (Single Page App) with Backbone.js
Mobile App Architectures & Coding guidelines

More from Chris Bannon (8)

PPTX
Inside Wijmo 5 - GrapeCity Echo 2016
PPTX
Migrating MVVM Applications to HTML5
PPTX
Inside Wijmo 5, a Large-scale JavaScript Product
PPTX
Wijmo 5 - GrapeCity Echo Tokyo
PPTX
AngularJS - GrapeCity Echo Tokyo
PPTX
Welcome to Wijmo 5
PDF
Wijmo 2013v1
PPTX
Data Visualization & HTML5 - Swedish Edition
Inside Wijmo 5 - GrapeCity Echo 2016
Migrating MVVM Applications to HTML5
Inside Wijmo 5, a Large-scale JavaScript Product
Wijmo 5 - GrapeCity Echo Tokyo
AngularJS - GrapeCity Echo Tokyo
Welcome to Wijmo 5
Wijmo 2013v1
Data Visualization & HTML5 - Swedish Edition

Recently uploaded (20)

PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PDF
substrate PowerPoint Presentation basic one
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
EIS-Webinar-Regulated-Industries-2025-08.pdf
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PPTX
Information-Technology-in-Human-Society.pptx
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
The AI Revolution in Customer Service - 2025
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
Altius execution marketplace concept.pdf
PDF
Launch a Bumble-Style App with AI Features in 2025.pdf
PDF
Co-training pseudo-labeling for text classification with support vector machi...
Lung cancer patients survival prediction using outlier detection and optimize...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
How to Convert Tickets Into Sales Opportunity in Odoo 18
substrate PowerPoint Presentation basic one
Build automations faster and more reliably with UiPath ScreenPlay
EIS-Webinar-Regulated-Industries-2025-08.pdf
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
CEH Module 2 Footprinting CEH V13, concepts
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Information-Technology-in-Human-Society.pptx
Early detection and classification of bone marrow changes in lumbar vertebrae...
Introduction to MCP and A2A Protocols: Enabling Agent Communication
The AI Revolution in Customer Service - 2025
NewMind AI Weekly Chronicles – August ’25 Week IV
Streamline Vulnerability Management From Minimal Images to SBOMs
Rapid Prototyping: A lecture on prototyping techniques for interface design
Altius execution marketplace concept.pdf
Launch a Bumble-Style App with AI Features in 2025.pdf
Co-training pseudo-labeling for text classification with support vector machi...

A Smooth Transition to HTML5

  • 1. A Smooth Transition to HTML5 Using MVVM Development Patterns
  • 3. WIJMO – UI FOR THE WEB • 40+ Widgets • Built on jQuery UI • Powered by HTML5 • Themed with Themeroller • Works Everywhere • Supports MVVM
  • 5. WHY USE HTML5? “Virtually every computing device supports HTML and JavaScript”
  • 6. BENEFITS OF USING HTML5 • Mobile • Performance • Shared code in multiple platforms – Mobile Web – Native Mobile (PhoneGap) – Desktop Web – Native Desktop (Win8)
  • 7. PRINCIPLES WHEN MIGRATING TO HTML5 • Port your programming knowledge • Port your patterns & practices • Port your code conventions • Port your business logic, not your code
  • 8. HOW TO MIGRATE TO HTML5
  • 9. HOW CAN YOU PORT TO HTML5? Use a familiar development pattern: MVVM – Widely used by Flex/Silverlight developers – Use Knockout for MVVM in JavaScript – Use UI controls with MVVM support for quicker development
  • 10. 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
  • 11. EXAMPLE VIEWMODEL USAGE var myViewModel = { personName: ko.observable('Bob'), personAge: ko.observable(123) }; ko.applyBindings(myViewModel); <span data-bind="text: personName"></span>
  • 12. PORTING THE MODEL Use the same Model/Datasource – Most JavaScript apps can use the same services
  • 13. PORTING THE VIEW-MODEL 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
  • 14. PORTING THE VIEW Port the View – Create HTML markup that represents your UI (similar to what you have in MXML/XAML) – Add data-bind attributes to bind markup to the View-Model – Use data-bind attributes to turn markup into UI Controls (like Wijmo widgets)
  • 15. THE BENEFITS OF USING MVVM
  • 16. SHORTER DEVELOPMENT CYCLES • MVVM separates development clearly between Data, Code and UI • Each layer can be developed in parallel and individually • Minimizes turnaround time
  • 17. 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
  • 18. 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
  • 19. IMPROVED QUALITY • Less overlap between developers and designers • Each can focus on their specialty and deliver higher quality • Both can work simultaneously
  • 20. 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
  • 21. 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)
  • 23. DEVELOPMENT TOOLS JavaScript development tools are not as mature as Flex/Silverlight’s – Compile-time error detection – Code re-factoring – IntelliSense (Code Auto-complete / Suggestions)
  • 24. UI CONTROLS Flex/Silverlight have 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 Flex/Silverlight
  • 25. DATA ACCESS Flex/Silverlight provide 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
  • 27. RESOURCES • Wijmo MVVM Support http://wijmo.com/widgets/mvvm-support/ • Download Wijmo http://wijmo.com/downloads/ • Knockout http://knockoutjs.com/ • Contact Me @b4nn0n [email protected]

Editor's Notes

  • #4: 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
  • #19: Design the View (general appearance and behavior of the application)Design the ViewModel to support the ViewImplement the ViewModelImplement the View