Best practices are proven design and programming techniques used to build J2ME systems.
Patterns are routines that solve common programming problems that occur in such systems.
Professional developers use best practices and patterns to avoid making common mistakes when designing and building a J2ME application.
The following are some of the design patterns to follow for the development of Mobile Application Development:
- Keep Applications Simple
- Keep Applications Small
- Limit the Use of Memory
- Off-Load Computations to the Server
- Manage Your Application’s Use of a Network Connection
- Simplify the User Interface
- Use Local Variables
- Don’t Concatenate Strings
- Avoid Synchronization
Keep Applications Simple:
- Design an application by dividing it into objects that have associated data and methods.
Here is an example: An order form is an object that has an order number, customer number, product number, and related data
- Design a J2ME application by dividing the application into pieces.
- Limit your design to minimum functionality required to meet user expectations.
Place each functional component in its own MIDlet where possible, and package the application’s MIDlets in the same MIDlet suite. This enables the device’s application manager to manage MIDlets and the resources used by MIDlets.