Flylib.com

Books Software

 
 
 

Final Thoughts

Final Thoughts

Building Noverant's Web site was a useful project in beginning to explore the capabilities of XML, XSLT, and the XML DOM. As good as this site looks for a proof-of-concept piece, it needs more work before it will be ready for production use.

The document model is somewhat simplistic. The <doclet> element in particular needs to be expanded to accommodate different media types, relative priority, and advanced layout requirements. The query page can be enhanced to provide a more flexible query mechanism for a user . More skins need to be written to handle different browsers. The XSLT style sheet(s) should be able to handle more intelligent positioning than is currently possible. The doclet helper should allow for better management of content in the site. Finally the controller should be changed to take advantage of the multithreaded XML parser.

In this chapter we introduced some new XML technologies, such as XSLT, and have seen how they can impact traditional Web application design. The Noverant Web storefront served as a useful example of a Web site designed around XML. Hopefully you have picked up a few ideas that will be of use to you in your Web applications.

By separating presentation from content, XML can help to solve many of the maintenance problems that have plagued traditional Web applications. I recommend that you begin thinking about ways in which you can incorporate XML into new Web projects. In Chapter 6 we will see how XML can be used to develop application user interfaces.

Chapter 6

Building User Interfaces

Software developers have struggled with creating User Interfaces (UIs) since the birth of the computer, and these interfaces have constantly evolved, even when the tasks they perform have remained the same. A noticeable example can be seen in the progression of Microsoft's operating systems. From MS-DOS to Windows 3 to Windows XP, Microsoft has improved the usability of its most current operating system, so the task of installing, managing, and launching applications are easier than ever.

Similarly, other UIs for desktop and enterprise applications have changed over time. Advances in computing such as faster computers and graphics hardware now enable developers to build graphic-rich applications. The Microsoft Foundation Classes (MFC) armed application developers with a suite of standard, yet powerful UI components . By using these tools, developers can easily include such features as drag-and-drop, cut-and-paste, multimedia, and event-driven logic.

A current interface topic concerns Web browsers. The popularity of the Internet and the Web have made the Web browser ubiquitous. First-generation Web browsers were meant for viewing content, not building application UIs. The browser, however, was forced to adapt as the Internet grew into a forum for thousands of distributed applications. Developers struggled to create browser-based UIs that were functional at best. Today developers can build browser-based, thin-client applications that are nearly as rich as their thicker cousins.

This chapter will discuss how developers can leverage XML to help them with UI layout, navigation, and input controls. We will explore ways to use XML to create a layer of abstraction on top of traditional UI elements, making them more dynamic and extensible. Finally we will put these ideas to us, in actual code samples.

Modeling a User Interface in XML

The most important trait of an effective UI is consistency because an application with a consistent approach to human interaction is much easier to learn and use. Consistent UIs can also, with practice, be used intuitively. Intuitive use means efficient use; efficient users mean happy users; and happy users mean well-paid developers.

After consistency, the look and feel of an application's UI can be its strongest asset or its worst detractor. Naturally, users see an application's outward appearance first, and from that they draw first impressions . It behooves the software developer to design an interface that is sharp-looking and consistent in its visual presentation. Now you have a new tool for making sure the presentation says what you want it to say.

XML can help enforce visual consistency across the application by wresting the power of making UI design decisions from the hands of content developers and returning it to its original owner, the visual designer. XML can also help incrementally augment a UI's palette of components as new tool sets become available. Thus, the implementation or behavior of a UI component can be modified without altering the underlying model. In addition, separating presentation from content allows visual designers and content developers to work in concert, shortening the project lifecycle.

No matter the nature of the application, all UIs share a number of features, such as layout and navigation. In this section we will identify and describe several of these UI features.

Layout

The layout of an application's UI governs the positioning of its content. Information should be presented so that it is easy to find, manipulate, and analyze. Data should be presented in a clean, uncluttered manner. Closely related information should be tightly grouped and separated from less relevant information. The positioning of material need not be flashy. Simplicity and efficiency are what we want.

Navigation

An intuitive navigation scheme is critical to an application's reception . Users should be able to find the function or item they want quickly and intuitively. Similar functions should be grouped together for easy access. Navigation elements should not relocate themselves . Consistent behavior on the part of the user should be encouraged by the application.

Input Controls and Widgets

{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}

Input widgets, or components, are the atomic building blocks out of which all UIs are created. Examples include text fields, text boxes, check boxes, and any other controls that solicit input from the user. Some widgets are interchangeable. For example, combo boxes and radio buttons can often be used interchangeably to ask the user to "choose one of the following options." An application should not alternate between these controls arbitrarily.

User Actions

Actions are used to represent the various ways a user can manipulate data on the screen. Actions can take the form of buttons, pull-down menus, right-click menus , and others. Some actions are global, such as "undo" actions. Other actions are context-specific.

Security

Security in an enterprise application should be flexible enough to accommodate various dynamic roles that accurately reflect the job responsibilities of many different classes of users. An application's security should control the navigation, actions, and data exposed to the user. It should not be intrusive ; a restricted user should feel that the application is limited to what they can see.

Extensibility

A well-designed Web UI will take into account changes or variations in browser capabilities. The UI should be able to accommodate more sophisticated browser controls with a minimum of tweaking. Web browsers are dynamic software packages. New features and bug-fixes are constantly being added. Therefore, you should design a UI that is well-suited to change.

Customizability

Flexible UIs should allow some degree of user customization, but interfaces that are too highly customizable create needless complexity. An application should not go overboard by offering the ability to change every label, font, or screen. Ideally, allowing some customization to views, reports , color schemes, and the overall look and feel will make your application more user-friendly.

Color Scheme

Color can be used to improve an application's usability and aesthetic appeal and can have a utilitarian purpose when applied well. For example, colors can be used to separate or associate different content blocks within the UI. All graphical programs within the Windows operating system inherit the environment's color scheme. Additionally, the active window usually has a uniquely colored caption for identification purposes.