Development Models
MoSync supports several application development models. We call them the "classic procedural", "event driven, object oriented" and "full GUI-based". The model that you should choose when developing an application depends both on the type of application you are developing and your personal preference.
The Classic Procedural Model
Using the classic procedural approach means starting out with an empty main function and implementing your own main loop, including all the event handling. Examples...
| Advantages | Disadvantages | When to use |
|
|
|
The Event-Driven, Object-Oriented Model
This approach is embodied in the use of the MAUtil::Moblet class. Inheriting it lets you implement functions such as keyPressEvent() instead of explicitly implementing an event loop yourself while providing TimerListeners and IdleListeners to facilitate execution of code outside of responding to events. Examples...
| Advantages | Disadvantages | When to use |
|
|
|
The Full GUI-Based Model
Using the MAUI library, you gain access to a variety of ready-made widgets such as labels, list boxes, text edit boxes, images, and layouts. You add logic by registering different types of listeners with the widgets, thus responding to higher-level events than with Moblets - things like selection and slider position changes. Examples...
| Advantages | Disadvantages | When to use |
|
|
|
- Printer-friendly version
- Login or register to post comments
Share on Facebook