Monday, March 7, 2011
Memory Management (m-Cube Level 1)
While developing mobile applications, one should always use optimal solution for memory usage. For instance, if applications want to display an image on the screen, then using PNG format instead of BMP is advised..
If a single application is used for multiple screen resolution devices, then all the resources should be downloaded from the server at the first launch. This way… the application need not increase its size by packing all resources of different screen sizes together in the final distributable.
If the application want to display a tile pattern in the background of the screen.. it will make more sense to use a small image and render it multiple times on the screen to create the impression of a big image. This way, the applications can reduce the actual memory required to store that big image and it will help in scalability of the app to other screen resolutions.
Also … applications should consider memory fragmentation rules as to allocate memory in the power of 2.
let’s suppose it would require 15 bytes to store a string, applications should allocate 16 bytes (2^4) as it would be easier to add/delete those memory blocks.
Also, try to allocate large chunks rather than small ones. For example, instead of allocating a single object, allocate an array of objects at once and then start the processing the same.
Another factor is Lazy loading, also known as dynamic function loading.
In lazy loading, all dependent components will be loaded as and when required by the application. It can be used to improve the performance of an application, if most of the dependent components are not used together on a single screen but are required at different points in the application flow.
All mobile applications should ensure that they do not use more memory than actually necessary.
Memory management should also adhere to the guidelines of the corresponding OS. For example, an iPhone app should follow the guidelines for using an AUTORELEASE POOL.
If the applications want to store a received object completely in an instance variable, then they must retain or copy it. They should generally not use weak references and decide where they would require a Deep Copy of objects and where a shallow copy will do.
Thursday, November 25, 2010
Interrupt handling (m-cube: Level 1)
Wednesday, November 24, 2010
Graphics & UI (m-cube: Level 1)
Tuesday, November 23, 2010
Certification (m-cube: Level 1)
Monday, November 22, 2010
Saturday, November 20, 2010
Distribution (m-cube : Level 1)
An effective distribution strategy plays a vital role in the success of any mobile solution. As the applications’ distribution directly affects the billing procedure, it is imperative that this strategy is worked out in the design phase itself.
Distribution largely depends on the type of application.
Typically, consumer mobility applications may be distributed via App stores, carrier deck or app aggregators like (get jar & cell mania). These app stores have now reduced the entry barriers and helps us reach out to the market in no time, like OVI store - you can register as a publisher just in 1$, get your applications signed for free and launch to the audience in more then 190 countries in almost in no time.
For enterprise mobility, corresponding Mobile Device Management systems should be planned and configured according to the expected load.
In case of a client/server application, like a mobile banking or a stock market app that needs frequent interaction with the server..you may feel the need of distributing it from your own Deck i.e. Over the Air from your own Website.
This makes sense when it is complicated to share the revenues of these apps with carriers, aggregators and/or store fronts while providing a quality service to the customers. In setting up an OTA distribution infrastructure for these cases, we need to make sure of the following two things:
a- Auto-detection of device platform and model, so that the right build is delivered to the requesting mobile device – this is achieved by searching the WURFL database using user-agent string fetched from the mobile request.
b- Auto-upgrade infrastructure is required on both the client & server side, so that on every login, the server can compare the client build version with one available on OTA server and give notification of optional/mandatory upgrade to the client app.
Another way to reach the market quickly is to embed the application on the device before the same is launched. You can do this by making an alliance with a renowned handset manufacturer like Nokia, Samsung, Motorola, etc for this.
Stay tuned, I will be posting the details of other attributes and best practices very soon.
