开发者

How do I create an application that works on both the Windows 7 Phone and IPhone?

开发者 https://www.devze.com 2023-01-17 17:30 出处:网络
It is clear that Mono Touch is part of the solution as it allows C# code to run on the IPhone, however Mono Touch wraps the IPhone API so does not provide a common API.

It is clear that Mono Touch is part of the solution as it allows C# code to run on the IPhone, however Mono Touch wraps the IPhone API so does not provide a common API.

Another option would be a jave-script tool开发者_高级运维kit that work on both and provided on-line data storage.

However what real life experience do people have?


It is possible to share code between your Monotouch iPhone application and Silverlight Windows Phone 7 application. Craig Dunn, an expert on Monotouch discusses this in his recent post - MonoTouch meets Windows Phone 7


Mobile platforms are far from being versatile and act in singularity, Chances are high they'll end up with holistic war much like browsers of today. If I were you, then I'd straight away take a decision to write two separate apps. Even if you get to write some apps using Mono, tomorrow you'll surely have issues with features compatibility commonly or distinctively supported on both phone platforms.

Bottom line is if you wish to leverage from the platform stick to the native platform SDK and tools.


Have a look at http://www.phonegap.com/.

Support for Windows Phone 7 is coming ;)


MonoCross is a Model-View-Controller system that sits on top of MonoTouch, MonoDroid and SilverLight. So letting more of the UI logic be in common.


A web application, maybe ?

Something made with RoR or Django, with no flash nor silverlight.


There are several options here:

1) Design a platform abstraction layer so you can write your code to the PAL and the PAL on each platform does the right thing. The problem with this is the PAL will resemble the lowest-common-denominator unless you're happy to stub-out the functions that don't do anything on the platforms that don't support them. Your common application logic can then be written in whatever is appropriate - probly C++.

2) Create your common code in something like C++ and your platform-specific code in the platform-specific framework (.NET / Obj-C). This allows you to have your common application logic as a Library which the platform-specific code pulls in.

3) A hybrid of (1) and (2) using #ifdef/#endif pairs to pull in relevant parts. I don't recommend this - it's painful.

4) Write the code for each platform completely independently and share the design, algorithms and digital assets (bitmaps, icons, sounds, etc). Yes, more to maintain but gives you best experience on each platform.

5) A web application as OMG_Peanuts suggested. This is a quick win but little-or-no platform-specific features.

0

精彩评论

暂无评论...
验证码 换一张
取 消