Skip to main content
main-content

Über dieses Buch

Beginning Windows Store Application Development – HTML and JavaScript Edition introduces you to the Windows 8 modern app design paradigm and the new Windows 8 programming model developed around this paradigm. You'll learn to build rich, immersive applications designed to run on the many devices powered by Windows 8.

The authors draw on their extensive practical experience to provide not only a comprehensive introduction to the model and its features, but guidance on best practices and a real-world sample application that you develop over the course of the book. Beginning Windows Store Application Development – HTML and JavaScript Edition also emphasizes how devices will be used and applications will be built in a world that has become far more connected. The book takes you beyond the syntax of any development language and examines factors such as application design, user experience, social integration, and maintaining data and settings across multiple devices.

Inhaltsverzeichnis

Frontmatter

Chapter 1. Welcome to a Touch-First World

Abstract
In April 2010, I first heard the phrase that defined Microsoft’s new strategy: “three screens and the cloud.” This referred to a targeted approach to ensure that Microsoft’s products were ubiquitous on mobile phones, desktop computers, and television screens and that these platforms provided a seamless experience by being held together with data in the cloud. The products represented on the three screens were Windows Phone 7, Windows 7, and Xbox 360. Microsoft still dominates the television screen, with its Xbox line accounting for approximately half of all game consoles sold worldwide and a continued focus to move that platform beyond gaming, but to me, Windows 8 brings a different meaning to three screens and the cloud—one where the three screens include phones, tablets, and PCs, all running on the Windows 8 core and tied with cloud services, as shown in Figure 1-1.
Scott Isaacs, Kyle Burns

Chapter 2. The Microsoft Design Language

Abstract
Beyond the basic touch principles discussed in the previous chapter, the design teams at Microsoft developed the Microsoft design language, previously referred to as Metro, which is used to guide the user-interface development for Windows Phone 7, Windows Phone 7.5, and now for Windows 8 and Windows Phone 8. The Microsoft design language was inspired by the simple, easily understood language seen in street signs in metropolitan areas and in mass transit and strives to bring this simplicity and intuitive flavor to computing. In this chapter, I will cover the elements of the Microsoft design language, show examples, and explain how Windows 8 incorporates them. Before jumping into the Microsoft design language itself, I will cover the Swiss design style, whose influence can be clearly seen in elements of the Microsoft design language.
Scott Isaacs, Kyle Burns

Chapter 3. Designing Windows Store Applications

Abstract
In a perfect world, application developers are handed clear, concise packets of paper that lay out exactly how their application should look and everything that it should do. They work from that paper, which, from their perspective, may have spontaneously generated itself, and produce a working and useful application. While many developers have managed to find such a world, to the majority of people who make their living writing code, this arrangement seems as unattainable as reaching Shangri-La.
Scott Isaacs, Kyle Burns

Chapter 4. Visual Studio 2012 and Windows Store Application Types

Abstract
In application development, the integrated development environment (IDE) can make the difference between feeling like you can work easily and focus on the problem your application is supposed to solve and feeling like you are so distracted trying to figure out how to maneuver within the IDE that you cannot focus on the real task of producing software. With the last several versions of Visual Studio, Microsoft has increasingly built upon a reputation of having one of the best development IDEs available. Even many developers who don’t care to develop for the Microsoft platform will say (if grudgingly) that one is hard-pressed to find a better development environment. In this chapter, you will learn about Visual Studio 2012, which is the latest release in this lineup. As complete coverage of the tools and features would require a book of its own, I will cover in this chapter the topics that I consider to be most important to finding your way around the environment well enough to complete the exercises in this book. In addition to learning about Visual Studio in general, you will also learn about the project templates that are used for Windows Store application development.
Scott Isaacs, Kyle Burns

Chapter 5. HTML Controls

Abstract
As is the case with many new technologies, many people don’t know exactly what HTML5 is. To some, it’s all about video. To some, it’s about semantic tags, such as the new header and nav tags. To some, it’s a kind of new magic that makes web sites work on mobile devices. To others, it’s simply the next version of the HTML we’ve known and loved for the last few decades. Regardless of what you may have heard, it’s pretty safe to say that HTML5 isn’t a single thing. In fact, much of what is considered HTML5 is a combination of three things: HTML, JavaScript, and CSS. There is no shortage of information on the Internet about HTML5 and its capabilities. A great resource is the HTML5 Rocks web site ( www.html5rocks.com ).
Scott Isaacs, Kyle Burns

