Windows 8 JavaScript Apps –
      getting it right

brendan.kowitz@readify.net   http://www.kowitz.net   @brendankowitz
1   • Introduction

    •   WinJs
    •   Testing
2   •   TypeScript
    •   Using C# Libraries
    •   Debugging

3   • Wrapup
Why use WinJS?
• Can still use C# libraries
• Power of CSS3 and HTML5
• WinJS’s bindings to native controls and
  also has many JS-only extensions for Win8
• JavaScript was always ASYNC
• Better than XAML
Introducing “Sorty”
Elo
Getting started with WinJs
• VS2012 (duh)
  – VS 2012 Web Essentials
  – Blend for Visual Studio


• Online: Roadmap for Windows Store apps
  using JavaScript
  – http://is.gd/ClIOax
So it’s like making a web site?…
•   Its HTML5, JS and CSS
•   Can use a large number of existing JS libs
•   You have some browser limitations
•   Watch out for DOM manipulation errors
…but not
• COM Wrapped in JavaScript
• Exception driven development
• You don’t have network latency to load
  resources
• You don’t have traditional page events
• Tombstoning
• You don’t _need_ jQuery
3rd Party JS Controls
• Existing JavaScript plugins _can_
  – Produce problematic HTML
  – Break Windows 8 UX guides
• Stick with shipped controls
• Or build your own
• Use those specifically created via a vendor
  (Telerik etc)
Testing
• C# code can take advantage of built-in
  Visual Studio Testing framework
• JS can use Mocha or other JS testing
  libraries
Testing demo
Using C# Libraries
• Can only reference WinMD libraries
• WinMD libraries can reference portable
  and Windows Store libraries
• Unit testing supported
• WinMD libraries CAN reference other
  Windows Store and Portable Libraries
Async
• You will need to make use of the Promise
  pattern
  WinJS.xhr({
    url:"http://www.example.org/somedata.json"
  }).done(function (response) {
      updateDisplay(
        JSON.parse(response.responseText));
  });




                               http://wiki.commonjs.org/wiki/Promises/A
Libraries
• Portable libraries
• WinMD libraries
• Windows Store Libraries
Consuming C# from WinJS
Typescript for WinJs?
• Yes.
• Windows 8 & VS2012
• Download the TypeScript plugin:
  http://go.microsoft.com/fwlink/?LinkID=26
  6563
• VS 2012 Web Essentials:
  http://visualstudiogallery.msdn.microsoft.c
  om/07d54d12-7133-4e15-becb-
  6f451ea3bea6
TypeScript in WinJS
Storage
• Local storage
• Roaming storage
• Offline storage
  – IndexDB
Debugging
• You can debug in JS
• You can debug in C#
• No, you can’t debug across both (yet)
Gotchas
• DEBUGGING. – If using C# Libraries with JS
• WinJS adds crazy inline stuff to the DOM
Getting it together
Discussion
• Do you currently have a WinJS app?
• Would you consider writing a WinJS app?
• Any other questions?
brendan.kowitz@readify.net

Thank you.                     http://www.kowitz.net

                               @brendankowitz




     http://hg.kowitz.net/ddd/2012-Brisbane

More Related Content

PPTX
TypeScript Introduction
PDF
Mobiiliaamiainen 8.11.2012: Petri Niemi, Windows (Phone) 8 and html5
PDF
Laug Mootools And Common Js
PDF
JSFoo-2017 Takeaways
PPTX
Typescript: JS code just got better!
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
PPTX
Angular js + ts + systemjs
PDF
Full stack java script development
TypeScript Introduction
Mobiiliaamiainen 8.11.2012: Petri Niemi, Windows (Phone) 8 and html5
Laug Mootools And Common Js
JSFoo-2017 Takeaways
Typescript: JS code just got better!
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Angular js + ts + systemjs
Full stack java script development

What's hot (8)

PPTX
Brief overview of TypeScript - Ljubljana JavaScript Users Group
PDF
ITT Flisol 2013
PDF
NodeJs Intro - JavaScript Zagreb Meetup #1
PDF
Bledar Gjocaj - Java open source
PPTX
A guide to getting started with WebdriverIO
PPTX
WebdriverIO: the Swiss Army Knife of testing
PDF
[NijmegenJS] Node.js - 2014/04/25
ODP
Web development in JavaEE7 with JSF, does it still matter?
Brief overview of TypeScript - Ljubljana JavaScript Users Group
ITT Flisol 2013
NodeJs Intro - JavaScript Zagreb Meetup #1
Bledar Gjocaj - Java open source
A guide to getting started with WebdriverIO
WebdriverIO: the Swiss Army Knife of testing
[NijmegenJS] Node.js - 2014/04/25
Web development in JavaEE7 with JSF, does it still matter?
Ad

Viewers also liked (16)

DOC
ใบงานสำรวจตนเอง M6หยก
PPTX
Building windows phone 7 apps for the enterprise
PDF
The new public health and std hiv prevention
PPT
Penman Presentation-9 Quotation Slides...
PDF
Learning in non stationary environments
PDF
Principles of oocyte and embryo donation
PPTX
Introduccion a la informatica
PDF
Subvenciones relacionadas con el ciclo integral del agua para las Entidades L...
DOCX
鑽石的重量與尺寸
PPTX
Dimensiones del E-commerce en Colombia
PDF
Blockbuster Launch Evolution - Chris Bogan Keynote-FINAL (09-24-2015)
PPTX
Frequency spectrum
PPTX
Structural and oct changes in diabetic retinopathy1
PPT
GRAN DEBATE HOTELERO 2013
PDF
Presentación Openclass Ecommerce Manager Esnedi 11/2016
ใบงานสำรวจตนเอง M6หยก
Building windows phone 7 apps for the enterprise
The new public health and std hiv prevention
Penman Presentation-9 Quotation Slides...
Learning in non stationary environments
Principles of oocyte and embryo donation
Introduccion a la informatica
Subvenciones relacionadas con el ciclo integral del agua para las Entidades L...
鑽石的重量與尺寸
Dimensiones del E-commerce en Colombia
Blockbuster Launch Evolution - Chris Bogan Keynote-FINAL (09-24-2015)
Frequency spectrum
Structural and oct changes in diabetic retinopathy1
GRAN DEBATE HOTELERO 2013
Presentación Openclass Ecommerce Manager Esnedi 11/2016
Ad

Similar to Windows 8 javascript apps – getting it right (20)

PPTX
Real World Windows 8 Apps in JavaScript
PPTX
Developing a mobile cross-platform library
KEY
Sugarcoating your frontend one ViewModel at a time
PPTX
JavaScript in Universal Windows Platform apps
PPTX
Going offline with JS (DDD Sydney)
PPTX
Radu vunvulea building and testing windows 8 metro style applications using ...
PPT
Setting up your development environment
PDF
Node.js for .NET Developers
PPTX
Javascript as universal language
PPTX
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
PPT
State of jQuery - AspDotNetStorefront Conference
PPT
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
KEY
20120802 timisoara
PPTX
Blazor.pptx
PPTX
Going Offline with JS
PDF
Nodejs
PDF
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
PPTX
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
PDF
Php on Windows
KEY
20120306 dublin js
Real World Windows 8 Apps in JavaScript
Developing a mobile cross-platform library
Sugarcoating your frontend one ViewModel at a time
JavaScript in Universal Windows Platform apps
Going offline with JS (DDD Sydney)
Radu vunvulea building and testing windows 8 metro style applications using ...
Setting up your development environment
Node.js for .NET Developers
Javascript as universal language
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
State of jQuery - AspDotNetStorefront Conference
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
20120802 timisoara
Blazor.pptx
Going Offline with JS
Nodejs
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Php on Windows
20120306 dublin js

Recently uploaded (20)

