开发分布式 iPhone / iPad 应用程序的框架推荐

发布于 2024-09-19 12:11:58 字数 1392 浏览 5 评论 0原文

有没有支持iPhone/iPad的分布式应用框架(商业也可以)?

我在框架中寻找的内容:

  • 允许我专注于应用程序逻辑,
  • 我不必编写“低级”网络编程(我已经完成了太多次,我不想再这样做=p )
  • 应该积极维护(受欢迎就好)

基本上这样我就可以发展得更快。

我们计划开发一个软实时 TCP/IP 客户端/服务器应用程序,其中有许多 iPhone/iPad 客户端 (30+) 通过 LAN 连接到单个服务器。服务器很可能会运行 Windows(除非框架不支持)。

我环顾四周,发现:

我仍在决定是否使用 Objective-C 还是 MonoTouch,但倾向于 MonoTouch,因为我们将获得 .NET 框架,而不是仅限于 Mac 世界。

如果我添加了与我的问题无关的任何内容,请随时发表评论 --- 我是 iPhone/iPad 世界的新手。

Is there a distributed application framework (commercial is okay as well) that supports iPhone / iPad ?

What I'm looking for in the framework:

  • Allows me to focus on the application logic
  • I don't have to code "low-level" network programming (I've done it too many times that I dont wanna do it again =p)
  • Should be actively maintained (popular would be nice)

Basically, I can then develop faster.

We plan to develop a soft real-time TCP/IP client/server application where there are many iPhone/iPad clients (30+) connected to single server over LAN. The server most likely will run Windows (unless the framework does not support it).

I've been looking around and I see:

I'm still deciding whether to use Objective-C or MonoTouch, but leaning towards MonoTouch since we will get the .NET framework, and not be tied into just the Mac world.

Please feel free to comment if I added anything that's not related to my question---I'm new to iPhone/iPad world.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

探春 2024-09-26 12:12:41

您可以使用 Google 协议缓冲区来实现 RPC,但无论如何您都需要进行一些网络编程来传输消息。它支持 C++、Java、Python、Objective-C 和 .NET 的接口生成,因此您可以创建一组 RPC 消息并获取在几乎任何移动平台上使用它们的代码。您必须自己实现移动平台上的传输层。

http://code.google.com/apis/protocolbuffers/ - Protobuf 主页面(C++、Java、Python)
http://code.google.com/p/protobuf-net/ - 评论之一中提到的 Protobuf .NET
http://code.google.com/p/metasyntropic/wiki/ProtocolBuffers - 用于 Obj-C 的 Protobuf

You can use Google protocol buffers to implement RPC though you will need to do some network programming for transporting your messages anyway. It supports interface generation for C++, Java, Python and Objective-C and .NET so you can create a single set of RPC messages and get code for working with them for almost any mobile platform. Transport layer on your mobile platforms you will have to implement yourself.

http:// code.google.com/apis/protocolbuffers/ - main Protobuf page (C++, Java, Python)
http:// code.google.com/p/protobuf-net/ - Protobuf .NET mentioned in one of the comments
http:// code.google.com/p/metasyntactic/wiki/ProtocolBuffers - Protobuf for Obj-C

握住你手 2024-09-26 12:12:37

您可以使用 JSON Touch + Vitche PHP Emission Framework,它提供您需要的所有服务器端。您还可以使用该框架访问现有的 SOAP(WCF、Axis 等)服务。

You can use JSON Touch + Vitche PHP Emission Framework which provides all server-side you need. Also you can use that Framework to access existing SOAP (WCF, Axis, etc) services.

浅听莫相离 2024-09-26 12:12:32

您需要更明确地表达您的要求。如果您只需要通过 REST API 进行对象序列化(脱水/水合),那么任何支持 POX 或 JSON 的东西都适合您。但是,如果您需要 RPC 风格的方法调用,以及身份验证、加密/数字签名、事务等,那么您需要上面列出的框架之一。

如果您需要一个框架,我个人会倾向于 MonoTouch WCF,因为它使您能够稍后将客户端移动到其他平台(例如 Windows Phone 7)。话又说回来,正如你所说,现在有点困难,如果 Mono 团队将来决定他们没有资源来投资维护它,你可能最终不得不迁移到另一个框架。当然,它也有一个缺点,就是你的应用程序需要使用 MonoTouch,而不能使用 Objective-C。当然,随着 iOS 开发者协议最近的变化,这不是什么大问题,但仍然需要牢记。

