Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Porting an iPhone Application to Windows Phone 7 : Page 2

There are many things with Windows Phone 7 that an iOS developer will find familiar and be comfortable with, but a few things have a learning curve.


advertisement

The Difficult or Not So Clear Things

This is a list of things that aren’t as simple as the first list. Differences in hardware, operating systems, and API are the contributing factor to getting an item in this list.

Data storage



Unlike previous versions of Windows Mobile operating systems, Windows Phone 7 currently does not have an API for a client-side database which developers can use.

What is provided is access to isolated data storage where your application can save settings or files. Here you can roll your own data storage mechanism or use a third party database with the caveat that an application can only access its own data. This is very similar to those familiar with iPhone development and is another break away from previous versions of Windows Mobile operating systems.

A resource video for developing occasionally connected applications can be found here: http://www.msteched.com/2010/NorthAmerica/WPH306

Page Transitions

While the navigation between pages in the Windows Phone 7 environment is similar to iPhone, the familiar animation transitions are not left up to the developer to implement.

Built-in screen transitions and animations are system-reserved and developers cannot access them but may mimic them. If developers want to implement transitions or animations within their application, they must use Silverlight or the XNA Framework to create them (see page 64 of the UI Design guide).

Transitions within your application must be implemented on your own.

Contrary to the iPhone, there currently isn’t a defined standard for the types of transitions one should use.

A Channel9 video of implementation can be seen here: http://channel9.msdn.com/posts/SlickThought/Simplify-Page-Transitions-in-Windows-Phone-7-Silverlight-Applications/

Windows Phone 7 Has Themes

There is a large selection of highlight colors including light and dark for background colors.

One must be aware that the user could have any one of those themes set for their phone. The application should be aware of the settings and use them throughout the user experience.

Background images and UI elements presented above them should take in to account the possibility of the different themes. For example, if you use a particularly dark image for a background, the light theme with black button borders may not show up very well against the image. Setting the opacity of the image to show some of the white background is one solution to this problem.

Digging Deeper

The following are some examples that we used in our Applications.  We chose these examples because we felt that they are things that aren’t obvious to most developers and take some research to get a solution.  We also feel that they are things that pretty much any application for the phone would need. In our samples, we try to find a simple solution to the problems while providing the best user experience.

Porting the Data Model

The following is simple port of a small class from objective-c to c#.  This would be part of a class that would represent the data behind user interface elements.  It could be created in several different ways, like being fetched from storage, an external api, or generated by the application at runtime.

Person.h

@interface Person : NSObject { } @property (nonatomic, retain) NSString *firstName; @property (nonatomic, retain) NSString *lastName; @property (nonatomic, retain) NSString *office; @end

Person.m

#import "Person.h" @implementation Person @synthesize firstName; @synthesize lastName; @synthesize office; -(void)dealloc { [firstName release]; [lastName release]; [office release]; [super dealloc]; } @end



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap