Overview:

Being an offshore software development company specializing in various application developments including custom mobile application development services, our team has been analyzing the possibilities of multi targeting for both Windows Phone 8 Apps and Windows 8 Store Apps using C#. The objective behind the analysis is to explore the possibilities of managing the source code for Windows Phone 8 Apps and Windows 8 Store Apps in one solution for the easy management of the same, as well as identify the possibilities for source code reuse wherever applicable.

Following are the potential areas for code reuse that have been analyzed by our team:

1. Have a generic model component built using portable class libraries so that they can be reused in different platforms.
2. Have a generic ViewModel component built using portable class libraries so that they can be reused in different platforms.
3. Have a project for Localization built using portable class libraries so that they can be reused in different platforms.
4. Have a project for Rest API consumption built using portable class libraries so that they can be reused in different platforms.
5. Have a project for SQLite consumption built using portable class libraries so that they can be reused in different platforms.

Model component:

Our approach to reuse the model components using portable class library was successful. One portable class library holds the business entities/models components required for Windows Phone 8, Windows 8 Store App and web API applications.

ViewModel component:

We verified the possibility of reusing the ViewModel components using a portable class library. Though the components could be reused, there were certain limitations and modifications required to be made to make the component reusable. Based on our analysis, we found that though we can reuse ViewModel, it is recommended to have a separate ViewModel for each type of application.

Localization:

We tried to reuse the resource files using portable class library. Reuse of the same resource files for different projects could not be achieved as the file type differs for Windows Store App (resw file extension).

Repository component consuming Rest API:

We successfully consumed Rest API from a portable class library. This portable class library is used as domain repository project in Windows 8 Store App, Windows Phone 8 and web API application.

SQLite component:

SQLite API components could not be reused as the API for SQLite varies for both the devices. So in our applications we used different SQLite APIs for different device type. Though we were unable to reuse SQLite component using portable libraries, we could have the SQLite projects in one solution.

References:

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj244365(v=vs.105).aspx

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681693(v=vs.105).aspx

http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj714086(v=vs.105).aspx

Tags: .Net Development | Comments Off

previous post: Extracting Data from Multiple Excel sheet using Multiple Tags next post: Viewing Documents from One Responsibility Center

Comments are closed.

Archives

2016
2015
2014
2013
2012
Congruent Facebook Twitter Slideshare