使用本机 API 或 J2ME 开发黑莓应用程序? [英] Develop Blackberry apps using native API or J2ME?

查看:19
本文介绍了使用本机 API 或 J2ME 开发黑莓应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将要构建一个 Blackberry 应用程序,但希望就是否使用 J2ME(基于 MIDlet)或 Blackberry 本机(UIApplication)来实现提供一些意见.

We're about to build a Blackberry application but would love some input on whether to implement using J2ME (MIDlet based) or Blackberry native (UIApplication).

我理解一些权衡.如果我们想将应用程序移植到其他设备,J2ME 会更加灵活.RIM 对黑莓原生的支持更好.

I understand some of the tradeoffs. J2ME will be more flexible if we want to port the app to other devices. RIM has better support for Blackberry native.

不过,我仍然缺乏信息的地方是在 UI 方面.我们想要构建一个具有出色用户体验的应用程序,并且看起来像 BB 用户习惯的其他应用程序.如果我们走 J2ME 路线,我们可以这样做吗?

The place I'm still lacking information, though, is on the UI side. We want to build an app that has a great user experience, and one that looks like other apps BB users are accustomed to. Can we do this if we go the J2ME route?

对于这个问题有点主观且技术性较低,我们深表歉意.

Apologies for the somewhat subjective and less technical nature of the question.

推荐答案

我已经尝试了两种方法 - 构建一个纯 MIDP 应用程序以在 BlackBerry 和非 BLackBerry 平台上运行,并构建一个单独的 BlackBerry 应用程序(通常使用大部分与 MIDP 应用程序相同的业务逻辑和网络代码).绝对走黑莓原生路线.

I've tried it both ways - building a pure MIDP app to run on BlackBerry and non-BLackBerry platforms and building a separate BlackBerry app (often using much of the same business-logic and networking code as the MIDP app). Definitely go the BlackBerry native route.

这都是关于 BB UI 类的.它们将使您能够(除其他外)响应不同类型的菜单事件(轨迹球和菜单键),响应 BB 特定的键代码,如果您对 Storm 感兴趣,请利用方向传感器和触摸支持.此外,它们是一组更丰富的 UI 元素.您可以在纯 MIDP 中构建很多(但不是全部)他们所做的事情,但最终会为每个平台自定义太多内容,以至于您最终不会保存任何内容.从 BB UI 开始并进行自定义可节省大量时间和精力.

It's all about the BB UI classes. They'll give you the ability to (among other things) respond to the different type of menu events (trackball and menu key), respond to BB specific key codes, if you're interested in the Storm take advantage of the orientation sensor and touch support. Plus they're a much richer set of UI elements to work with. You can build up a lot (but not all) of what they do in pure MIDP, but end up customizing so much of it for each platform that you won't save anything in the end. Starting with the BB UI and customizing saves a lot of time and effort.

即使在游戏应用程序中,或者对于您自定义绘制所有组件的应用程序,您也可以更好地访问 BlackBerry 图形 API,并通过 BlackBerry 本机应用程序路线获得更好的性能.而且您仍然有关于输入事件的更详细信息.

Even in gaming applications, or for applications where you're custom drawing all your components, you have better access to the BlackBerry graphics APIs and get better performance going the BlackBerry native app route. And you still have better detail about input events.

最后,您可以使用 BlackBerry 本机应用程序执行一些不错的生命周期事情,例如推送到后台,或在系统启动时自动运行,而 MIDlet 则无法执行这些操作,这取决于您的应用程序.

Finally there are some nice lifecycle things you can do with BlackBerry native apps, like pushing to the background, or auto-running on system startup that you can't do with MIDlets, which may be of interest depending on your application.

还要考虑市场 - 如果您计划立即支持 BlackBerry,然后可能支持其他 MIDP 平台,那么在您的初始平台上执行最佳计划通常是更好的计划.如果您没有先在 BlackBerry 上成功,那么以后可能没有太多理由移植到 MIDP.

Also think about market - if you're planning on supporting BlackBerry right away, and then maybe other MIDP platforms down the road, it's usually a better plan to execute the best you can on your initial platform. There probably won't be much of a reason to port to MIDP later if you don't succeed on BlackBerry first.

这篇关于使用本机 API 或 J2ME 开发黑莓应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