Chapter 6. WinJS Controls

Abstract
In Chapter 5, I covered some common HTML controls available for use in your Windows 8 applications built with HTML and JavaScript. If you have a background in web development, you are probably familiar with the material I covered in Chapter 5. Over the course of the next few chapters, I’ll cover the various controls included with WinJS.
Scott Isaacs, Kyle Burns

Chapter 7. WinJS Collection Controls

Abstract
In the last two chapters, I introduced a number of controls that you can use to build your Windows Store applications. With the exception of the DropDownList control, all of the controls I’ve presented so far were designed to deal with a single value. Each text input control is associated with a single string; each button control is associated with a single action; and each tooltip displays a description or instructions for a single item. In fact, even though the DropDownList control contains many items to choose from, it is logically associated with the choices associated with a single setting.
Scott Isaacs, Kyle Burns

Chapter 8. WinJS Custom Controls

Abstract
Using the controls I’ve covered in the last three chapters, you can build an application to meet pretty much any requirements, and as you’ll see as we dig into more of the details of these controls and other concepts, that is exactly what you will be doing starting in Chapter 9. That said, sometimes you might find yourself wishing for some additional controls that aren’t provided out of the box, and custom controls could just be what you need.
Scott Isaacs, Kyle Burns

Chapter 9. Building the User Interface

Abstract
Now that I’ve covered touch concepts, the principles of the Microsoft design style, creating Visual Studio projects, and working with the many controls that are available for your Windows Store applications, it’s time to do something a little more interesting. In this chapter, you will start building a real-world application that you’ll continue to build upon throughout the remainder of the book. We’ll be building a time-keeping application geared to software consultants, designers, freelancers, and any others that perform project-based work.
Scott Isaacs, Kyle Burns

Chapter 10. Transitions and Animations

Abstract
Subtle animations exist throughout Windows 8. When switching to the Start screen, the tiles zoom in to populate the familiar grid, and they react to being clicked or touched. An activated Search or Settings pane slides out from the side of the screen like a drawer. Likewise, AppBar controls slide in from the top or bottom of the screen. I used the word subtle to describe these animations. What I meant is that, in day-to-day use, you are more likely to notice if the animations have been removed than that they existed in the first place.
Scott Isaacs, Kyle Burns

Chapter 11. Data-Binding Concepts

Abstract
It goes without saying that data is an integral part of nearly every useful application. Clok, our sample application, is no different. This chapter will cover various techniques for displaying data in your application—a process called data binding. Chapters 14, 15 and 16 will cover working with data from a variety of different sources, as well as different ways to save your data. To keep things simple in this chapter, however, we’re going to work with data that is stored in memory. This has the side effect of preventing our changes from persisting after we close the application, but I’ll address that in Chapter 14.
Scott Isaacs, Kyle Burns

Chapter 12. Promises

Abstract
Have you ever been frustrated when an application you were using temporarily froze while it was performing some task? Maybe it froze while you were searching its data or perhaps performing a long calculation. There are many factors that could cause an application to become unresponsive, but it is usually the result of doing something intensive on the same thread that is responsible for updating the user interface (UI). That means that when this long-running code is executing, the UI is unable to update, causing a perceived application freeze.
Scott Isaacs, Kyle Burns

Chapter 13. Web Workers

Abstract
In Chapter 12, I introduced promises as a way to handle values returned from asynchronous operations. While promises offer a lot of flexibility in how you do async work, I pointed out that asynchronous does not imply multiple threads. JavaScript applications execute in a single-threaded environment. Asynchronous does not mean “do two things at the same time.” Instead, it means “do this thing later, and let me know what happened when it’s done.” That said, applications executing on multiple threads have several advantages, such as taking advantage of multiple processors to perform a task more quickly or to perform some work in the background, while the user can continue to use other parts of the application.
Scott Isaacs, Kyle Burns

Chapter 14. Data Source Options

