Training Guide: Programming in HTML5 with JavaScript and CSS3 Ebook

(Nora) #1

Lesson 1: Visual Studio 2012 CHAPTER 1 7


■■Fixed Layout App his template provides a single page with a fixed aspect ratio T
layout that scales to fit the screen.
■■Navigation App This template provides a single-page application containing con-
trols for navigation.
Selecting a template causes a copy of the template to be opened in the Solution Explorer
window. By default, the Solution Explorer window is on the right side, although windows can
be dragged to any location on the screen. Solution Explorer contains a tree representation of
all projects that are loaded into the current solution.
Under the Solution Explorer window is the Properties window, which is context-sensitive
and contains the properties of the currently selected item. The properties are visible in this
window, and most are also configurable.
On the left side of the screen is the toolbox. By default, the toolbox is a tab that you can
point to to open the window. The toolbox is also context-sensitive, so different tools are avail-
able based on what is being displayed in the center window.

Quick check
■■You want to create a Windows Store application. Which edition of Visual
Studio 2012 will you use, and is there an operating system requirement for your
system to develop Windows Store application applications?

Quick check answer
■■You must use Visual Studio Express 2012 for Windows 8 and have Windows 8
installed to develop Windows Store applications.

Examining the Blank App template
When the Blank App template is selected, a new solution containing one project is created.
The new project won’t be totally blank. As shown in Figure 1-3, there are several files and
folders in this new project. At the outset, default.js was created, and it’s currently displayed in
the JavaScript editor window.
The default.js file is in the js folder, which is where you can add your own JavaScript files.
This default.js file currently contains a small amount of code, which Chapter 3, “Getting
started with JavaScript,” revisits in more detail. Here is a general overview of what it does.
The use of function on the third line creates a naming scope for variables and functions in
your application. In the middle of the code are TODO comments that provide a place to put
your own code to be executed when the application is launched or reactivated after being
suspended or when the application is being suspended.
Free download pdf