📜 ⬆️ ⬇️

Applications for Windows 8 on C # and XAML

image

Original Title : Building Windows 8 Apps with C # and XAML
Posted by : J. Lickness
Translation of the book : A. A. Zaika
Release date: July 2013

Book on the publisher site.
Book on Ozon.ru
')
Electronic version on sale!

Detailed table of contents
Excerpt


INTRODUCTION


The first rumors about Windows 8 appeared in early 2011. A lot of speculation walked on the Internet, when developers began to wonder what the new platform would be. There were even rumors that the new platform would not support the .NET Framework, that it would be completely based on C ++ or on HTML 5 and JavaScript, and that existing software would not work on it. Early releases and screenshots appeared on Twitter, but this only heightened everyone’s doubts. Finally, on September 13, 2011, Steven Sinofsky, president of Microsoft’s Windows division, introduced Windows 8 to the world.

I was one of the first impatient programmers who downloaded the distribution package. Having installed Windows 8 on a virtual machine, I quickly realized that with the support of the .NET Framework everything is in order. On my new platform, my Silverlight applications worked. C # and XAML languages ​​were among the tools for developing new applications in the "Metro-style" (the name "Metro" in the RTM version of Windows was changed to "Windows Store"). I was unable to attend a California conference on the release of Windows 8, but the reports quickly appeared on the Internet, and I watched them every evening, every morning, whenever I had a free minute.

Windows 8 provides the Windows Runtime Environment (Windows Runtime), a new application development platform with features previously available on Windows computers. I have been building applications all day and have been amazed that my knowledge of C # and XAML, in using Silverlignt and the Windows Presentation Foundation (WPF), is perfectly applicable to the new runtime environment. A new set of components of this platform makes it easier than ever to develop functional applications focused on sensory interaction with the user. In the end, very soon I contacted the publisher of my book, Designing Silverlight Business Applications, and said I wanted to write a book about Windows 8.

Fortunately, I participated in the Microsoft Early Learning Program. The consulting firm Wintellect, in which I work, offered to conduct workshops and seminars designed for new developers who want to learn how to create applications for Windows 8. This allowed me to get acquainted with early product releases and write about various functionalities that eventually became part of the final release. While I was creating examples on touchscreen handling of objects on the screen, transferring formatted content between applications and using live viewing tiles on the initial screen with the ability to quickly browse, I liked the new system more and more.
As part of working on this book, I wrote an article about ten main reasons why developers would like to create applications for Windows 8.
The full version of the article can be found at www.informit.com/articles/article.aspx?p=1853667 .

If you do not go into details, here are the main reasons that, in my opinion, will allow you to enjoy working on a new platform:
• Support for different programming languages . Applications for Windows 8 can be written in VB, C #, C ++ and XAML or use a set of technologies, which includes HTML5 and JavaScript.
• XAML. Developers who are familiar with the power and flexibility of XAML and who have previously been building Silverlignt or WPF applications will feel confident when working on Windows 8 applications using XAML.
• HTML5 . Broad support for HTML5 as one of the markup languages ​​is attractive to those web programmers who switch to programming for tablet computers, where the main focus is on sensory interaction with the user. Although this book is devoted mainly to working with C # and XAML.
• Windows Runtime (WinRT). WinRT contains many controls, components, classes and methods that allow you to solve complex problems with just a few lines of code.
• Contracts. The system of “contracts” represents a new level of organization of data access and interaction between the application and the user.
• Support for asynchronous operations. Support for the await and async commands made the development of multi-threaded code as easy as ever.
• Sensory interaction . Windows 8 pays special attention to data entry. When handling touch events and manipulations, such input by default is supported by all available controls and APIs.
• Parameters. By setting the parameters through contracts, developers are able to provide the end user with a very consistent and familiar mechanism for customizing the application.
• Relocatable profiles . It was easy and simple to create code that synchronizes the state of Windows 8 across different computers through the cloud. (You can share the file with literally one line of code).
• Badges . Windows 8 introduces a set of pre-built icons that you can use to create uniform application command interfaces.

