Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Developing Windows Store Apps with HTML5 and JavaScript
Developing Windows Store Apps with HTML5 and JavaScript

Developing Windows Store Apps with HTML5 and JavaScript: The Windows store is growing in popularity and with this step-by-step guide it's easy to join the bandwagon using HTML5, CSS3, and JavaScript. From basic development techniques to publishing on the store, it's the complete primer.

Arrow left icon
Profile Icon Rami Sarieddine
Arrow right icon
£16.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (8 Ratings)
Paperback Aug 2013 184 pages 1st Edition
eBook
£7.99 £16.99
Paperback
£20.99
Subscription
Free Trial
Renews at £16.99p/m
Arrow left icon
Profile Icon Rami Sarieddine
Arrow right icon
£16.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (8 Ratings)
Paperback Aug 2013 184 pages 1st Edition
eBook
£7.99 £16.99
Paperback
£20.99
Subscription
Free Trial
Renews at £16.99p/m
eBook
£7.99 £16.99
Paperback
£20.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. £16.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Developing Windows Store Apps with HTML5 and JavaScript

Chapter 1. HTML5 Structure

HTML5 introduced new elements and attributes for a neater structure, smarter forms, and richer media; this make the life of a developer much easier. HTML5 features are classified into several groups based on their function, and the new structural elements fall under the group semantics, which include structural elements, media elements, attributes, form types, link relation types, semantics for internationalization, and microdata for additional semantics. There is a big list of additions and enhancements in HTML5, all with the aim of better presenting the content on the web. You will use many of these when developing apps for Windows 8; the difference and, moreover, the advantage of using it for Windows 8 development is that you do not have to worry about the browser's compatibility, at least at the level of Windows Store apps, since Windows 8 is an HTML5 platform that uses the most recent web standards. Everything that you use from HTML5 and CSS3 is provided for you in your code and is guaranteed to work in the application. And the latest version of Visual Studio (VS 2012) includes a new HTML and CSS editor that offers full support for HTML5 and CSS3 elements and snippets.

In this chapter we will be covering the following topics:

  • Semantic elements

  • Media elements

  • Form elements

  • Custom data attributes

Understanding semantic elements


HTML5 markup is more semantic than its predecessors due to the new semantic elements for describing the structure of the page content. The list of semantic elements includes the following:

  • The <header> tag defines a header for the document or section. It wraps the heading or a group of headings in a page or a section, and it can also contain information such as logos, banners, and main navigation links. You can have multiple <header> tags in a page.

  • The <nav> tag represents the major navigation links. Typically it is bound to the header.

  • The <section> tag wraps related content that can be grouped thematically. A <section> tag can include a <header> and <footer> tag.

  • The <footer> tag represents content about a page or a section, for example, related links, privacy terms, and copyright information. You can have more than one <footer> in a page, and it is same as the <header> tag.

  • The <article> tag represents self-contained content that can be used independent of the document as a whole, for example, a blog entry. <article> and <section> are much alike because both are standalone tags and hold related content; however, if it's content can be syndicated (via an atom or an RSS feed), then the <article> element is more appropriate.

  • The <aside> tag represents the part of a page that is tangentially related to the content around it, and also separate from that content, as it can be removed without affecting the main content of the page. Typical usage can be a sidebar.

  • The <address> tag represents the contact information for the nearest <article> parent element, if present, or the parent <body> element, which in that case applies to the whole document.

Putting all these new elements together in a page would yield the following markup:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Developing for Windows 8</title>
</head>
<body>
  <header>
    <a href="default.html">
      <h1>The Courses</h1>
      <img src="logo.png" alt="Book Logo">
    </a>
    <nav>
      <ul>
        <li><a href="home.html">Home</a></li>
        <li><a href="about.html">About</a></li>
      </ul>
    </nav>
  </header>
  <section>
    <article>
      <h2></h2>
      <p></p>
      <address>
        Written by <a href="mailto:xyz@abc.com">Demo Author</a>.<br>
        Found at: Demo.com <br>
        Address, Street<br>
        UK
      </address>
    </article>
    <article>
      <h2></h2>
      <p>content</p>
    </article>
  </section>
  <aside>
    <h2></h2>
    <ul>
      <li></li>
      <li></li>
      <li></li>
    </ul>
    <p></p>
  </aside>
  <footer>
    <p></p>
    <p>Copyright &copy; 2013 Packt</p>
  </footer>
