Windows 8 Apps with HTML5 and JavaScript

Last week, I finished writing Windows 8 Apps with HTML5 and JavaScript – Yikes! That is a long title. This book is all about writing apps for Windows 8 which can be added to the Windows Store.

The book focuses on building apps using HTML5 and JavaScript. If you are already comfortable building websites, then building Windows Store apps is not a huge leap.  I explain how you can create productivity apps, like a Task List app, and games, like a simple arcade game. I also explain how you can publish your app to the Windows Store and make money.

To celebrate the release of Windows 8, my publisher is offering a huge 40% discount on the book until November 30, 2012. If you want to take advantage of this discount, follow the link below and enter the discount code WINDEV40 during checkout.

http://www.informit.com/promotions/promotion.aspx?promo=139036&walther

ShowCover

So what’s in the book?  Here’s an overview of each of the chapters:

Chapter 1 – Building Windows Store Apps

Contains a walkthrough of creating a super simple Windows app for taking pictures from your webcam. Explains how to publish your app to the Windows Store.

Chapter 2 – WinJS Fundamentals

Provides an overview of the Windows Library for JavaScript which is the Microsoft library for creating Windows Store apps with JavaScript.

Chapter 3 – Observables, Bindings, and Templates

You learn how to display a list of items using a template. For example, you learn how to create a template which can be used to display a list of products.

Chapter 4 – Using WinJS Controls

Overview of the core set of JavaScript controls included with the WinJS library. You learn how to use the Tooltip, ToggleSwitch, Rating, DatePicker, TimePicker, and FlipView controls.

Chapter 5 – Creating Forms

This chapter explains how to take advantage of HTML5 forms to display specialized keyboards and perform form validation.

Chapter 6 – Menus and Flyouts

You learn how to display popups, menus, and toolbars using the JavaScript controls included with the WinJS library.

Chapter 7 – Using the ListView Control

This entire chapter is devoted to the ListView control which is the most important control in the WinJS library. You can use the ListView control to display, sort, filter, and edit a list of items.

Chapter 8 – Creating Data Sources

Learn how to use a ListView control to display data from the file system, a web service, and IndexedDB.

Chapter 9 – App Events and States

This chapter explains the standard application events which are raised in a Windows Store app such as the activated and checkpoint events. You also learn how to build apps which adapt automatically to different view states such as portrait and landscape.

Chapter 10 – Page Fragments and Navigation

This chapter discusses two subjects: You learn how to create custom WinJS controls with Page Controls and you learn how to build apps with multiple pages. 

Chapter 11 – Using the Live Connect API

Learn how to use Windows Live Services to authenticate users, interact with SkyDrive, and retrieve user profile information (such as a user’s birthday or profile picture).

Chapter 12 – Graphics and Games

This chapter is devoted to building the Brain Eaters app which is a simple arcade game. Navigate a maze and eat all of the food pellets while avoiding the brain-eating zombies to win the game. Learn how to create the game using HTML5 Canvas.

 

If you want to buy the book, remember to use the magic discount code WINDEV40 and visit the following link:

http://www.informit.com/promotions/promotion.aspx?promo=139036&walther

Discussion

  1. Stilgar says:

    Why would someone with C# experience or someone with C# and JavaScript experience like yourself choose to develop apps for Windows 8 in JS instead of C#? Honest question, I am not trying to troll. I would understand the choice of JS if the apps were portable but Win8 apps are not since WinJS and WinRT are Windows-only.

    • @Stilgar – I believe that JavaScript is the future. In five years, the vast majority of code for new apps (server, desktop, mobile, browser) will be written in JavaScript.

      While it is true that a Win8 app cannot be ported directly to iOS – both iOS and Win8 support creating apps with JavaScript. In the case of iOS, you would need to use something like PhoneGap/Cordova. And, NodeJS enables you to write server-side code in JavaScript.

      What’s driving all of this is the fact that JavaScript is the one and only language which a browser understands natively (ignoring Dart/VBScript). Because I am already forced to learn JavaScript to build HTML5 apps, I don’t want to switch to C#/Java/PHP/Whatever to build other types of apps.

      There are definite advantages of using C# over JavaScript (Debugging is much easier in a strongly-typed language). However, JavaScript has some nice features also — object literals, anonymous functions, duck typing. And, recent projects such as TypeScript give JavaScript many of the same advantages as C#.

      And there is a lot of really interesting stuff coming out around HTML5 — web sockets, webworkers, Canvas, new input types — which I want to leverage when building apps.

      I like both C# and JavaScript — but I see the future and I see JavaScript 🙂

  2. Roland says:

    Congrats Stephen. I pre-ordered the book at the beginning of September. There was no discount at that time, which means it was a mistake to order so early?

  3. jinishans says:

    I tried, but it’ doesn’t give 40% off still.

  4. karthika says:

    Always I have referred to your articles. I am planning to order the book. Thanks so much. I need a help. As I am unable to comment on those articles I am asking here. I am doing dataarray.push in a listview datasource. That works. But when I do dataarray.splice and remove the item, it gets removed only when I quit the app and open again. The listview doesn’t refresh immediately. I am using text file(Json format) to store the data. Kindly show some light.