(免责声明:我曾经在 Microsoft 的 WCF 团队工作,所以我对产品本身有偏见)

我会选择的另一个选择是 Cocoa 分布式对象。然而,如果服务器也在 OS X 上运行,那将是我的选择。我知道 Windows 上有 Bonjour,但我怀疑它是否针对服务器场景进行了优化,而且我也不知道 Apple 的 RPC 实现在其之上有多丰富适用于 Windows 平台。因此,只有当我专门为苹果平台构建时,我才会继续使用苹果的技术。

请注意,WCF 和分布式对象将为您提供 RPC 样式的功能,但它们不会帮助您处理任何特定场景。如果您需要/想要更高级别的抽象,例如您需要状态信息或多用户聊天,您仍然需要自己实现这些。此时可能值得考虑为您提供这些功能的框架。一个例子是 RakNet(您在上面列出的),它抽象了远程处理级别并在其之上构建了附加功能。

You need to be a bit more explicit on your requirements. If you need only object serialization (dehydration/hydration) over REST API, then anything that supports POX or JSON will work just fine for you. However, if you need RPC-style method invocation, with authentication, encryption/digital signature, transactions, etc, then you need one of those frameworks you listed above.

If you need a framework, I personally would lean towards the MonoTouch WCF, as it gives you the ability to move your client to other platforms later as well (Windows Phone 7 for example). Then again, as you said, it's a bit rough right now, and if Mono team decides in the future that they don't have the resources to invest in maintaining it, you might end up with having to move to another framework. Of course, there's also the drawback that you need to use MonoTouch for your application, and can't use Objective-C. Granted, with the recent changes in the iOS Developer Agreement, that's not that much of an issue, but it is still something to keep in mind.

(Disclaimer: I used to work on Microsoft's WCF team, so I am biased towards the product itself)

The other option I would go for, would be Cocoa Distributed Objects. However, that would be my choice if the server is also running on OS X. I know there's Bonjour for Windows, but I doubt it's optimized for server scenarios, and I also don't know how rich is Apple's RPC implementation on top of it for the Windows platform. So I would stay with Apple's technology only if I am building exclusively for Apple's platform.

Note that WCF and Distributed Objects would give you RPC-style functionality, but they won't help you with any particular scenarios. If you need/want even higher level of abstraction, for example you need presence information or multi-user chat, you will still need to implement those yourself. It might be worth at this point to look at frameworks that provide those features for you. An example would be RakNet (which you listed above), which abstracts the remoting level and builds additional features on top of it.

绮筵 2024-09-26 12:12:26

我们使用 WCF/Monotouch 取得了巨大成功 - 有些领域的工作并不是 100%,但在大多数情况下,您应该会发现在 Monotouch 上使用 WCF 是轻而易举的事情。

在 monodroid 和 monotouch 以及 wm7 之间共享所有数据同步、模型、测试等的能力非常酷(通过一些工作 - 这很容易实现 - 您需要管理多个 prj 文件)。

请小心正确管理对 wcf 服务的调用,将它们保持在最低限度,并保持体系结构简单。我们最终得到了一个相当复杂的 dto,以最大限度地减少对 wcf 服务同步数据的调用量 - 这是非常值得的,因为现在从头开始同步设备所需的时间只是原来的一小部分。

使用 SSL 与服务器通信是一个 PITA,但我认为这更多的是苹果管理它的方式。

We've used WCF/Monotouch with great success - there are some areas of the f/work that arent 100% but for most cases you should find working with WCF on monotouch a breeze.

The ability to share all of our data sync, model, tests etc between monodroid and monotouch and wm7 is seriously cool (with some working - this is easilly possible - you'll need to manage multiple prj files).

Be careful to manage calls to wcf services correctly, keep them to a minimum, keep the archetecture simple. We ended up with a fairly complex dto to minimise the amount of calls to the wcf services to sync the data - this was well worth it as the time needed to sync a device from scratch is now a fraction of what it was.

Using SSL to communicate with the server is a PITA but I think that's more a case of the way apple have managed it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文