</body>
</html>

Introducing built-in media elements


HTML5 introduced new media elements such as <audio> and <video>, which can be considered as a new revolution in media types after images in the earlier versions of HTML. These two elements make it very easy to embed media in your HTML page/document and provide built-in media support via the HTML5 Media element API. According to the latest specs by W3C, we can define <video> and <audio> as follows:

  • The <video> tag is a media element used for playing videos or movies and audio files with captions

  • The <audio> tag is a media element whose media data is audio, that is, a sound or an audio stream

The <audio> and <video> elements play audio and video files respectively. The only difference between them is that the <audio> element does not have a playback area for visual content, contrary to the <video> element.

Prior to HTML5, we needed a plugin in order to play an audio or a video file, and that required writing a large chunk of markup. Without HTML5, embedding media elements was never so easy; just by putting an <audio> tag resulting in two lines of code you can get a media player with playback controls. It is almost the same as the <img /> tag before. Refer to the following code:

<audio src="audio.mp3" controls>
</audio>

The previous example results in a media player that will look like the following screenshot on Internet Explorer 9 (IE9), and might differ from one browser to another:

The previous code shows the <audio> tag in its simplest form, but the <audio> tag has more attributes and options. Refer to the following code:

<audio controls autoplay loop>
  <p>Your browser does not support the audio element. Click <a href="content/Elsie.mp3"> here </a> to download the file instead.
  </p>
  <source src="audio.mp3" type="audio/mp3" />
  <source src="audio.ogg" type="audio/ogg" />
</audio>

First, notice the content wrapped in a <p> tag inside the <audio> element. This content is a fallback text and will only be used if the browser doesn't support the <audio> tag. It provides a graceful fallback for older web browsers by informing the user about this issue, and we can add a link to allow the download of this audio file instead. This way, the user will not just stand there wondering what has happened. This is the simplest way to fallback; you can use JavaScript for the same purpose too.

The preceding code snippet also shows some of the attributes for the <audio> element. According to the W3C specification, src, controls, autoplay, loop, preload, mediagroup, and muted are common attributes to both the media elements, namely <audio> and <video>.

  • The controls attribute displays the standard HTML5 controls for the audio on the webpage, and the design of the controls varies between browser agents.

  • The autoplay attribute plays the audio file automatically as soon as the DOM finishes loading.

  • The loop attribute enables repetition automatically.

  • The mediagroup attribute links multiple media elements together using a media controller.

  • The muted attribute sets a default state of the audio file to mute.

  • The preload attribute provides a hint to the user agent about what the author thinks will lead to the best user experience. Its values can be none, metadata, or auto.

    • none: This value hints to the browser that the web page doesn't expect users to need the media resource.

    • metadata: This value hints to the browser to fetch the resource metadata (dimensions, track list, duration, and so on).

    • auto: This value hints to the browser to put the user's needs first without any risk to the server. An empty value, as in just adding the attribute preload, maps to the auto value.

You can specify a value for the attributes as in controls="controls", which would have the same behavior. But for simplicity and less code, you can simply leave out the value for this attribute; the same can be applied for loop, autoplay, and muted. You can specify the media resource by either using the src attribute or the <source> elements.

Note

The attribute overrides the elements.

The media resource (audio or video) has a MIME type and additionally a codec as in the following code:

<source src="video.ogv" type="video/ogg; codecs="theora, vorbis" />

Setting the value for the type attribute has to be done within the <source> element. The browser/user agent will avoid downloading the resource if it does not support its type. You can add multiple formats of your audio/video in order to ensure playback support across different browsers. The browser agent will go over the <source> elements; if it cannot render the first type, it will skip to the next <source> to validate its type, and so on. For this purpose, you will have to check the list of MIME types supported by the <audio> and <video> elements in different browsers. The browser not only checks for the MIME types but also for the specified codec. So, even if the browser agent can render the resource type, the video/audio will not load if the codec is not supported.