In order to avoid confusion, in this book, I mention programs of a new kind, created specifically for Windows 8, as “applications for Windows 8”. Visual Studio 2012 templates designed to create new applications are grouped under the name "Windows Store" (Windows Store). Although these applications may be distributed using the Windows Store, you can distribute through the Store and classic desktop applications. Therefore, I use the term "Windows Store" only when I mention Visual Studio 2012 templates or when I compare new type applications with traditional desktop applications. In all other cases, you will find references to these applications as “applications for Windows 8”.

These ten reasons are just a superficial overview of the new platform. Windows 8 is different from previous releases of Windows, and therefore perceive the operating system should be different. You will need to adapt to the new interface, which, although it is focused primarily on sensory interaction with the user, also supports the possibility of using a mouse and keyboard. You can use code that transparently calls system unmanaged components, you can work with a new set of controls and other objects. The main purpose of the book you are holding is to quickly take you along the path of mastering a new area of ​​knowledge so that you can start creating great modern applications using your previous knowledge of C # and XAML.

What is this book about


The purpose of the book is to explain how to write applications for Windows 8 using C #, XAML, Windows Runtime, and .NET technologies. I assume you have some development experience. Expanding the basic topics related to C # and XAML, I try to focus on those features that are typical for developing new applications. Regarding more complex techniques for working with C # or XAML, not related exclusively to the Windows 8 platform, I refer to other books, articles or Internet resources so that if you wish, you can continue to study these techniques.

A developer of any level, whether experienced, willing to transfer existing applications to a new platform, or a beginner who wants to write applications for Windows 8 from scratch, will find everything necessary in this book. It covers the full life cycle of the application - from creating a software project to publishing in the Windows Store.

How to use this book


The book aims to show you how to write applications for Windows 8 using C # and XAML. Each chapter is written to help you first understand the fundamental features of the target platform, and then create applications based on the knowledge gained. The book contains examples of texts of programs that demonstrate the capabilities of the system, and recommendations for working with them. Many chapters are based on previous ones. This allows you to gradually talk about all the components that make up a typical application for Windows 8.

All chapters are arranged in a similar way. They begin with an introduction to the topic and an overview of the features available under the topic in question. The following are code examples and walkthroughs showing the application of the described technology. The code examples are explained in detail, the chapter concludes with a debriefing so that you pay attention to the most important points.

I expect you to read this book from beginning to end, regardless of the knowledge and skills you possess. As you read each chapter, you will find that you begin to understand the material better and better, and new concepts will reinforce each other and connect together. After you have fully read the book, you can use it as a reference book, referring to individual chapters at any time when you need to clarify a specific question.
J. Lickness

about the author


Jeremy Lickness is a senior consultant at Wintellect, LLC. He has been working with corporate applications for more than 20 years, 15 of which have been involved in Microsoft-based web applications. He was one of the first to introduce Silverlight 3.0., He worked on many corporate solutions based on Silverlight. Including - over the server monitoring system for the 2010 Winter Olympics in Vancouver and over Microsoft’s own social networking analysis product called Looking Glass. He is also a consultant and project manager at Wintellect. Jeremy works closely with companies from the Fortune 500 rankings, including Microsoft. He has been MVP for three years in a row, the MVP of the year in 2010 was announced. In addition, he received an award for his contribution to the development of the Microsoft online community (Microsoft Community Contributor) through his work in the field of Silverlight. Jeremy is the author of Designing Silverlight Business Applications: Best Practices for Using Silverlight Effectively in the Enterprise (Addison-Wesley). He regularly speaks, writes articles and blogs, covering topics of interest to the Microsoft developer community. His blog can be found at csharperimage.jeremylikness.com .

Source: https://habr.com/ru/post/182398/


All Articles