Embedded Systems Design Europe - November 2007 - (Page 37) user interface If a device has a network interface (typically wireless or Ethernet), an opportunity exists for the embedded software to communicate with users through other computers on the network, using all the flexibility the computer’s GUI affords. A specific UI can be written to do this, or it can be handled by implementing an HTTP server (a Web server) in the device. The latter approach is flexible, as it lets the UI be defined with a series of hyperlinked HTML (Web) pages. You can also make the pages “smart” with scripting (like JavaScript) or even the Java language. An HTTP server requires an RTOS environment in which to run. On devices with graphical screens – either full size, like a TV, or small, like a cell phone – the functionality may be defined quite precisely. Also, some common features may be leveraged. Although all of these mechanisms are found on today’s UI and may seem simple in many respects, nonetheless developers must face some serious challenges when working at the application level. The complexities of today’s devices typically feature a wide range of functionality, often implemented in a number of different applications. A feature-rich cell phone, for example, will have Web browser, messaging, media playback, and address book along with the traditional phone functionality. It’s not uncommon for each application to be developed separately, possibly by different companies. The result is that each application has its own UI, yet in every application, the UI is doing much the same work as the others, but in slightly different ways and often with a different look and feel. Unfortunately, this results in more development work (creating lots of UIs), and the user experience is compromised because the UIs aren’t consistent. Another challenge at the application level is the fact that the UI takes significant programming skill and effort to implement and, furthermore, to maintain and adapt to future needs. Finally, the design and implementation techniques employed at the application level offer limited opportunities The way to create a UI for a complex embedded system is to implement it as a separate software layer, which may be hooked into all the device’s application components. Figure 1 shows a system block diagram illustrating how such a UI engine might work. In this context, the software provides the display graphics and user interaction control. The developer simply configures the UI using XML. The advantage to the developer when using a UI engine is the simplicity of the methods involved in creating a sophisticated, attractive UI. Once all interface behavior has been delegated to the engine, many aspects of the UI’s design (including its branding, look and feel, and menu structure) may be configured with small parametric adjustments that require no coding or scripting. Simple declarative XML files, which are both extensible and human readable, provide an ideal way to specify such a parameterization. DECLARATIVE XML This more rationalized approach to UI development treats each UI menu as a well-defined state machine. A developer need only define what states are permissible, how each onscreen element should look in each state, and what interaction events (such as key presses or stylus taps) should trigger changes from one state to another. The UI engine implements all the logic required to morph the UI’s appearance whenever a state change occurs, for example, by scrolling a series of items by one position, or by switching the active focus from one item to another, when a particular key is pressed. By automating such UI logic, much of the complexity of constructing sophisticated new interfaces is avoided. 37 to add vendor customization without excessive programming effort. This is a capability demanded by service providers for wireless networks or cable TV operators, for example. These companies view the phone or set-top box as a differentiating extension of the unique service they provide and want to reinforce this message at every opportunity. The good news is that all three challenges can be addressed by taking a different approach to UI development. www.embedded.com/europe | embedded systems design europe | NOVEMBER – DECEMBER 2007 036-037-038_ESDE.indd 37 6/11/07 16:25:15 http://www.embedded.com/europe
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.