Metro Revealed Building Windows 8 apps with HTML5 and JavaScript.pdf
(
1479 KB
)
Pobierz
THE
EXPERT’S
VOICE®
IN
MICROSOFT
Metro
Revealed
Building
Windows
8
apps
with
HTML5 and
JavaScript
BE THE
FIRST
TO
UNDERSTAND
MICROSOFT'S REVOLUTIONARY
NEW
DEVELOPMENT TOOLS
Adam Freeman
'
'
'
Apress
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
www.it-ebooks.info
Contents at a Glance
Related Titles from Apress .................................................................... xi
About the Author ................................................................................. xiii
About the Technical Reviewer ............................................................... xv
Acknowledgments ............................................................................... xvii
■
Chapter 1: Getting Started .................................................................... 1
■
Chapter 2: Data and Bindings ............................................................. 17
■
Chapter 3: Application Controls.......................................................... 39
■
Chapter 4: Layouts and Tiles .............................................................. 59
■
Chapter 5: Life-Cycle Events............................................................... 75
Index ...................................................................................................... 89
chapter
1
Getting Started
Metro apps are an important addition to Microsoft Windows 8, providing the cornerstone for
a single, consistent programming and interaction model across desktops, tablets, and smart-
phones. The Metro app user experience is very different from previous generations of Windows
applications: Metro apps are full-screen and favor a usability style that is simple, direct, and free
from distractions.
Metro apps represent a complete departure from previous versions of Windows. There are
entirely new APIs, new interaction controls, and a very different approach to managing the life
cycle of applications.
Metro apps can be developed using a range of languages, including C#, Visual Basic, C++,
and, the topic of this book, JavaScript. Windows 8 is the first version of Windows that embraces
the skills and knowledge of web application developers and makes JavaScript and HTML first-
class citizens in application development.
In this book, I show you how you can build on your knowledge of web app development to
create Metro apps using HTML and JavaScript. The result is apps that look and feel like an inte-
gral part of the Windows experience and that take advantage of core platform facilities.
This book gives you an essential jump start into the world of Metro; by the end, you will
understand how to use the controls and features that define the core Metro experience.
About This Book
This book is for experienced HTML and JavaScript developers who want to get a head start cre-
ating Metro applications for Windows 8 using the Consumer Preview test release. I explain the
concepts and techniques you need to get up to speed quickly and to boost your Metro develop-
ment techniques and knowledge before the final version of Windows 8 is released.
What Do You Need to Know Before You Read This Book?
You need to have a good understanding of HTML and JavaScript, ideally from creating rich web
apps. You need to understand the DOM API, know how events work, and have a solid grasp of
the HTML elements and their DOM object counterparts.
Do You Need to Know About HTML5?
No. You can use some of the HTML5 JavaScript APIs when developing Metro apps, but that is
not the focus of this book. A good basic knowledge of HTML4 or HTML5 will be enough, com-
bined with solid JavaScript experience.
2
CHAPTER 1 | GETTinG STARTEd
What Software Do You Need for This Book?
You will need the Windows 8 Consumer Preview and the Visual Studio 11 Express Beta for
Windows 8. You can download both of them from
http://preview.windows.com.
You don’t
need any other tools to develop Metro applications or for the examples in this book.
Windows 8 Consumer Preview is not a finished product, and it has some stability issues.
You’ll get the best experience if you install Windows 8 directly onto a well-specified PC, but you
can get by with a virtual machine if you are not ready to make the switch.
What Is the Structure of This Book?
I focus on the key techniques and features that make a Metro app. You already know how to
write HTML and use form elements to gather input from the user, and I am not going to waste
your time teaching you what you already know. This book is about translating your web app
development experience into the Metro world, and that means focusing on what makes a Metro
app special.
I have taken a relaxed approach to mixing topics. Aside from the main theme in each
chapter, you’ll find some essential context to explain why features are important and why you
should implement them. Along the way, I’ll show you the conventions for writing JavaScript
Metro apps and introduce as many Metro features as I can. By the end of this book, you will
understand how to build a Metro app that integrates properly into Windows 8 and presents
a user experience that is consistent with Metro apps written using other technologies, such
as XAML/C#.
This is a primer to get you started on Metro programming for Windows 8. It isn’t a com-
prehensive tutorial; as a consequence, I have focused on those topics that are the major build-
ing blocks for a Metro app. There is a lot of information that I just couldn’t fit into such a slim
volume. If you do want more comprehensive coverage of Metro development, then Apress will
be publishing my
Pro Windows 8 Development with HTML5 and JavaScript
book for the final
release of Windows 8.
The following sections summarize the chapters in this book.
Chapter 1: Getting Started
Aside from introducing this book, I show you how to create the Visual Studio project for the
example Metro app that I use throughout this book. I show you how to use the JavaScript tools
in Visual Studio, how to test your Metro apps in the Visual Studio simulator, and how to use the
debugger.
Chapter 2: Data and Bindings
Data is at the heart of any Metro application, and in this chapter I show you how to define
a view model and how to use Metro data bindings to bring that data into your application
layouts. These techniques are essential to building Metro apps that are easy to extend, easy
to test, and easy to maintain. Along the way, I’ll show you how to define Metro JavaScript
namespaces, create observable arrays, use JavaScript promises, and generate content using
templates.
Plik z chomika:
daniellos525
Inne pliki z tego folderu:
All_In_One_Cracking_Guide_p.pdf
(3781 KB)
Build Windows 8 Apps with HTML5 and JavaScript.pdf
(18430 KB)
Hacking Basic Security - Penetration Testing and How to Hack.pdf
(392 KB)
Hacking Exposed Wireless Security Secrets And Solutions, 2nd Edition.pdf
(9645 KB)
HTML5 Game Development Insights.pdf
(14626 KB)
Inne foldery tego chomika:
czasopisma
Czasopisma1
Dla dzieci
kursy i PDFy
Metro 2033
Zgłoś jeśli
naruszono regulamin