Java ME Best Practices
Applying best practices is an essential part of the development process.
There is so much to be considered here - quality, user experience, testing,
future-proofing, optimizing resource usage, and so on. Clearly, there is
no single script we can follow to write an application. Nor is there a
definite set of rules.
We can, however, propose some common practices and API usage
patterns. First, we explore how to improve the user experience. Second,
we delve a level deeper and explore some practical Java ME patterns,
including for resource usage. Then, we offer some ideas for streamlining
the deployment and lifecycle of the ultimate MIDlet. Finally, we look at
general guidelines for developing on Symbian OS.
9.1 Investing in the User Experience
The user experience is paramount in a Java ME application, as in any
other user-facing environment. You'll have noticed discussions about the
user experience throughout the topic - and the reason is, clearly, that we
all write software for the end user, even though that is often lost in the
'noise' of software development.
Getting the user experience right requires deliberate investment. One
approach is defining key use cases in advance and making sure they
are easy to access and perform well. Not all applications are use-case
driven, however. In this case, we can occasionally put on our 'user'
hat - assume the role of the application user - and see how we can
improve the application. The two approaches can also be combined and
help identify and eliminate usability problems - overly complex menus,
unresponsiveness, error handling, and so on.