问题描述
这个问题特别与推荐的架构和人们以前分别使用 C#、Monotouch 和 Monodroid 开发的跨平台 WP7、iOS、Android 应用程序的经验有关.我研究了以前的问题
MonoCross (ITR Mobility) 的作者为各种客户创建了多个移动跨平台解决方案,并撰写了两本关于主题的书,其中一本是企业中的 iPad".(
使用此模型设计应用程序的最大好处是您可以在每个平台上使用本机用户界面运行相同的应用程序.您可以获得本机 iOS、Android、Windows 用户界面,它们甚至还有一个 ASP.NET 前端,可让您发布相同业务逻辑的 Web 版本.
Apple 在 iPad 业务中展示的 Medtronic 示例应用成功使用了这项技术:
http://www.apple.com/ipad/business/profiles/medtronic/
我建议您也查看 Scott 的博客,在那里他定期发布关于他在跨平台架构方面的经验.
I have a requirement to develop a cross-platform iPhone/iPad, WP7 and android app for a health & fitness company, which will integrate with their website. The app requires a small amount of local data storage for offline mode and synchronisation with the website when a network is available. I am a Windows (C#/C++) developer through and through and don't really want to go down the route of three Objective C, Java and C# apps, although I will if I have to. I will also be operating as tech lead and farming out some work to a team on this project.
I would like to know if anyone here has experience with cross-platform development using Monotouch, Monodroid and WP7 and to share their experience on application architecture to re-use as much code as possible. The architecture I am considering is as follows:
- Has anyone here tried something like this?
- Are these frameworks (Monotouch, monodroid) worth their salt for this sort of work?
- Can I setup the entire project in Visual Studio 2010 with separate projects (dlls/exe) for the Monotouch, Monodroid and Wp7 target (but shared code using 'Add as Link')?
- What sort of code-reuse can I realistically expect with this (or a similar) architecture? i.e. what strategies/patterns can I use to re-use local data access, webservices, and business logic?
You might want to look into the MonoCross project which is designed to help you reuse C# code with multiple presentation layers:
http://code.google.com/p/monocross/
The authors of MonoCross (ITR Mobility) have created multiple mobile cross platform solutions for a variety of customers and have written two books on the subject one is "iPad in the Enterprise" (http://amzn.to/zAhQK6) and the upcoming "Cross-Platform Mobile Development with C#" (http://amzn.to/wM6RsF).
In the meantime, you can watch Scott Olson's presentation that he did at Monospace 2011 that describes how to use MonoCross to target multiple mobile and desktop platforms at once reusing the business logic:
http://www.infoq.com/presentations/The-Rise-of-Mono-in-the-Enterprise
They enforce a strict MVC split in their code:
The biggest benefit of designing an application with this model is that you can run the same application with native user interfaces on each platform. You get native iOS, Android, Windows UI and they even have an ASP.NET front-end that allows you to publish Web versions of the same business logic.
This technology was used successfully by the Medtronic sample app that is showcased by Apple in their iPad business:
http://www.apple.com/ipad/business/profiles/medtronic/
I suggest you also check out Scott's blog where he posts regularly about his experiences with cross-platform architecture.
这篇关于任何有跨平台 WP7 Android iOS 移动开发架构经验的人(monotouch、monodroid、C#)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!