The following table lists the support for the 3 main video formats across the major browsers:

Format

IE9+

Chrome

Firefox

Opera

Safari

WebM (VP8 CODEC)

Yes

Yes

Yes

Yes

No

MP4 (H.264 CODEC)

Yes

Yes

No

No

Yes

OGV (OGG THEORA CODEC)

No

Yes

Yes

Yes

No

From the listing in the previous table, we can conclude that providing a media resource with both WebM and MP4 formats in your HTML5 video will guarantee it to load in the latest versions of all major browsers. This theory is reinforced in Visual Studio 2012, which offers full Intellisense support for HTML5 tags. When you insert the following snippet for an HTML5 <video> element, it lists 3 <source> elements within the <video> tag:

<video controls="controls">
  <source src="file.mp4" type="video/mp4" />
  <source src="file.webm" type="video/webm" />
  <source src="file.ogv" type="video/ogg" />
</video>

The <video> element also includes a poster attribute, which is used to specify a path for an image to be displayed in the visual content area when no video data is available or until the user clicks on the play button. For advertising purposes, you can use an image or a frame from the video that gives the user an idea of what the video is like. If you do not specify a poster image and if the autoplay attribute is not set, the browser may just display a black box filling the dimensions of the <video> element. For example, the following code shows the difference between code samples for two similar videos, with a poster specified for the second video:

<video id="video" controls width="400">
  <source src="http://ie.microsoft.com/testdrive/Videos/BehindIE9AllAroundFast/video.mp4" type="video/mp4" />
</video>
<video id="videoWithPoster" controls width="400" poster="http://msdn.microsoft.com/br211386.5_GetStarted_484x272px.jpg">
  <source src="http://ie.microsoft.com/testdrive/Videos/BehindIE9AllAroundFast/video.mp4" type="video/mp4" />
</video>

The output of this markup will produce the following on the screen:

You might have noticed that we specified a width value of 400 for the two videos in the previous example. The <video> element accepts standard HTML width and height attributes. If there is no value set for width and height, the visual content area stretches to the native size of video. It is recommended to set the width and height attributes on the <video> element, thus avoiding stretching to full size, and to encode the video at the desired viewing dimensions.

Note

The values for the width and height attributes do not accept units. The value indicates CSS pixels, for example, width=400 is the same as width=400px.

There are JavaScript methods, properties, and DOM events that are part of the HTML5 standard that is associated with these new elements. You can read and set properties programmatically, such as the src path and the dimensions (width and height) of the <video> tag. You can use JavaScript methods to load the audio and video, and then play and pause the media resource. You can also write code to handle different DOM events raised by media elements, such as onplaying, onprogress (load progress), onplay, and onpause. For example, you disable the default controls displayed by the element by removing the controls attribute and by calling the functions that play and pause the media resource from separate buttons.

The following code listing shows how we can play and pause the video using JavaScript. We first need to detect the current state of the video file by calling the Boolean property .paused, and if true, we then call the methods play() or pause() accordingly:

var testVideo = document.getElementById('myVideo');
if (testVideo.paused)
  testVideo.play();
else
  testVideo.pause();

In the preceding code, we declare a variable testVideo and assign it to the myVideo element from DOM. Assuming that the element was assigned an ID, you can use the name, tag name, or the element's place in the DOM hierarchy to retrieve the elements.

Advanced media with JavaScript

The media elements have a rich API to access with pure JavaScript. Using JavaScript, we can add a lot of functionality to the media elements. You can manipulate the media resource, style it, rotate a video, play two and more media elements in sync, display a progress bar while the media resource loads, resize a video dynamically, and so on.

The following is the code sample that adds functionality to the timeupdate event, which fetches the current play time of the video in seconds and displays it in a separate div.

The following is the HTML code:

<div id="tInfo"></div>
<video id="myVideo" autoplay controls>
  <source src="w8.mp4" type="video/mp4" />
</video>

The following is the JavaScript code:

var video = document.getElementsById('myVideo');
var tInfo = document.getElementById('tInfo');
video.addEventListener('timeupdate',function(event){
tInfo.innerHTML = parseInt(video.currentTime);
}, false);