Abstract
In Chapter 11, I introduced data binding and covered a handful of different techniques you can use to display your application’s data on the screen. So far, however, all of the data in Clok has been stored in memory. Test data is loaded when the application is launched, and any modifications to that data are discarded when the application is closed. While that allows us to build an application that looks nice and to work out the details of allowing the user to interact with data, it is not enough to be a usable application.
Scott Isaacs, Kyle Burns

Chapter 15. Session State and Settings

Abstract
In Chapter 14, I introduced some techniques for working with local and remote data sources. In addition to the data that the user creates and interacts with in your application, there are often other values that have to be saved and loaded as well. For example, you may wish to save the contents of a form that the user is working on, so that you can repopulate the form after your application is terminated and then resumed. Or the user may wish to specify certain preferences to use each time they run your application.
Scott Isaacs, Kyle Burns

Chapter 16. Files

Abstract
With options ranging from IndexedDB to session state to local settings and more, you have many options when deciding how to save something for use at a later time. In this chapter, I’ll cover working with an entirely different type of data: files.
Scott Isaacs, Kyle Burns

Chapter 17. Handling State Changes

Abstract
Arguably the most important requirement of any application is that it work as the user expects it to in every situation. Clearly it’s important for your application to perform its core tasks correctly, but that’s not what I’m talking about here.
Scott Isaacs, Kyle Burns

Chapter 18. External Libraries

Abstract
As you are aware by now (I hope), the purpose of this book is to introduce building Windows Store applications with HTML and JavaScript. Each chapter in this book is focused on teaching you a concept that allows you to use your existing HTML and JavaScript knowledge for building native Windows applications. This chapter will have a slightly different focus, however: working with external libraries.
Scott Isaacs, Kyle Burns

Chapter 19. Search and Share Contracts

Abstract
With Windows 8, users can interact with your application in new and different ways. Of course, they can launch your application and take advantage of the user interface you’ve built. In addition to that, your application can implement certain functionality that will allow tighter integration with the operating system itself. By taking advantage of contracts, you can ensure that your application supports common features of Windows in a consistent manner.
Scott Isaacs, Kyle Burns

Chapter 20. Printing

Abstract
I’ve been writing software for many years now. Whenever the topic of adding printing features was discussed, I had one of two reactions internally. If I was working on a web-development project, I’d think, “OK, no big deal. Printer-friendly web pages are usually simple.” If I was working on a WinForms or WPF desktop application, I’d think, “Ugh.” It wasn’t rocket science to add printing support to a desktop application, but it was usually more challenging than other features that had similar value.
Scott Isaacs, Kyle Burns

Chapter 21. Notifications and Tiles

Abstract
One of the best featuresof Windows 8, in my opinion, is that so much information is available simply by glancing at the screen.
Scott Isaacs, Kyle Burns

Chapter 22. Camera and Location

Abstract
Nearly every tablet and laptop available at the time of this writing has a webcam built in. I looked at each of the first 15 laptops listed on a popular retail web site today, and every single one included a webcam. My own laptop has one built into the lid, and my Surface tablet has two—a front-facing camera and a rear-facing camera. For the user whose computer does not have a built-in webcam, USB webcams are a fairly cheap investment, with some basic models available for less than US$20.
Scott Isaacs, Kyle Burns

Chapter 23. Sharing Apps in the Windows Store

Abstract
Most craftsmen finishing a work don’t want to tuck it away in a place where only they can see it—they want to share it with others who can appreciate it or get some value from it. This is as true of a software application as it is of a work of art. Prior to Windows 8, if you were to have asked “How do I share my applications with other people?” the answer would have invariably focused on the logistics of creating an installer package or the benefits of XCOPY deployment. The answer, however, would most likely have lacked any indication of how to make sure people know about the application’s availability or how to monetize the application, if that was the goal. In this chapter, you will learn about the Windows Store, which is the primary method for distributing applications built for Windows 8. You will learn about giving your application a unique brand, packaging the application for distribution, and navigating the submission process. This chapter will not cover establishing a developer account or making use of in-app payment features enabled by the Windows Store APIs.
Scott Isaacs, Kyle Burns

Backmatter

Weitere Informationen

Premium Partner

    Bildnachweise