Hilo table of contents (Windows Store apps using C++ and XAML)
From: Developing an end-to-end Windows Store app using C++ and XAML: Hilo
Download
After you download the code, see Getting started with Hilo for instructions.
Table of contents
- Developing an end-to-end Windows Store app using C++ and XAML: Hilo
- Getting started with Hilo (Windows Store apps using C++ and XAML)
- Designing Hilo's UX (Windows Store apps using C++ and XAML)
-
Writing modern C++ code in Hilo (Windows Store apps using C++ and XAML)
- Understanding the app's environment
-
- The package manifest
- C++ standard libraries
- Windows Runtime libraries
- Microsoft Win32 and Component Object Model (COM) API
- Parallel Patterns Library (PPL)
- XAML
- Visual Studio project templates
- C++ language extensions for interop
- The C++ compiler and linker
- Certification process of the Windows Store
- Deployment
- Using C++11, standard C++ libraries, and a modern coding style
- Adapting to async programming
- Using parallel programming and background tasks
- Tips for using C++/CX as an interop layer
-
- Be aware of overhead for type conversion
- Call methods of ref classes from the required thread
- Mark destructors of public ref classes as virtual
- Use ref classes only for interop
- Use techniques that minimize marshaling costs
- Use the Object Browser to understand your app's .winmd output
- If C++/CX doesn't meet your needs, consider WRL for low-level interop
- Don't confuse C++/CX language extensions with C++/CLI
- Don't try to expose internal types in public ref classes
- Tips for managing memory
- Debugging tips and techniques
- Porting existing C++ code
-
- Overview of the porting process
-
- Compile and test the code on Windows 8
- Identify unsupported library functions
- Use functions from the Window Runtime API reference
- Replace synchronous library functions with async versions
- Convert long running operations in your code to async versions
- Validate the package with the Windows App Certification Kit
- Overview of supported functions
- Porting guidance
-
- Port all existing code, including libraries
- Link to static libraries or import libraries as usual
- Use C++/CX or WRL if your library needs to invoke Winrt functions
- Use reg-free COM for activation
- Convert to Windows Runtime types when marshaling cost is an issue
- Decide between using wrapper code and converting existing code
- For more info about porting
-
Async programming patterns and tips in Hilo (Windows Store apps using C++ and XAML)
- Ways to use the continuation chain pattern
-
- Value-based and task-based continuations
- Unwrapped tasks
- Allowing continuation chains to be externally canceled
- Other ways of signaling cancellation
- Canceling asynchronous operations that are wrapped by tasks
- Using task-based continuations for exception handling
- Assembling the outputs of multiple continuations
- Using nested continuations for conditional logic
- Showing progress from an asynchronous operation
- Creating background tasks with create_async for interop scenarios
- Dispatching functions to the main thread
- Using the Asynchronous Agents Library
- Tips for async programming in Windows Store apps using C++
-
- Don't program with threads directly
- Use "Async" in the name of your async functions
- Wrap all asynchronous operations of the Windows Runtime with PPL tasks
- Return PPL tasks from internal async functions within your app
- Return IAsyncInfo-derived interfaces from public async methods of public ref classes
- Use public ref classes only for interop
- Use modern, standard C++, including the std namespace
- Use task cancellation consistently
- Handle task exceptions using a task-based continuation
- Handle exceptions locally when using the when_all function
- Call view model objects only from the main thread
- Use background threads whenever possible
- Don't call blocking operations from the main thread
- Don't call task::wait from the main thread
- Be aware of special context rules for continuations of tasks that wrap async objects
- Be aware of special context rules for the create_async function
- Be aware of app container requirements for parallel programming
- Use explicit capture for lambda expressions
- Don't create circular references between ref classes and lambda expressions
- Don't use unnecessary synchronization
- Don't make concurrency too fine-grained
- Watch out for interactions between cancellation and exception handling
- Use parallel patterns
- Be aware of special testing requirements for asynchronous operations
- Use finite state machines to manage interleaved operations
- Working with tiles and the splash screen in Hilo (Windows Store apps using C++ and XAML)
-
Using the Model-View-ViewModel (MVVM) pattern in Hilo (Windows Store apps using C++ and XAML)
- What is MVVM?
- MVVM in Hilo
- Why use MVVM for Hilo?
- For more info
- Variations of the MVVM pattern
- Tips for designing Windows Store apps using MVVM
-
- Keep view dependencies out of the view model
- Centralize data conversions in the view model or a conversion layer
- Expose operational modes in the view model
- Ensure that view models have the Bindable attribute
- Ensure that view models implement the INotifyProperyChanged interface for data binding to work
- Keep views and view models independent
- Use asynchronous programming techniques to keep the UI responsive
- Always observe threading rules for Windows Runtime objects
- Using the Repository pattern in Hilo (Windows Store apps using C++ and XAML)
- Creating and navigating between pages in Hilo (Windows Store apps using C++ and XAML)
- Using controls in Hilo (Windows Store apps using C++ and XAML)
- Using touch in Hilo (Windows Store apps using C++ and XAML)
- Handling suspend, resume, and activation in Hilo (Windows Store apps using C++ and XAML)
-
Improving performance in Hilo (Windows Store apps using C++ and XAML)
- Improving performance with app profiling
- Performance tips
-
- Keep the launch times of your app fast
- Emphasize responsiveness in your apps by using asynchronous API calls on the UI thread
- Use thumbnails for quick rendering
- Prefetch thumbnails
- Trim resource dictionaries
- Optimize the element count
- Use independent animations
- Use parallel patterns for heavy computations
- Be aware of the overhead for type conversion
- Use techniques that minimize marshaling costs
- Keep your app's memory usage low when suspended
- Minimize the amount of resources your app uses by breaking down intensive processing into smaller operations
-
Testing and deploying Hilo (Windows Store apps using C++ and XAML)
- Modes of testing
- Using the Visual Studio unit testing framework
- Using Visual Studio to test suspend/resume
- Using the simulator and remote debugger to test devices
- Using pseudo-localized versions for testing
- Security testing
- Using WinDbg for debugging
- Using the Visual C++ compiler for testing
- Making your app world ready
- Testing your app with the Windows App Certification Kit
- Creating a Windows Store certification checklist
- Meet the Hilo team (C++ and XAML)
- Performing interop between XAML and DirectX
Show:


