What is the best way to develop a modern J2ME application?

I was so confused when deciding how to start developing the user interface of the J2ME application. Mostly I ended up working on algorithms, functions, and a database, but I had problems creating a good user interface. I had two ideas:

  • Make this a j2me application that will easily help me use web compression technologies for fast and cheap Internet access (basic desirability).

  • Make this a web application and make it a kind of browser that just downloads the online application. This option, obviously, allows you not to worry about updates and features of the user interface, however, the cost and speed of the Internet are limiting factors.

I am trying to move to the first option, and the first method I headed was LWUIT, but along the line it became difficult, and I even had problems debugging the application, and even more so deploying it on a small phone. In fact, an Internet search has complicated the problem. It seemed that interest in J2ME applications has fallen sharply, and most of them say this is outdated. In fact, many people ask me the same question, I see very attractive J2ME applications on the Internet, but I can not understand their "secret".

SO I would like to hear from someone who has developed a good J2ME application? What is the best way to develop a small, handy application? In particular, I need links to useful tools and articles about this. Thanks!!


EDIT: CURRENT DEVELOPMENTS ...

After much thought and research on how best to develop a standard modern J2ME application , I realized that the best option would be a unified platform, perhaps something that will allow me to easily port HTML5 applications to J2ME. My searches have so far been in vain. The only interesting things I've discovered are CodeNameOne and Java Avatar One . However, CodeNameOne does not really offer the solution I was looking for, while Oracle seems to be still deeply occupied by Avatar One for over a year now. I would like to know if I am missing something. Having seen the open source LWUIT capabilities, I think it will not be too difficult to develop an HTML5 renderer that will help port an HTML5 based J2ME application with a good understanding of HTML5. So am I missing something? Any ongoing open source projects Can I be a part or something else?

Thanks!

+4
source share
2 answers

After going through what I offer here earlier, I do not necessarily recommend it, but you asked.


If you want the application to look as good as if it were developed using LWUIT, but in a smaller jar file and which is easier to debug for you, one solution is to develop a graphical user interface from basic geometric shapes and images, LCDUI Canvas

You will sacrifice scalability and development time to achieve these 3 goals.

The GUI will be easier to debug for you because you will learn the code when you write, instead of learning LWUIT.

You will either spend time developing your GUI earlier, or even more time rewriting the code later.

Porting an application to a different screen size will require more work than using LWUIT.

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

Any modification to the GUI may mean that the base code needs to be updated to add or remove components.

The smaller the universal GUI, the smaller the application. You may want to discard some of the benefits of object-oriented programming to reduce the size of the application.


Regarding modern approaches, JavaME really does not lend itself to the Driven Development testing methodology, but there is a way to approach it, which may have some advantages.

Write a lot of tiny test midlets. Each of them has a maximum of one possible user interaction. They all have a common engine code for your algorithms, multithreading, storage, networking ...

Generic code will be used in the final product.

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

Make a pyramid of an increasing number of midlets and test them along the way.

The top of the pyramid is the midlet you wanted to create all the time.


Most JavaME tests, unfortunately, are performed manually.

There are two ways to perform automated MIDlet testing.

  • Use the Keynote Device Anywhere scripting tools. Setting this time will require a lot of time, and the use of the service is not free, but the tests are performed as close as possible to real-world conditions, as you can get without buying phones and their SIM cards.

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

+3
source

Finally, I decided to write a mobile web application with HTML5. With HTML5 cache enabled, you can design for most mobile phones, but the built-in features are sacrificed. In the future, I plan to develop another application for each type of mobile OS, if nothing changes.

0
source

Source: https://habr.com/ru/post/1383758/


All Articles