Friday, 26 June 2015

Postman pattern


Postman Pattern is a improved Observer pattern specially for mobile phones. It deals with the problem that from the mobile phone, the observer could be not in the foreground when the data is coming from observable.

For this case, the observable acts like the postman, leaving the data (package) in the observer. When the Observer became visible again, it will check if it has some data (package) to be processed. If so, the data will be processed.

It includes the implementation for Android and some highlight for the source code, which is stored in GitHub here:
https://github.com/jiahaoliuliu/PostmanPattern/tree/simplePostmanPattern

No comments:

Post a Comment