Metro Revealed_Building Windows 8 Apps with HTML5 and JavaScript.pdf
《Metro Revealed_Building Windows 8 Apps with HTML5 and JavaScript.pdf》由会员分享,可在线阅读,更多相关《Metro Revealed_Building Windows 8 Apps with HTML5 and JavaScript.pdf(103页珍藏版)》请在三一文库上搜索。
1、 Metro Revealed Building Windows 8 Apps with HTML5 and JavaScript Adam Freeman This book was purchased by iv Contents at a Glance Contents . v Related Titles From Apress . viii About the Author x About the Technical Reviewer . xi Acknowledgments xii Chapter 1: Getting Started 1 Chapter 2: Data and
2、Bindings . 17 Chapter 3: Application Controls . 45 Chapter 4: Layouts and Tiles 81 Chapter 5: Life-Cycle Events 101 xiii Introduction Metro apps are an important addition to Microsoft Windows 8, providing the cornerstone for a single, consistent programming and interaction model across desktops, tab
3、lets, and smartphones. 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 app development represents a complete departure from previous ver
4、sions 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 v
5、ersion 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. Th
6、e result is apps that look and feel like an integral 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 Metr
7、o experience. About This Book This book is for experienced HTML and JavaScript developers who want to get a head start creating 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
8、development 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
9、 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, combined with so
10、lid JavaScript experience. INTRODUCTION xiv 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:/. You dont need any other tools to develop Metro applications or for the exa
11、mples in this book. Windows 8 Consumer Preview is not a finished product, and it has some stability issues. Youll 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 Structu
12、re 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
13、 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, youll find some essential context to explain why features are important and why you should implement them. Along t
14、he way, Ill 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 writte
15、n using other technologies, such as XAML/C#. This is a primer to get you started on Metro programming for Windows 8. It isnt a comprehensive tutorial; as a consequence, I have focused on those topics that are the major building blocks for a Metro app. There is a lot of information that I just couldn
16、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: Gettin
17、g 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 debugg
18、er. 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
19、, easy to test, and easy to maintain. Along the way, Ill show you how to define Metro JavaScript namespaces, create observable arrays, use JavaScript promises, and generate content using templates. Chapter 3: Application Controls Certain user interface controls are common to all Metro apps, regardle
20、ss of which language is used to create them. In this chapter, I show you how to create and configure AppBars and Flyouts, which are the two most important of these common controls; together they form the backbone of your interaction INTRODUCTION xv with the user. I also show you how to break up your
21、 Metro content and code into pieces to make your app easy to manage and how to bring those pieces together at runtime. Chapter 4: Layouts and Tiles The functionality of a Metro application extends to the Windows 8 Start menu, which offers a number of ways to present the user with additional informat
22、ion. In this chapter, I show you how to create and update dynamic Start tiles and how to apply badges to those tiles. I also show you how to deal with the Metro snapped and filled layouts, which allow a Windows 8 user to use two Metro apps side by side. You can adapt to these layouts using CSS or Ja
23、vaScript, and I show you both approaches. Chapter 5: Life-cycle Events Windows applies a very specific life-cycle model to Metro apps. In this chapter, I explain how the model works, show you how to receive and respond to critical life-cycle events, and describe how to manage the transitions between
24、 suspended and running applications. I demonstrate how to create and manage asynchronous tasks and how to bring them under control when your application is suspended. Finally, I show you how to support Metro contracts, which allow your application to seamlessly integrate into the wider Windows 8 exp
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Metro Revealed_Building Windows Apps with HTML5 and JavaScript
链接地址:https://www.31doc.com/p-3790943.html