Fun is... using the same code on three different platforms. XAMLFinance shows us how.
- Posted: Oct 05, 2011 at 6:00 AM
- 11,038 Views
- 3 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Today's project provides one example of how you can target three different platforms, Windows Phone 7, Web/Silverlight and Windows Desktop/WPF while sharing much of the same for all three, while taking advantages of the features each platform provides.
This article describes the development of XAML Finance, a cross-platform application which works on the desktop, using Windows Presentation Foundation (WPF), on the web, using Silverlight and on Windows Phone 7 (WP7). My aim in writing this article is to highlight how the XAML based technologies used for desktop, web and mobile allow you to share large quantities of code and cost-effectively distribute your application on a range of devices.
- Introduction – Why cross-platform?
- Cross-platform XAML development
- Cross-platform, a Practical Approach
- WPF / Silverlight Framework Differences
- Broad differences
- API level differences
- Resolution Techniques
- Conditional compilation (#if)
- Partial classes
- Design Patterns
- Missing Framework Features
- Missing Controls
- Common pitfalls
- The Unexpected
- Adapting to each Platform
- XAML Finance
- DataSource Library
- XAML Finance Application
- The MVVM pattern
- Adapting for the web
- Adapting for the desktop
- Adapting for Windows Phone 7
What I also liked about the project was how it compared and contrasted the features available in the different forms of XAML.
And how these differences were dealt with;
Here's a snap of the WPF Solution;
This clip provides an example of how the code is shared between the different projects (Note the linked/shortcut icon on some of the files)
And all the above only lightly touches on the project's content.
If you're thinking about cross platform development, or just interested in a cool Silverlight, WPF or Windows Phone 7 app, this project might be just what you are looking for...