开发现代J2ME应用程序的最佳方法是什么? [英] What's the best way to go about developing a modern J2ME app?

查看:112
本文介绍了开发现代J2ME应用程序的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直很困惑决定如何继续设计J2ME应用程序的UI。基本上我已经完成了算法,函数和数据库的工作,但是我很难为它提供一个好的UI。我有两个想法:

I've been so confused deciding on how to proceed about designing the UI of a J2ME app. Basically I have finished working on the algorithms, functions and database but I'm having trouble bringing out a good UI for it. I had two ideas:


  1. 使它成为一个j2me应用程序,可以轻松帮助我利用网络压缩技术快速便宜的互联网可访问性(核心需求)。

  1. Make it a j2me app that will easily help me to leverage web compression technologies for fast and cheap internet accessibility (A core desirability).

使其成为一个Web应用程序并使其成为一种只加载在线应用程序的浏览器应用程序。这个选项显然很容易不用担心升级和UI功能,但互联网成本和速度是限制因素。

Make it a web app and make it a sort of browser app that will just load the online app. This option obviously makes it easy not to worry so much about upgrades and UI capabilities but however the internet cost and speed are limiting factors.

我正在尝试使用第一个选项,我的第一个方式是LWUIT,但沿着线路变得沉重,我甚至无法调试应用程序,更不用在小型手机上部署它。事实上,在线搜索使问题变得更糟。似乎对J2ME应用程序的兴趣急剧下降,而且大多数 talk 关于它已经过时了。事实上,很多人都问我同样的问题,我在网上看到了非常吸引人的J2ME应用,但我似乎无法弄清楚他们的'秘密'

I'm trying to go with the first option and the first way I headed was LWUIT but along the line it became to heavy and I had trouble even debugging the app much less deploying it on a small phone. In fact, searching online made the problem worse. It seemed that interest in J2ME apps had reduced drastically and most talk about it is outdated. In fact, many people do ask me the same question, I see very visually appealing J2ME apps online but I can't seem to figure out their 'secret'.

SO
我想听一下开发漂亮的 J2ME应用的人吗? 开发一款外观漂亮的应用程序的最佳方法是什么? 具体我希望链接到有用的工具和文章。谢谢!!

SO I would like to hear from someone who has developed a good looking J2ME app? What's the best way to go about developing a small good looking app? Specifically I'd like links to useful tools and articles on this. Thanks!!

经过长时间的思考和研究如何最好地开发标准现代 J2ME应用程序,它恍然大悟在我看来,最好的选择是一个统一的平台,也许能够让我轻松地将HTML5应用程序移植到J2ME。到目前为止,我的搜索一直是徒劳的。我发现的唯一有趣的事情是 CodeNameOne Java的Avatar One 。然而,CodeNameOne并没有真正提供我正在寻找的解决方案,而Oracle现在仍然非常忙于使用Avatar One 一年多。我想知道我是否遗漏了什么。看过开源LWUIT 的功能后,我认为开发HTML5并不太难渲染器,有助于将基于HTML5的应用程序移植到J2ME,同时充分了解HTML5。 那么我缺少什么?我可以参与任何正在进行的开源项目吗?

After a long thinking and research on how best to develop a standard modern J2ME app, it dawned on me that the best option would be a unified platform, perhaps something that will enable me easily port HTML5 apps to J2ME. My search so far however has been in vain. The only interesting things I have discovered are CodeNameOne and Java's Avatar One. However CodeNameOne doesn't really offer the solution I was looking for while Oracle seems to be still deeply busy with Avatar One for more than a year now. I would like to know whether I'm missing something. Having seen the capabilities of the open source LWUIT, I think it won't be too difficult to develop a HTML5 renderer that will help port a HTML5 based app to J2ME with a good understanding of HTML5. So is there something I'm missing? Any ongoing opensource projects I can be part of or something?

谢谢!

推荐答案

在完成了我之前的建议之后,我不一定推荐它,但你问过。

Having gone through what I am suggesting here before, I don't necessarily recommend it but you asked.