PPTX
Presentation - Principles of Instructional Design.pptx
PDF
The AI Revolution in Customer Service - 2025
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Auditboard EB SOX Playbook 2023 edition.
PPTX
Internet of Everything -Basic concepts details
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
PDF
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
PPTX
SGT Report The Beast Plan and Cyberphysical Systems of Control
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PDF
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
Presentation - Principles of Instructional Design.pptx
The AI Revolution in Customer Service - 2025
CEH Module 2 Footprinting CEH V13, concepts
Early detection and classification of bone marrow changes in lumbar vertebrae...
Lung cancer patients survival prediction using outlier detection and optimize...
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Auditboard EB SOX Playbook 2023 edition.
Internet of Everything -Basic concepts details
Rapid Prototyping: A lecture on prototyping techniques for interface design
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
5-Ways-AI-is-Revolutionizing-Telecom-Quality-Engineering.pdf
SGT Report The Beast Plan and Cyberphysical Systems of Control
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Build Real-Time ML Apps with Python, Feast & NoSQL
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Build automations faster and more reliably with UiPath ScreenPlay
MENA-ECEONOMIC-CONTEXT-VC MENA-ECEONOMIC
Introduction to MCP and A2A Protocols: Enabling Agent Communication
Connector Corner: Transform Unstructured Documents with Agentic Automation

Windows 8 javascript apps – getting it right

  • 1. Windows 8 JavaScript Apps – getting it right [email protected] http://www.kowitz.net @brendankowitz
  • 2. 1 • Introduction • WinJs • Testing 2 • TypeScript • Using C# Libraries • Debugging 3 • Wrapup
  • 3. Why use WinJS? • Can still use C# libraries • Power of CSS3 and HTML5 • WinJS’s bindings to native controls and also has many JS-only extensions for Win8 • JavaScript was always ASYNC • Better than XAML
  • 5. Elo
  • 6. Getting started with WinJs • VS2012 (duh) – VS 2012 Web Essentials – Blend for Visual Studio • Online: Roadmap for Windows Store apps using JavaScript – http://is.gd/ClIOax
  • 7. So it’s like making a web site?… • Its HTML5, JS and CSS • Can use a large number of existing JS libs • You have some browser limitations • Watch out for DOM manipulation errors
  • 8. …but not • COM Wrapped in JavaScript • Exception driven development • You don’t have network latency to load resources • You don’t have traditional page events • Tombstoning • You don’t _need_ jQuery
  • 9. 3rd Party JS Controls • Existing JavaScript plugins _can_ – Produce problematic HTML – Break Windows 8 UX guides • Stick with shipped controls • Or build your own • Use those specifically created via a vendor (Telerik etc)
  • 10. Testing • C# code can take advantage of built-in Visual Studio Testing framework • JS can use Mocha or other JS testing libraries
  • 12. Using C# Libraries • Can only reference WinMD libraries • WinMD libraries can reference portable and Windows Store libraries • Unit testing supported • WinMD libraries CAN reference other Windows Store and Portable Libraries
  • 13. Async • You will need to make use of the Promise pattern WinJS.xhr({ url:"http://www.example.org/somedata.json" }).done(function (response) { updateDisplay( JSON.parse(response.responseText)); }); http://wiki.commonjs.org/wiki/Promises/A
  • 14. Libraries • Portable libraries • WinMD libraries • Windows Store Libraries
  • 16. Typescript for WinJs? • Yes. • Windows 8 & VS2012 • Download the TypeScript plugin: http://go.microsoft.com/fwlink/?LinkID=26 6563 • VS 2012 Web Essentials: http://visualstudiogallery.msdn.microsoft.c om/07d54d12-7133-4e15-becb- 6f451ea3bea6
  • 18. Storage • Local storage • Roaming storage • Offline storage – IndexDB
  • 19. Debugging • You can debug in JS • You can debug in C# • No, you can’t debug across both (yet)
  • 20. Gotchas • DEBUGGING. – If using C# Libraries with JS • WinJS adds crazy inline stuff to the DOM
  • 22. Discussion • Do you currently have a WinJS app? • Would you consider writing a WinJS app? • Any other questions?
  • 23. [email protected] Thank you. http://www.kowitz.net @brendankowitz http://hg.kowitz.net/ddd/2012-Brisbane

Editor's Notes

  • #9: jQuery normalizes browser quirksBut you don’t have multiple browsersSizzle adds CSS selector queriesThis is native in IE10 (and IE9)WinJS has APIs for thisMost animations can be done with CSS3