The JavaScript addEventListener method is used to provide a handler for the timeupdate event. It takes three parameters and has the basic syntax, which is as follows:

WinJS.Application.addEventListener(type, listener, capture);

The type parameter specifies the type of event to register, while listener is the event handler function to associate with the event, and the third parameter capture is a Boolean value that specifies whether the event handler is registered for the capturing phase or not.

In addition, you can combine the capabilities of the <video> element with a canvas, allowing you to manipulate video data in real time and add a variety of visual effects.

Introducing feature-rich form elements


Forms and <form> elements are an integral part of any application or website, from a login form to a complete contact or registration form. In HTML4, the <form> elements were very idle, and for any feature or advanced styling, JavaScript was a necessity. And for any interaction, or data submission and validation, it demanded server and client-side scripting, and its functionality was inhibited if the scripting was disabled in the browser. HTML5 brought major improvements to the <form> elements with new attributes and input types, and added features such as browser-based validation and CSS styling that provide a better experience for the users filling it, and all possible simplicity for the developers creating it.

An enriched <input> tag

New values for the type attribute are introduced to the <input> element.

HTML5 adds 13 new <input> types to the ones we were already familiar with in HTML4, such as text and checkbox. With this addition, the <input> control now supports types such as range, date, number, telephone, email, and URL. And these new <input> types add intelligent behavior to the element themselves.

The following is the table listing of these types:

<input> types

Description

tel

It expects a telephone number.

search

It prompts the user to enter text that they want to search for, and adds a search icon to the input element (on browsers that support it).

url

It expects a single URL.

email

It expects a single e-mail address or a list of e-mail addresses (separated by commas).

datetime

It expects a date and time with UTC time zone.

date

It expects a date.

month

It expects a date with a year and a month, but no time zone.

week

It expects a date that consists of a week-year number and a week number.

time

It expects a time-value such as hours, minutes, seconds, and fractional seconds.

datetime-local

It expects date and time with no time zone.

number

It expects numerical input.

range

It expects a numerical input and displays a slider.

color

It expects color value and displays a color palette to choose from.

Along with the addition to the <input> types, new features have been added to the already existing ones such as the File input element, which now supports multifile selection using the multiple attribute. The browse button will display the file dialog and then you can select files from your local disk or SkyDrive; the files can be sent to the server as part of the form data when the form is submitted.

You can also take advantage of the progress element that represents the progress of a task, as specified by the W3C. It can be used to show the progress of a large file being uploaded or a media resource that is being loaded. The progress of a task is determined by two attributes of this element:

  • The value attribute, which indicates how much progress has been made

  • The max attribute, which indicates the total amount of work required till task completion

The following code uses a progress element and a button, and the script adds the value specified in the JavaScript function parameter to its existing value. When you load the sample and try it, you will see the progress bar visually updating the completion progress.

The following is the HTML code:

<button id="clickBtn" onclick="updateProgress(10)">Update Progress</button>Progress: <progress id="prog" max="100"></progress>

The following is the JavaScript code:

<script>
//get the progress element and add the value to it with every click var progressBar = document.getElementById('prog');
function updateProgress(newValue){ 
progressBar.value = progressBar.value + newValue;
}
</script>

Easy validation

HTML5's new <input> types along with the validation attributes such as required and pattern, and the pseudo CSS3 selectors allow browser-based validation, where you can catch a form's input errors without a single line of code or script. This was previously impossible and needed a custom JavaScript code or a JavaScript library. Basically, it provides client-side form validation without JavaScript.

We'll start with the most trivial validation, filling a required field. In order to achieve this, we need to add the required attribute to an <input> element.

The required attribute can be set on the <input> elements with type text, URL, email, checkbox, or radio, and on select and textarea elements. It is a Boolean attribute and can only be set on an element.

We specify that filling a value for a field is mandatory by simply adding the required attribute. In the following code listing, you will find a couple of <input> elements with the required attribute:

<form action="/" method="post">
  <label>Checkbox:</label>
    <input type="checkbox" required />
  <label>Radio:</label>
    <select>
      …
    </select>
  <label>Text:</label>
    <input type="search" required />
  <label>Range:</label>
    <input type="range" min="5" max="10" step="5" />
  <label>URL:</label>
    <input type="url"  required />
  <label>File:</label>
    <input type="file" accept=".mp3" />
    <input type="submit" name="submit" value=" Submit " />
</form>

Once the required attribute is added, and then when you click on the submit button, all the fields in the form will be validated; an error is returned if any of the fields are incorrect. The required fields are highlighted, and moreover, default messages are provided to notify the user that these fields are required in the form.

You can see the following screenshot displaying the output of the preceding code:

We can apply one or more styles using the CSS3 pseudo-selector required (more on that in the next chapter). For example, the following style adds a CSS3 pseudo-class required, which will look for all the input elements in the document that have the required attribute, and style it with the yellow border-color.

input:required {
  border-color: Yellow;
}

If you want to apply a style that affects all the non-required elements in the form, well that's very easy; just add the optional pseudo-class and give it a style just as we did with the required class. In the following code, we apply a LightGray border-color to all the input elements that don't have a required attribute.

input:optional {
  border-color: LightGray; 
}

HTML5 forms not only validate for required fields, but they also check the content of the field values and validate it either automatically, as in the URL and email input types, or by using the pattern attribute. The pattern attribute uses a regular expression to define the valid format that the element value must match, for example, a telephone number or social security number.

The following example shows the syntax for a password field, which is both required and must have a valid input with a minimum length of eight characters. And here, the default validation message is replaced by the text provided in the title attribute:

<input type="password" required pattern="[^\s]{8}[^\s]*" title="Passwords must be at least 8 characters long."/>

There are more attributes that add to the validation technique, such as placeholder, which provides the users with a hint message displayed in light text until the user starts typing inside the element; the hint could be about the value they should enter in the field. For example, you can add a demo e-mail address in the email field such as:

<input type="email" placeholder="email@example.com" />

You can check for the maximum number of characters allowed in a text or a textarea input using the maxlength attribute. Also, we have the min, max, and step attributes used with the range element to validate the values entered for that element. The min and max attributes check for the minimum and maximum values that can be entered, while the step attribute checks for the allowed values.

You can also specify acceptable file MIME types with the accept attribute. As you may have noticed in the preceding code listing, the accept attribute was added to the <input type="file" /> element, which is the only element to be used with it. Once you add this to the file control, and then when you try to browse for a file using Windows 8 File Explorer, only the types that are in the accept list will be displayed.

HTML5 form validation is the default behavior; no code is needed to activate it, but you can turn it off by adding the formnovalidate attribute to the submit button or any <input> element. This attribute allows a form to be submitted without being validated.

Assigning custom data attributes


With HTML5, we now have the ability to assign custom data attributes to any HTML5 element. The W3C defines it as:

Attribute that is intended to store custom data private to the page or application, for which there are no more appropriate attributes or elements.

These new custom data attributes consist of two parts:

  • Attribute name: It must start with the prefix data- and should be followed with at least one character and should not contain uppercase characters

  • Attribute value: It must be a string value

Let's add a custom attribute to a <div> tag as shown in the following code:

<div id="bookList" data-category="TechnicalBooks">
Developing for windows 8
</div>

You can see the custom attribute name data-category and the attribute value TechnicalBooks assigned to the <div> element. This data can be retrieved and updated by your JavaScript code using the native getAttribute and setAttribute methods, because the custom data attributes are considered to be part of the page on which they are used. The following is the code sample that shows how to manipulate the custom attributes using native JavaScript:

function getSetCategory() {
  var bookList = document.getElementById("bookList");
//get the value of the attribute
  var bookCategory = bookList.getAttribute('data-category');
//set the value for the attribute
  bookList.setAttribute('data-category', 'HealthBooks');
//remove the attribute
  bookList.removeAttribute('data-category');
}

The HTML5 specification clearly states that the data attributes should not be used to replace an existing attribute or an element that may be more semantically appropriate. For example, it would be inappropriate to add a data-time attribute to specify a time value in a span element as the following code shows:

