开发者

J2ME - BlackBerry - design patterns

There are several publications about patterns in j2me:

Architectural manifesto: The MVC design pattern in MIDP development by Mikko Kontio

Identification of Design Patterns for Mobile Services with J2ME by J. Narsoo and N. Mohamudally

Big designs for small devices by By Ben Hui

Patterns I use so开发者_StackOverflow中文版metimes:

MVC - to separate UI from controller classes and data structures, may be useful for code reuse on different platforms

Command - to reuse code in user interaction and app work-flow

Interface - to simplify several components use (ex different types of connections or data storage) and component testing (see Blackberry - change latitude and longitude on the device to test app)

Also Observer may be used for UI update tasks(see sample with HttpRequest)

What are your favorite patterns in J2ME/BlackBerry?


How about using Singleton to handle settings/configurations.. and factory pattern to cover about UI theme (for example). I'm also still new in developing blackberry, I find it quite difficult to know which pattern is suitable for one conditions or another.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