HTML and CSS Reference
In-Depth Information
Files and folders created within the roaming storage are subject to the same rules as the
local store, except that they are synchronized between all Windows 8 machines running
your application under the same Windows account.
Files and folders created within the temporary storage are subject to the same rules as
the local store, except that they will be deleted periodically by Windows.
The API for manipulating files (that is, creating, writing, and reading content) in the local disk
or the isolated storage is the same. All that changes is the root object to which you apply your I/O
Note If none of the options listed here for storing data are satisfying, then you probably
want to consider using a true database. A database allows you to store data in tables where
a table is a collection of related data organized in columns. For example, the Task object
you used so far can easily be rendered as a row in a database table. The positive aspect of
using a database is mostly in the query capabilities it has; in this case, a database will offer
unparalleled capabilities of searching for tasks based on their priority, due date, or perhaps
completion. If these aspects are key for you, then embedding a database in your Windows
Store application is probably a wise choice. Having said that, which database can you run
on a Windows 8 device? The best choice is probably using SQLite. You can install the SQLite
runtime for Windows Store applications directly from the Tools | Extensions and Updates
menu of Visual Studio. Once there, you select the Online | Visual Studio Gallery tab, and
then query for SQLite. Details on the setup process and a quick introduction to using SQLite
in Windows 8 can be found here: .
Creating tasks in the isolated storage
The final exercise of this chapter consists of creating a new version of the TodoList application that
saves tasks to the isolated storage using the configuration that allows for tasks to roam across
multiple Windows 8 devices. This means that your users will be able to create a task on a Windows 8
PC and retrieve the same task when they use the application from a Microsoft Surface device.
reworking the user interface of TodoList
To preserve the current version of TodoList that uses file pickers and creates tasks all over the
disk, let's fork the project and create a fresh new copy of it. You can copy the folder and name it
differently—for example, Todolist-Local . To avoid confusion, you also change the title bar in
default.html by replacing the H1 element with the following markup:
<h1>TO-DO List (CH10-Local)</h1>
The main trait of this new version is that you are not going to use file pickers anymore. Subsequently,
you don't need an Open button anymore; at the same time, you need a view where all current tasks are
Search WWH ::

Custom Search