Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

App architecture

Learn about the programming options for Windows Runtime apps.

Overview

You can use any of the following programming languages to create apps that run on Windows or Windows Phone, or target both with a universal Windows app:

  • JavaScript and HTML5
  • C# and Extensible Application Markup Language (XAML)
  • Microsoft Visual Basic and XAML
  • Visual C++ component extensions (C++/CX) and XAML
  • C++/CX and Microsoft DirectX

Microsoft Visual Studio and Blend fully support designing, developing, and debugging in all of these languages.

App model architecture

Each programming language has a corresponding app model. The app model is a set of files and design patterns that express an implementation architecture. An app model is to application design as a data model is to database design.

App models are characterized by a number of features, like the app's entry point in code, the file layout in the solution, and the presentation technology.

Entry points

The app's entry point is the function or method that the system calls to start running your app's code. The entry point depends on the programming language. By default, the Visual Studio project templates define the app model architectures, which are shown in the following tables. You have considerable freedom to customize these defaults, but only advanced developers should attempt this.

This table shows the entry points and their default file locations for each app model.

App modelEntry pointFile location
JavaScriptonactivated functiondefault.js in js folder
C#/Visual BasicOnLaunched methodApp.xaml.cs / App.xaml.vb
C++/CX with XAMLOnLaunched methodApp.xaml.cpp
C++/CX with Microsoft Direct3Dmain functionDirect3DApp1.cpp

 

Presentation technologies

The app model's presentation technology defines the look and feel of the app. You can create Windows Runtime apps by using three distinct technologies: XAML, HTML5, and DirectX. This table shows the programming languages that you can use with particular presentation technologies.

Programming languagePresentation technology
C#/Visual BasicXAML
JavaScriptHTML5
C++/CXXAML, DirectX, and XAML/DirectX interop

 

Assets

Required assets for Windows Store apps are four images, named Logo.png, SmallLogo.png, SplashScreen.png, and StoreLogo.png.

App modelLocation of assets
JavaScriptimages folder
C#/Visual BasicAssets folder
C++/CX with XAMLAssets folder
C++/CX with Direct3DAssets folder

 

Asynchronous programming

App modelAsynchronous
JavaScriptCommon JS Promises/A
C#/Visual Basicasync/await keywords
C++/CXtask class / IAsyncOperation

 

Creating Windows Runtime components

You can factor your code into reusable components for your Store apps, which are named Windows Runtime components. There are specific interface requirements that Windows Runtime components must adhere to. You can create Windows Runtime components by using C#, Visual Basic, or C++/CX app models, but not JavaScript. For JavaScript, you create reusable modules by factoring code into files that you include in different projects.

You can't create standalone, reusable software libraries for distribution in the Windows Store. Your reusable libraries must ship with an app.

For more info, see Creating Windows Runtime components.

Packaging and deployment

Package your apps for deployment by using the manifest designer in Visual Studio. The manifest designer provides a simple user interface for changing settings in the app manifest file, which is named Package.appxmanifest. This procedure is the same for all app models.

For more info, see App packages and deployment.

 

 

Show:
© 2014 Microsoft