Java Reference
In-Depth Information
of cloud computing and the growth of software as a service (SaaS), it
is becoming more common that computationally difficult or resource-
hungry functions are performed on the server. For example, a mobile
route-navigation application is better off keeping the intensive route
calculations on the server side, rather then hogging the phone's CPU.
Further, many applications use remote portals for storage or authorization,
such as software license checking.
Removing functionality to a portal begs the question: What do we do
when the network is not available? Applications that require cooperation
by a remote portal could handle this situation by providing an offline
mode. Clearly, not all functions can be available in offline mode, but the
user may still be able to use the program. One way to improve offline
mode usability is to keep an on-device cache of the crucial remote data.
An excellent example of using a cache to improve offline mode can be
found in [Yuan 2004].
9.3.3 Use Obfuscation
Class files carry enough information from the original source file to allow
reverse-compilation of it back into a source file. Without obfuscation,
your published classes can essentially be converted back to source and
modified with little effort. While many developers don't find this worrying,
it is not so welcome to commercial application vendors.
Obfuscators are intended to make this reverse compilation process less
useful by ensuring that the decompiled code is not as readable as the
original source code. Some obfuscators are so good that they are able to
confuse decompilers enough to prevent decompilation altogether.
Obfuscators also use a variety of techniques to reduce code size
and, to a lesser extent, enhance performance. For example, this can be
achieved by removing unused data and symbolic names from compiled
Java classes and by replacing long identifiers with shorter ones. The
ProGuard obfuscator reduced the size of the GoSIP demo JAR file from
20 KB to 17 KB. Chapter 3 explained that in Symbian OS devices there
is no hard limit to the JAR size. Therefore reducing the JAR size is an
additional benefit but not the primary reason to use obfuscators when
targeting Symbian OS devices.
9.3.4 Sign your Application
MIDlet signing was discussed in detail in Chapter 2. All important con-
cepts were laid out and applied in several code examples, using protected
APIs and highlighting the permissions needed to use each of them. How-
ever, one aspect of signing was not discussed there: its contribution to
application usability.
If an unsigned MIDlet uses protected APIs, a SecurityException
is thrown if permission is denied by default by the security policy in effect
Search WWH ::




Custom Search