Share This
Scroll Down
Categories
//Mobile Development Best Practices

Mobile Development Best Practices

Many developers start developing Mobile applications where they came from Desktop platforms and remain using same practices and techniques to develop and code specifically to reserve CPU, memory, power and network resources ; here is an enhanced experience optimised for best coding for the Mobile world.

 

General

 

  1. Simple Application : Mobile applications shall remain simple limited for few activities per screen without the complexity in the interaction or the mapping for the users as there are several limitations in the mobile like the size of the screen
  2. Limit the Size : Even with the latest mobiles where it has a large storage but still it remain vulnerable for the user and limited beside the application may operate in different devices with a variety of the storage sizes.
  3. Limit usage of Memory : Mobiles memory is very limited and more than the quart is usually occupied with the operating system and with the usage of the social applications nearly 60% of the memory are occupied by OS and background services like Whatsapp or Viber services.
  4. Minimise the network computation : In several cases the mobile require to do some computations or operations by POST or GET functions; for the mobile try to do the computations in the server side and just retrieve the result in the mobile for performance sake.
  5. Simplified UI : Again due to the limitation of the screen size and the optimised usage for a few activities per screen, having simplified User Interface will assist the user for better interaction and performing the tasks.
  6. Emulators : Difficult to test the application on many devices or simultaneously testing, for that make sure you set emulators for different devices with different settings to assure the consistency of the application.

Coding

  1. Local Variables : Despite global variables gives advantage of reusability but this redundancy occupy resources in the memory and CPU, local variables considered lighter.
  2. Avoid concatenating strings : Concatenating simply is linking strings together and that requires additional processing for the strings by keeping both strings where reading the instructions will have extra processing for reaching then null and matching.
  3. Pass data through objects : Instead of initialising new data members use the objects to pass through the parameters.
  4. Manage Threads : For Java including Android managing the Threads is very important because it remain operating as long as the application running and without controller such as Sleep or condition it will drain the resources of memory, CPU and power.

Web Development

  1. Support poor devices : Not all devices are equal and they are varied in the features, make sure the scripts and the media can be operated in multi-devices for different OS.
  2. Select proper media formats : For the audio not big issue and selecting MP3 format is proper; but for the video try to choose the best format for streaming like AVI are not supported by all devices while MPEG-4 where man factors come to the screen like the format size and support.
  3. Less dependency on CSS : It does generate size by using the fancy decorating stuff like the blurring, framing and effects beside it makes extra load for the processing;
  4. Minimize HTTP requests : Regularly the requests over the network generate load and increase the traffic and the mobile goal is reserve as much as possible of the resources, RESTful services would be good solution.
Many practices can be applied but those are most common for the multi-OS; I have summarised them with simple briefing and perhaps in the future will add some codes for the applications, benchmarks and comparisons.
Resources:
J2MEbestpracticesandpatterns.pptx

 

  • 695 views
  • 0 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

© Xernel 2018-2021 / All rights reserved.

Get in Touch
Close