<span data-time="08:00">8am<span>

The most appropriate and more semantic element to use would be a time element, as the following code shows:

<time datetime="08:00">8am</time>

When developing Windows 8 apps, we can use the Windows library for JavaScript (WinJS) to achieve more advanced binding of data to HTML elements. The Win8 JavaScript library utilizes the HTML data-* attributes to provide an easy way to programmatically implement data binding.

Summary


In HTML5, there are new semantically rich elements that can convey the purpose of their use. There are media elements that allow you to easily add audio and video to your application, and new input types and attributes that you can use to create intelligent and interactive forms and bind them to data on-the-fly, all with less markup and code than ever before.

In the next chapter, we will have a look at the new and rich CSS3 features available for us when developing for Windows 8, and how we can use them to style and apply layouts to our HTML.

Left arrow icon Right arrow icon

Key benefits

  • Learn about the powerful new features in HTML5 and CSS3
  • Quick start a JavaScript app from scratch
  • Get your app into the store and learn how to add authentication

Description

Windows 8 has already been launched and been installed on millions of devices while the store is getting populated with apps, and soon enough everyone will want a Windows Store app. So start now and learn how to develop apps for Windows 8 using HTML5, CSS3, and JavaScript and you will be killing two birds with one stone by getting introduced to important features in HTML5 and CSS3 at the same time. You will gain the advantage of utilizing your web development skills to transform your website into an app or the other way round. Developing Windows Store Apps with HTML5 and JavaScript is a practical, hands-on guide that covers the basic and important features of a Windows Store App along with code examples which will show you how to develop these features, all the while learning some of the new features in HTML5 and CSS3 which you can utilize in other areas of development. This book starts with the new features in HTML5 and CSS3 that are incorporated with Windows 8 development, and then moves on to creating a blank Windows Store app and add features to it as we move through the chapters till we package the app and make it ready for publishing. Finally, we will have a look at how similar it is to develop the same app with XAML. You will also learn how to add and use new controls dedicated for Windows 8 and then see how to fetch data for the app and bind it to the controls. We will also take a look at making the app adapt to change in screen sizes and rotation as well as how to make the app live with tiles and allow users to sign in using their email accounts. Also you will learn how to add an app bar, and lastly you learn how to finalize the app and publish it. If you want to leverage your web development skills and utilize it in developing for Windows 8, then you came to the right place. Developing Windows Store Apps with HTML5 and JavaScript is packed with examples and screenshots which will make it easy for you to implement all the things you learned throughout the book.

Who is this book for?

This book is great for developers who want to start developing for Windows 8 and it also targets developers who want to get introduced to powerful advancements in standards-based web technology, while using it to build Windows Store apps, as well as leveraging their existing skills and code assets in web development.

What you will learn

  • Using HTML5 elements
  • Styling with CSS3
  • Using Windows Library for JavaScript controls
  • Getting data via web URLs and binding it to controls
  • Creating a blank Windows Store JavaScript app
  • Understanding view states and making the app responsive
  • Adding live tiles and notifications for the app
  • Creating a basic app using XAML
  • Adding user sign-in features via email accounts
  • Understanding the Windows Store and publishing the app

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 23, 2013
Length: 184 pages
Edition : 1st
Language : English
ISBN-13 : 9781849687102
Languages :

What do you get with a Packt Subscription?

Free for first 7 days. £16.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 23, 2013
Length: 184 pages
Edition : 1st
Language : English
ISBN-13 : 9781849687102
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 90.97
Developing Windows Store Apps with HTML5 and JavaScript
£20.99
Learning jQuery - Fourth Edition
£32.99
HTML5 Web Application Development By Example : Beginner's guide
£36.99
Total £ 90.97 Stars icon
Banner background image

Table of Contents

