The //build/ conference was last week and one of the many sessions was about tips for building a Windows Store app using XAML and C++. Specifically, this session was about the tips that we learnt while developing the Hilo app.
The main things we learnt, which are discussed in the video, are:
- Use smart pointers, stack semantics & RAII pattern.
- Use public ref classes only for interop.
- Don’t create circular references between ref classes and lambda expressions.
- Use explicit capture for lambda expressions.
- Use task cancellation consistently.
- Be aware of context rules for continuations of tasks.
- Use the LayoutAwarePage class to provide navigation, state management, and view management.
- Support visual state for landscape, portrait, fill and snap.
- Use asynchronous programming techniques to keep the UI responsive.
- Use the BindableBase class to provide support for MVVM.
- Use MVVM to build an interop layer between XAML and your models.
- Separate resources for each locale.
- Use the Calendar class to support world calendars.
- Save application data when the app is being suspended.
- When the app resumes after termination, use the saved app data to restore the app state.
- Release exclusive resources when the app is being suspended.
- Ensure your controls for tap and hold appears above the touch point.
- Use the standard touch gestures and controls that Windows 8 provides.
- Use the Windows Runtime to create image thumbnails for tiles.
- Ensure queries prefetch properties to improve performance.
- Keep the launch times of your app fast.
For more information about these tips, see the Hilo guidance.
No comments:
Post a comment