如果你想要一个看起来像是用LWUIT开发但是在一个较小的jar文件中并且更容易为你调试的应用程序,一种解决方案是从基本的几何形状和绘制的图像开发GUI在LCDUI上 Canvas

If you want an application that looks as good as if it were developed with LWUIT but in a smaller jar file and that is easier to debug for you, one solution is to develop the GUI from basic geometrical shapes and images drawn on a LCDUI Canvas.

为了实现这3个目标,您将牺牲可扩展性和开发时间。

You will be sacrificing scalability and development time in order to achieve those 3 goals.

GUI将变得更容易为您调试,因为您将在编写代码时学习代码而不必学习LWUIT。

The GUI will become easier to debug for you because you will learn the code as you write it instead of having to learn LWUIT.

你要么花时间提早设计你的GUI引擎,要么以后更多时间重写代码。

You will either spend time designing your GUI engine early or even more time rewriting code later.

将应用程序移植到不同的屏幕尺寸需要m比你使用LWUIT还要好。

Porting the application to a different screen size will require more work than if you used LWUIT.

如果有人在你的代码上工作,你将不得不教他们如何运作。

If somebody else works on your code, you will have to teach them how it works.

任何GUI修改都可能意味着必须更新底层代码以添加或删除组件。

Any GUI modification might mean having to update the underlying code to add or remove components.

GUI的功能越少,应用程序jar就越小。您最终可能会放弃面向对象编程的一些好处,只是为了减小应用程序的大小。

The less versatile your GUI is, the smaller the application jar. You may end up giving up some of the benefits of Object Oriented Programming just to reduce the size of the application.

As就现代方法而言,JavaME并不真正适用于测试驱动开发方法,但有一种方法可以对其进行近似,这可能会带来一些好处。

As far as modern approaches go, JavaME doesn't really lend itself to a Test Driven Development methodology but there is a way to approximate it that could have some benefits.

写很多微小的测试MIDlets。它们中的每一个都具有最多一个可能的用户交互。它们都共享您的算法,多线程,存储,网络的通用引擎代码...

Write many tiny test MIDlets. Each of them with a maximum of one possible user interaction. They all share common engine code for your algorithms, multi-threading, storage, networking...

公共代码将用于最终产品。

The common code will be used in the final product.

完成所有单元测试后,开始组合它们。每个组合只是测试两组较小功能之间的相互作用。

Once you have all you "unit tests", start combining them. each combination is only about testing the interactions between 2 smaller sets of functionality.

制作一个更大的MIDlet金字塔,并沿途测试它们。

Make a pyramid of ever bigger MIDlets and test them along the way.

金字塔的顶部是你想要一直生产的MIDlet。

The top of the pyramid is the MIDlet you wanted to produce all along.

不幸的是,大多数JavaME测试都是手动完成的。

Most of JavaME testing is unfortunately done manually.

有两种方法可以对MIDlet执行一些自动化测试。

There are 2 ways of performing some automated testing for MIDlets.


  • 使用Keynote Device Anywhere脚本工具。设置这项服务非常耗时,并且使用该服务并非免费,但测试的运行情况与现实世界相近,无需购买手机及其SIM卡即可。

  • Use Keynote Device Anywhere scripting tools. Setting this up will be time consuming and using the service is not free but the tests are run as close to real world conditions as you can get without buying the phones and their SIMs.

使用Microemulator的源代码并对其进行修改,以便自动运行测试MIDlet并报告测试结果,可能是Jenkins实例的一部分。根据您的需要调整微型计算机可能不是一项简单的开发任务,您需要先测试新的自动化系统,然后才能在MIDlet上运行第一次测试。

Use the source code of Microemulator and modify it in order to automatically run your test MIDlets and report the results of the tests, presumably as part of a Jenkins instance. Adapting Microemulator to your needs will probably not be a trivial development task and you will need to test your new automated system before you can run the first test on your MIDlets.

这篇关于开发现代J2ME应用程序的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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