11 Chapters
HTML5 Structure Chevron down icon Chevron up icon
Styling with CSS3 Chevron down icon Chevron up icon
JavaScript for Windows Apps Chevron down icon Chevron up icon
Developing Apps with JavaScript Chevron down icon Chevron up icon
Binding Data to the App Chevron down icon Chevron up icon
Making the App Responsive Chevron down icon Chevron up icon
Making the App Live with Tiles and Notifications Chevron down icon Chevron up icon
Signing Users in Chevron down icon Chevron up icon
Adding Menus and Commands Chevron down icon Chevron up icon
Packaging and Publishing Chevron down icon Chevron up icon
Developing Apps with XAML Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(8 Ratings)
5 star 50%
4 star 37.5%
3 star 12.5%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Nidal Hasan Araby Nov 21, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I have read throughout the book. It is very handy for those who wants to get a hands on introduction to learning windows store application development with HTML5 and java script. Those who have some knowledge will benefit from the examples found in the books to jump start their development activities. I recommend this for all users interested in having an a to z application development and submission to the store.
Amazon Verified review Amazon
Chukri Soueidi Mar 28, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is a solid guide for developing windows metro style apps.You can read this book and start building apps for the Windows Store using minimum skills in JavaScript and HTML5.Carefully written, clear and concise, I enjoyed it a lot.
Amazon Verified review Amazon
Foogaro Nov 27, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book is well done, it covers pretty much everything you need to get started developing your HTML5 app for Windows Phone, going deep to professional matters.You don't need to have any particularly skill, it starts from the basic and quickly leads you to complex stuff.In the first chapters it explains the fundamental of the new HTML5 semantic components, the new CSS3 (cascading style sheet) selectors features, as well as the powerful WinJS library with all its UI components (they are real widget you can use in your mobile app).Since chapter 4 you start building your first and real mobile application using Visual Studio 2012 and the Windows 8 SDK.In order to start developing Windows Store apps, you will need to have a developer license for Windows 8. This license lets you install, develop, test, and evaluate apps locally before they are tested and certified by the Windows Store.As you get acquainted using the tools, the book drives to real application scenario such as dynamic data binding and responsive design.Once you complete your design, your business logic, the book guides you to bring your app to life, taking you to the next professional level with tiles and notification.The book shows you how to build a multi user application, using the OAuth standard.At the end, you will learn how to package and publish your apps. Those are key points as the packaging and publishing process are a little complex, obviously.The book ends with a chapter dedicated to XAML, which is Extensible Application Markup Language.In conclusion, I think this book is very useful for any one interested in developing HTML5 mobile application, especially those ones targeting Windows 8 devices.Yep, I don't think this book is just for Microsoft Windows developer, all the code showed is HTML5, CSS3, Javascript, those are standards.
Amazon Verified review Amazon
Damir Arh Oct 21, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Strangely enough the book starts out with a pretty thorough overview of HTML 5 and CSS. For existing web developers who are interested in learning how to use their skills for developing Windows Store apps this probably won’t be of much use, but I still think it’s a welcome addition to the book. It certainly made it easier for me to follow the remaining chapters and I’m sure it will for other readers with similar (lack of) skills as well.The rest of the book focuses on Windows Store app development, as expected. Having already gone through the process of learning it, I can say that in spite of its shortness, it manages to cover all the important topics. The reader should definitely be able to write and publish his own first application, once he’s done with it. More importantly, it provides a good basis for further learning about the topic which I would certainly recommend.The last chapter of the book does feel a bit out of place, though. In only a couple of pages it tries to compare HTML5 / JavaScript development of Windows Store apps to .NET / C# approach. I’m not sure it’s really useful for anyone. For those without prior knowledge of C#, I think it is to brief to give any real value. On the other hand, those with existing previous knowledge will want to learn more and will probably find a different source of information.Still, this chapter doesn’t really take away any value from all the other chapters. You can always skip if you’ re not interested in it. All in all I would recommend this book to anyone with no or minimal knowledge about Windows Store apps, who’s interested in developing them using HTML5 and JavaScript, even if he isn’t already proficient in them.
Amazon Verified review Amazon
Juri Nov 22, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book is especially suited for beginners in the are of HTML5 Windows Store Apps. While having some knowledge/experience with HTML5 and JavaScript is an advantage, it isn't absolutely necessary as the book has some introductory sections on those concepts, teaching you just enough to get started.I appreciate the book as it follows a very practical approach, covering the very basics through more advanced stuff till a successful publication on the Windows Store.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.