ENTERPRISE

Windows 8 Architecture from a Developer’s Point of View : Understanding Windows Runtime (part 5) - What’s not in Windows Runtime

2/26/2014 2:52:47 AM

4. Benefits of Windows Runtime

As you have learned, Windows Runtime is a new modern API over Windows Core OS Services, and it is more natural to use from many programming languages, including C++, C#, Visual Basic (.NET), and HTML/JavaScript. This modernization allowed Windows Runtime architects to rethink how a contemporary operating system should support application development:

  • Windows Runtime provides an easy access to hardware such as a Global Positioning System (GPS) unit, sensors, camera, or other modern hardware devices — with a few lines of code. Although, in the past, you had to write a several dozen lines of code to create the first “Hello, world” program in C with Windows 3.1, Windows Runtime enables you to take a picture with the built-in camera in about five lines of code.
  • Applications run in a security sandbox. This means that only those operations are executed that are deemed safe within the current security context. For example, if an application wants to turn on the microphone, this operation is thought unsafe unless the user explicitly confirms that he or she allows using the microphone.
  • The old Win32 API was a separate layer over the core operating system services. Windows Runtime is an integral part of the operating system tuned for developer experience. Windows Runtime is not only easier to use than Win32, but it is more stable and has improved memory management to allow less memory consumption and faster memory management.
  • Modern hardware devices and the always-responsive UI cannot work without an asynchronous programming model. Windows Runtime supports asynchrony natively.

5. What’s not in Windows Runtime

By now, you have learned that Windows Runtime is the key component to developing Windows 8 style applications. All services of the operating system exposed through Windows Runtime can be consumed from C++, C#, Visual Basic, and JavaScript. Before you put an equation sign between Windows 8 style applications and Windows Runtime, you should know that Windows 8 style applications can leverage other operating system components that are not available in Windows Runtime.

Applications written in the C or C++ programming languages are compiled directly to CPU-specific machine instructions that can be directly executed on the CPU. These applications can directly access the native operating system components responsible for rendering the UI, controlling input devices, managing sensors, communicating with the GPU, and much more. Most of these components may add extra value to Windows 8 style applications. For example, game programmers can leverage the high-performance graphics capabilities of DirectX APIs, such as Direct2D, Direct3D, DirectWrite, XAudio2, and XInput.


NOTE Microsoft DirectX is a collection of multimedia and game APIs. These APIs eliminate several additional layers between applications and the hardware hosting the specific function to provide the high performance required by multimedia and game applications. Direct2D is the two-dimensional graphics API, and Direct3D is designed for three-dimensional graphics game development. DirectWrite is a text-layout and glyph-rendering API that was shipped with Windows Vista first, and is still available in Windows 8.
When Microsoft set out to develop its gaming console, the X was used as the basis of the name “Xbox” to indicate that the console was based on DirectX technology.

These APIs provide a very thin layer between your application and the hardware they access, and use low-level data structures to move information to and from the app and the hardware. Although services available through Windows Runtime are safe with regard to UI responsibility and system stability, these APIs are tuned for performance — requiring more control within your application.

Using C++, you can create Windows 8 style applications that leverage DirectX API features. For example, you can create great calligraphic texts with DirectWrite, as shown in Figure 9.

Figure 9: Windows 8 style application using the DirectWrite API

c03f012.tif

Although these components are not available through Windows Runtime, and you can access them directly only from C++, mechanisms in C# and Visual Basic utilize these APIs in managed code.

Other  
  •  Windows 8 Architecture from a Developer’s Point of View : Windows 8 Development Architecture
  •  Windows 7 : Programming KMDF Hardware Driver - Mapping Resources - Code to Map Resources
  •  Windows 7 : Programming KMDF Hardware Driver - Handling Interrupts (part 2) - Deferred Processing for Interrupts
  •  Windows 7 : Programming KMDF Hardware Driver - Handling Interrupts (part 1) - Code for EvtInterruptIsr Callback
  •  Windows 7 : Programming KMDF Hardware Driver - Support Device Interrupts (part 2) - Post-Interrupt Enable and Pre-Interrupt Disable Processing
  •  Windows 7 : Programming KMDF Hardware Driver - Support Device Interrupts (part 1) - Creating an Interrupt Object,Enabling and Disabling Interrupts
  •  Microsoft Exchange Server 2010 : Managing Data and Database Availability Groups - Content Indexing
  •  Microsoft Exchange Server 2010 : Creating and Managing Database Availability Groups (part 5) - Switching over Servers and Databases
  •  Microsoft Exchange Server 2010 : Creating and Managing Database Availability Groups (part 4) - Configuring Database Availability Group Properties
  •  Microsoft Exchange Server 2010 : Creating and Managing Database Availability Groups (part 3) - Managing Database Availability Group Networks
  •  
    Top 10
    Review : Sigma 24mm f/1.4 DG HSM Art
    Review : Canon EF11-24mm f/4L USM
    Review : Creative Sound Blaster Roar 2
    Review : Philips Fidelio M2L
    Review : Alienware 17 - Dell's Alienware laptops
    Review Smartwatch : Wellograph
    Review : Xiaomi Redmi 2
    Extending LINQ to Objects : Writing a Single Element Operator (part 2) - Building the RandomElement Operator
    Extending LINQ to Objects : Writing a Single Element Operator (part 1) - Building Our Own Last Operator
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8