Contact sorting - Contact List, Part 3
Simple sorting of data from RecordStore
This is the final part of my little tutorial/coursework re-do, where I will show you how easily can stored contacts be organised.
Some of you may know that RecordStore works on base of LIFO - Last In, First Out approach. For example if record has been added in the order: peter, marta, bruno, mark they will be read out of RecordStore in reversed order as: mark, bruno, marta, peter. To get contacts sorted, there are two options; either try to put contacts in order every time new contact is added or, try to put them in order once they read out from RecordStore, just before they get displayed on screen. The first option is overkill as it is just too much work for application to perform each time new record is stored and pretty much useless (read all records, add new record in correct position and overwrite previous data), so second option is the obvious choice.

