Copyrighted Material
Total Page:16
File Type:pdf, Size:1020Kb
PART I Introduction to Windows 8 Application Development CHAPTER 1: A Brief History of Windows Application Development CHAPTER 2: Using Windows 8 CHAPTER 3: Windows 8 Architecture from a Developer’s Point of View CHAPTER 4: Getting to Know Your Development Environment COPYRIGHTED MATERIAL 012680c01.indd 1 8/26/12 2:59 PM 012680c01.indd 2 8/26/12 2:59 PM 1 A Brief History of Windows Application Development WHAT YOU WILL LEARN IN THIS CHAPTER: ➤ Understanding how the Windows operating system began, and how it evolved over the past 27 years ➤ Grasping the diff erent historical tools and technologies that have characterized Windows development ➤ Perceiving the paradigm shift of Windows 8 and using it for applica- tion development ➤ Getting to know Windows 8 style applications Windows 8 represents the biggest leap in the entire lifetime of this operating system. It is not simply a new version that updates old capabilities and adds a number of requested and trendy features. But, as Microsoft emphasizes, the operating system has been “re-imag- ined.” Without knowing where Windows 8 comes from, it is diffi cult to understand the paradigm shift it brings. In this chapter, you fi rst learn how the operating system has evolved over the last 27 years, and then you learn about the development technologies and tools as they evolved in tandem with Windows. THE LIFE OF WINDOWS When the very fi rst version of Microsoft Windows was released on November 20, 1985, it was designed to be geared toward graphical user interfaces (GUIs). Microsoft created Windows as an extra component for its MS-DOS operating system, and Windows totally changed the 012680c01.indd 3 8/26/12 2:59 PM 4 ❘ CHAPTER 1 A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT landscape for personal computers. The fi rst version of Windows used very simple graphics, and it was more of a front end to MS-DOS than a real operating system. From Windows 3.1 to 32-bit Almost seven years passed after the fi rst version was introduced before Windows 3.1 was released in March 1992. This 16-bit operating system allowed multitasking — i n an environment where users were not used to seeing it. The new version of Windows contained virtual device drivers that could be shared between DOS applications. Because of its protected mode , Windows 3.1 was capable of addressing several megabytes of memory — the default address mode used by the 8086 family of central processing units (CPUs) allowed only 640 KB at that time — without the need for any virtual memory manager software. Computer users living in that era might remember the startup splash screen of this operating system, as shown in Figure 1-1. FIGURE 1-1: The splash screen of Windows 3.1 012680c01.indd 4 8/26/12 2:59 PM The Life of Windows ❘ 5 NOTE Multitasking is a capability of operating systems that allow the running of multiple tasks (also known as processes ) during the same period of time. These tasks share the computer’s resources, such as the CPU and memory. The operating system switches among the tasks while executing them. Each task runs for a small amount of time, and because of fast switching, they seem to run simultaneously. Protected mode is an operational mode of x86-compatible CPUs that enables special features such as virtual memory handling and multitasking. Released in August 1995, Windows 95 was a 32-bit operating system that supported preemptive multitasking — i n other words, the operating system was capable of interrupting a task without any active contribution by the task. Windows 95 no longer was an add-on for MS-DOS, but now represented a full-fl edged operating system (a fact that was debated for a long time). A few other Windows versions followed (specifi cally, Windows 98 and Windows Me), before Windows XP was released in October 2001. Windows XP and Windows Vista With its famous logo shown in Figure 1-2, Windows XP became the most popular version of Windows. Weird as it may seem, this success (in terms of its huge installed base) was only partly because of the new user experience (XP stands for “eXPerience”) it offered when it was released. Similarly, innovations such as the GDI+ graphical subsystem, the fast user switching, ClearType font rendering, 64-bit support, and much more, also only partially contributed to the success of this version of Windows. Actually, the primary boost to XP’s success was the unpopularity of Windows Vista — its successor. FIGURE 1-2: The Windows XP logo Released in November 2006, Windows Vista appeared with a brand-new design, and it offered a very improved security — in contrast to XP, which required three service packs to remove its secu- rity issues and pains. Although this could have been enough to achieve a greater popularity than its 012680c01.indd 5 8/26/12 2:59 PM 6 ❘ CHAPTER 1 A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT predecessor, Vista required improved hardware as a price for its new features. Most enterprises that had spent a signifi cant part of their IT budget stabilizing XP — after Windows XP Service Pack 3 (SP3)—simply did not deem it reasonable to migrate to Vista. Vista soon became the shortest-living operating system in the Windows family. Windows 7 Blots Out Vista Fiasco As Steven Sinofsky (the president of Microsoft’s Windows division) confessed several times, Microsoft had learned its lesson even before it started to design Windows 7, which was released in July 2009, two years and eight months after Vista. Windows 7 contains signifi cant performance improvements over Windows XP and Vista, including boot time, shutdown time, better task scheduling on multi- core CPUs (that is, CPUs with more than one processor), search, and much more. The user experience improved a lot, and Windows 7 introduced new features such as jump lists, Aero Peek, Aero Snap, and many other small things that made it easier to navigate among application windows, as well as orga- nize them on the screen. Windows 7 defi nitely provided a successful way to blot out the Vista fi asco. For the Windows team, it would have been easy to follow the direction designated by Windows 7, but the team instead undertook a most compelling challenge. The Paradigm Shift of Windows 8 Although Windows was born in an era where personal computers became part of everyday life, it still remained an operating system created with enterprises and information workers in mind. Most func- tions offered by the operating system actually wanted — or sometimes forced — the users to work in the way wired into the system. Users could not perform any actions before getting acquainted with concepts such as fi les, directories, security groups, permissions, shares, the registry, and so on. This approach mirrored how the designers assumed that users should interact with the system. NOTE Because of the applications that swarmed out to available system resources, the Windows operating system needed periodic maintenance by way of cleanups, disk defragmentation, virus checks, service pack installations, and so on. Although each new version made some great improvement toward light- ening or automating this burden, the onus never faded away completely. Microsoft Takes the First Steps Toward Consumers Apple’s consumer-centric products such as iPhone and iPad showed the world that there was another approach making it possible to interact with computer software in an intuitive way — without hav- ing any idea what a fi le, a directory, the system registry, or an application installation procedure was. Microsoft seemed to not understand this approach for a long time, but the sales fi gures of the market forced the company to shift its focus to consumer-centric devices and operating systems. The fi rst serious change in Microsoft’s behavior could be seen in the middle of February 2010 at the Mobile World Congress (in Barcelona, Spain), where the company fi rst introduced Windows Phone 7 to the public. Windows Phone 7 was totally about the consumer experience. The visual design, its 012680c01.indd 6 8/26/12 2:59 PM The Life of Windows ❘ 7 simplicity, and its gentle, well-hit animations highlighted the user interface (UI), and so the usage of this device became very intuitive. The market appraised this change, and now — almost a year after the Windows Phone 7.5 “Mango” release — Microsoft is the third competitor in the mobile operat- ing system (OS) market, and is getting closer and closer to Apple’s iOS and Google’s Android. NOTE The Windows operating system family did have editions for embed- ded devices (Windows Embedded) and mobile phones (Windows CE and Windows Mobile), which were available before Windows Phone 7. Windows 8 Appears on the Scene The consumer-centric approach of Windows Phone 7 became a part of the operating system experi- ence with the release of Windows 8. When you start the operating system (the boot time has signifi - cantly decreased in comparison to Windows 7), the new Windows 8 Start screen does not remind you of the former desktop with the taskbar at the bottom. Instead, you are faced with a set of tiles, each representing an application, as shown in Figure 1-3. FIGURE 1-3: The Windows 8 Start screen This new Start screen is a clear message to consumers. Windows is not only an operating system for information workers and seasoned computer users, but it is also a consumer device designed with multi-touch sensitivity, tablets, and slates in mind. The surface of the Start screen is very intuitive, 012680c01.indd 7 8/26/12 2:59 PM 8 ❘ CHAPTER 1 A BRIEF HISTORY OF WINDOWS APPLICATION DEVELOPMENT and most people can immediately start playing with it without any guidance.