Nine major points of attention in development of J2ME mobile phone program

Source: Internet
Author: User
Tags exception handling file size interface thread
Program

Java Basics needed in J2ME

Now a lot of people, are starting from zero to learn j2me, learning J2ME, always from the Java Foundation to learn, and now speak Java based books are based on J2SE, which caused some unnecessary trouble learning, The following is a simple description of the Java basics that are used in J2ME and that are not needed.

Java basics to use in J2ME:

1. Java Syntax basics: including basic data types, keywords, operators, and so on

2. Object-oriented thinking: Concepts of classes and objects, inheritance and polymorphism, and so on.

3. Exception Handling

4, multithreading

Java basics not used in J2ME:

1. Use of Javac and Java commands in JDK

2, many of the classes in the Java Foundation are not in J2ME, or the methods in the class do a lot of streamlining. Therefore, it is recommended to be familiar with class libraries in J2ME.

3, applets, AWT, swing these knowledge in the J2ME is not used.

Simply say so much, hope to learn J2ME friends can take a few detours, the shortcomings of the hope that we will actively correct and add.

Second, temporarily unable to complete the function in the J2ME

Some of the J2ME in the temporary function can not be completed, I hope you can actively add:

1, in the mobile phone does not change the code to implement the transplant, mainly refers to the game.

2, dynamically modify the button text.

3. Accept Chinese input on canvas.

4, the operation of local resources, such as address Book, received messages and so on.

5, the production of destructive mobile phone virus.

6, other waiting for everyone to add.

Three, J2ME of the cross-platform nature

J2ME technology originated in Java, so it also has the advantage of the JVM, can be on the Java-enabled platform for porting, but now the J2ME technology on the Cross-platform is bad, let's take a quick look at the reason:

1, mobile phone screen size is different:

This is mainly in the interface production. If you are using the advanced user interface, such as you do is the application development or user login, user registration, such as general functions, generally no problem.

If you're using a low-level user interface, like you're playing a game, then you need to think about it.

2, the vendor's expansion API is not uniform:

Nokia's extended API Class Library UI series, for example, is not implemented on other phones, or has a different package name and so on.

3, the mobile phone platform to achieve the bug:

For example, Nokia 7650 has bugs in implementing double buffering, so software running on this model cannot use double buffering. Some of the other bugs on Nokia are as follows: http://blog.csdn.net/Mailbomb/archive/2005/03/24/329123.aspx

4, mobile phone performance problems.

The available memory for different handsets, the largest jar files are required, such as Nokia S40 most mobile phone support for the largest jar file is 64K, the maximum available content is 210K.

So now the mobile phone software, especially the game is to provide support for the list of models, but also the existence of mobile game transplant personnel.

Iv. learning the types of work that J2ME can engage in

Now J2ME technology can be said to be quite hot, here are some learn the J2ME can be engaged after the kind of work:

1, J2ME Game developers

According to the game planning or documentation requirements, in a specific model (Nokia S40 or S60 majority) to develop the game program. This is the work that most J2ME programmers are doing now.

Need to master: Advanced user interface, low-level user interface, thread, if it is a network game, also need skilled network programming.

2, J2ME application developers

Today's mobile apps are not many, but there are some, especially mobile positioning and mobile business-related content. Need to be proficient: Advanced user interface, threading and network programming.

3, J2ME game transplant personnel

By referencing the source code, games that can be run on one platform are ported to other platforms. For example, porting the Nokia S40 game to S60, or Sony Ericsson's T618 and so on. The main control screen coordinates, some may need to replace some APIs.

Need to be familiar with the differences between the platforms and related technical parameters, such as screen size, maximum jar file size, and so on.

Five Principles of J2ME programming

1, the use of object-oriented programming.

Although you can reduce the size of your files by using process-oriented programming, you will need to use object-oriented programming in order to maintain convenience and scalability later.

2. Use MVC pattern

Separates the model, interface, and control. Many programs now combine the three, but if you do a larger number of programs, it is advisable to separate them.

3, automatic storage user settings

Use RMS to store user information, such as storing user names, passwords, and user preferences for the user's last entry, so as not only to reduce user input, but also to be user-friendly. Many programs even do the automatic landing and so on.

4, some system settings allow users to close. such as background music, background light display.

5, the low-level user interface to draw the action in a separate thread inside.

6, in need of a lot of time to complete the work, give the user a waiting interface.

[1] [2] Next page



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.