Chapter 3
Defining Our Data
In this chapter, we will cover defining data types and objects in a Java ME–friendly fashion. This step rarely receives the attention it deserves, but just as developing an application with the wrong mindset or developing it on top of the wrong framework can lead to disaster, so can using the wrong representation for your data.
The main pitfall here is the tendency to apply standard OO concepts (everything is an object, specialized objects are built on top of less specialized ones via inheritance, etc.) directly to Java ME, without consideration to the platform's peculiarities.
If you do so, you will end up with an elegant object hierarchy from an architectural point of view, but one that behaves poorly in performance-critical ...
Get Pro Java ME Apps now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.