Java Reference
In-Depth Information
to minimize footprint, even if this means duplicating code. Such practices
can indeed be required for low-end devices but they come at the expense
of quality in areas such as code readability, reuse, extendibility, and
abstraction level.
On high-end platforms, you don't need to fight for every kilobyte in
the JAR by limiting your code abstraction or using the most compressed
media formats even at the expense of the user experience. You can
define interfaces and use abstract classes. You can and should do the
right thing in order not to compromise on quality. This means that you
can fully use generic software engineering best practices and provide an
excellent user experience. If the right thing for your application is to run
an additional thread or open an additional connection, you can do that.
Having a proper code abstraction ensures the quality and extendibility
of your application, without risking not being able to install or run your
application on a Symbian smartphone.
Having said that, even a Symbian smartphone is limited in comparison
to a desktop PC. Early prototyping of your resource utilization is another
good practice that will give you early indication if the application design
should be reworked. For example, if at design time it is known that the
application requires a large amount of run-time memory or a large number
of concurrent threads, then a simple resource utilization prototype that
takes five minutes to write will assure you that this resource utilization is
9.5 Summary
In this chapter, we have covered various Java ME best practices. We
explored techniques to ensure a good user experience, and some practical
Java ME patterns and resource usage. We discussed deployment and the
execution lifecycle and finished with guidelines that are specific to
Symbian OS.
There are many more best practices that can be considered and there
is no single set of rules that will ensure correctness and quality. We hope
we have managed to highlight some of the most important best practices
in a balanced way.
Search WWH ::

Custom Search