Java: A Portable Commercial Programming Language
Java is celebrated for its extensive API support and platform independence, making it a top choice for writing software applications. With distinct features like object-oriented programming and code mobility, Java offers a standardized environment while preventing common design flaws. On the other hand, BREW provides a unique approach for developing mobile applications, especially tailored for CDMA technology. Its toolset includes editors, emulators, and compilers to streamline the development process. Both Java and BREW cater to different aspects of software development, each offering its own set of advantages and tools.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
JAVA Today, it is widely accepted that Java as a programming language offers the most portable commercial environment for writing software applications. The success of Java has been mostly in providing standard Application Program Interfaces (APIs), a very thoughtfully designed infrastructure for OOP that prohibits many bad design and implementation habits such as multiple inheritance. Standard and open APIs offer a process of evolving a language that is open to many vendors. Furthermore, there exist implementations of the virtual machine and the native dependencies of the APIs for most popular operating systems. There are three major categories of Java APIs and virtual machines, namely J2ME, J2SE, and J2EE. Java offers three distinct features as a mobile application platform: 1. Java is an object oriented programming language. As any other programming language, it can be used to write applications. 2. Java offers complete code mobility and weak mobile agent ability. Java allows for platform-independent programming. 3. Java is a platform. First, Java, as with any other programming language, is just that: a programming language. It allows us to program a set of instructions. Perhaps just as importantly Java is somewhat of a vendor-neutral language-based platform. Java seems to have solved the problem that has plagued many other programming languages in the past: the lack of standardizing libraries. 1
BREW Qualcomm s BREW (Binary Run-time Environment for Wireless) gives application developers a new and different approach in producing mobile applications. BREW is built directly into the hardware. It is offered as an API to access the CDMA, GSM/GPRS, or UMTS chip sets that provide the support for it. But, it is primarily intended for the variations of CDMA, a technology owned and licensed by Qualcomm. BREW applications can be written on a PC using the BREW Software Development application is developed, it must be tested, and then deployed. Deployment of BREW applications is a process done jointly telecommunications carriers and not just the developer. Kit (SDK). Once the by Qualcomm and 2
set of applications of BREW 1. BREW MIF Editor: Every BREW module, defined as the classes that make up one or more BREW applications, has an associated Module Information File (MIF). 2. BREW Device Configurator: This is a stand-alone application that allows developers to make up their own handset by configuring a vanilla mobile phone and specifying the behaviour of the keys, the look and feel of the screen, and other specifics of the device. 3. BREW Emulator: For those who have designed and implemented any mobile application, it is obvious that one of the most difficult steps in the development process is the incremental unit testing. 4. BREW Image Authoring Tool: There is an image authoring tool that allows creation of images for BREW. This tool can use PNG or BMP files. 5. BREW ARM Compiler: Many mobile devices are based on the ARM or Strong- ARM hardware platform (registered trademarks of ARM Corporation). 3
set of applications of BREW 6. Image Converter: The tool set provides an image converter to convert 4-bit bitmaps to 2-bit bitmaps as BREW only supports 2-bit bitmaps because of the limited resources on mobile devices 7. BREW Resource Editor: If you have worked with Java or C++ to build GUI client-side applications, then you are familiar with the concept of a resource bundle. Resource files in BREW are a collection of images, strings, and dialog look-and-feel components that allow changing the look and feel of the application for internationalization and similar purposes without changing the code base. The BREW Resource Editor gives the developers a GUI interface to manage the resource files. 8. BREW Pure Voice Converter: This command line utility allows the developers to convert wave files (audio) to Pure Voice files or vice versa. 9. BREW AppLoader: This tool allows the developer to deploy an application on a handset through a PC connector. This is a testing and not a deployment tool. 10. BREW Grinder: The Grinder generates a variety of inputs and tests the application. 11. BREW TestSig Generator and AppSigner: The TestSig tool provides the developer a mechanism to generate a test Class ID. 4
WINDOWS CE An operating system is the master control program that enables the hardware by abstracting it to the application via drivers [Development tools for Mobile and Embedded Applications 2002]. Microsoft s various products revolve around different versions of an operating system. The versions that concern us, the mobile application developers, most are Windows CE and Embedded Windows XP. Windows CE has been around since 1997 and Embedded Windows XP is being released at the time of authoring this text. These two operating systems are designed for two different purposes. There are different flavors of the Windows CE operating systems, of course, depending on the hardware platform. Some of these flavors are the Pocket PC, Windows CE .NET, and Pocket PC 2002. These flavors largely depend on the commercial bundling of different feature sets and hardware platforms with which they are shipped (such as Compaq s IPAQ). Embedded Windows XP, in contrast, is a subset of the desktop version of Windows XP components. Development for Embedded Windows XP is a bit more straightforward than developing for Windows CE. 5
Microsoft provides tools to build applications for each environment too. These are as follows 1. Embedded Visual C++:This is a tool set separate from Visual Studio, the typical development environment for PC-based Windows applications. It allows for authoring mobile applications in C++. 2. Embedded Visual Embedded Visual Basic: This tool provides the ability to write applications using Visual Basic. 3. Smart Device Extensions for .NETSmart Device Extensions for .NET: The .NET application programming platform, the newest set of tools for building Microsoft Windows-based applications, can be complemented with a set of extensions that allow developers to author .NET applications for mobile devices. 4. Microsoft Mobile Internet Toolkit: This is really a server-side frame work We will discuss it along with the other publishing tools later in this chapter. 6
WAP Wireless Application Protocol (WAP) is the single framework most used in building mobile applications today. Despite all of its initial high promises, its lack of meeting those promises, and being written off for dead, WAP seems to have survived the critics and continues to improve. WAP, which was initially intended to be as pervasive for wireless and mobile applications as HTTP has been for the Web, never achieved the level of success initially expected. However, to date, WAP has the largest install base of all open application development platforms (second to NTT Docomo s closed and proprietary i- mode system) on mobile phones, meaning that WAP is installed on more mobile phones than any other software. WAP shares some similarities to HTTP. From its inception to now, it has become more and more like HTTP. WAP 1.x and WAP 2.x are significantly different with WAP 1.x being the basis for nearly all the current installations in the market today and WAP 2.x being the target platform for WAP devices during 2003 and 2004. Let us go over some basics about WAP. 7
WAP 1. WAP is intended for thin clients. Much like HTTP, the designers of WAP 1.x were thinking about a thin-client technology: a case where nearly all logic is calculated on the server and very simple display instructions are bundled in some mark up language to be displayed by the client. 2. WAP is built on its own lower level communication protocol. Whereas HTTP assumes the existence of TCP/IP (which in turn provides persistent connections), WAP is built on its own set of communication protocols that wrap around TCP, UDP, or a variety of other possible protocol implementations. 3. Typical deployment of WAP includes a proxy or a gateway. Wireless carriers (also referred to as bearer networks) like to have control of every single incoming and outgoing bit of data that travels on their network. This is understandable as usage time is the typical mechanism for billing. 4. WAP is a complete framework for mobile applications. Whereas most tools created for development of applications treat a part of the mobile application chain, WAP treats, or at least attempts to treat, all parts of the mobile equation. 8
Chapter3.XML: The Document and Metadata Format for Mobile Computing The Extensible Markup Language XML is a subset of the Standard Generalize Markup Language (SGML) specified in ISO standard 8879. SGML was created to create and maintain complex and portable documents to be used in highly scalable systems in a non proprietary manner to any particular vendor. XML has become a key technology in the development of content for the World Wide Web. Today, with the birth of Web services, it is used for more than its original purpose of representing documents. 9
XML and Mobile Applications 1. Mobile applications should understand and be able to manipulate XML content. As content on the Internet, and other networks, moves into an XML format, it is very desirable that a given mobile application can handle XML. How the XML is handled is of particular interest. Although the task of parsing and interpreting the XML can be done on the mobile device itself, or some proxy such as an application server that processes all content for the device, issues such as performance become of paramount concern 2. Mobile applications use XML to facilitate their implementations. For example, XML documents can be used by mobile applications to exchange data; configuration of a device or a server may be encapsulated in an XML file; some protocols such as WAP use XML as the means for presentation. There are countless places where mobile applications and related frameworks can use XML internally. 11
DOM Parsing The Document Object Model (DOM) is the tree representation of all of the XML elements. Every element becomes a node and nodes. Nodes can have children to support nesting of nodes in the same way as an XML element can have other elements. The mapping of DOM to UML is very simple. Every node is an object, an instance of a class. The XML attributes are the object attributes and the children nodes are encapsulated data members. ADOM parser written in an object-oriented language such as Java, C++, or C# goes through the entire XML document and creates a tree of nodes, with the nodes being objects. DOM parsers are also required to preserve the order of elements. There may be meaning in the order of elements. The same is not required of attributes. 12
SAX Parsing SAX (Simple API for XML) creates a series of events as it parses through the XML document instead of creating an object model of the entire document in memory. There are two key advantages that SAX offers over DOM: 1. Most of the time, we do not need all of the information in the document. So, the object model desired does not have to have every element and attribute of the document. A custom object model in this case is more efficient. We can write a custom object model and a driver that catches the SAX events as the SAX parser reads through the document and emits them and fills up the custom object model. 2. We do not have to wait for the entire document to be processed before using the contents of the document. For very large documents, DOM becomes problematic as it has to load the entire document into memory before it makes its contents available. In contrast, as a SAX parser progresses through processing a document, it emits events; therefore, by nature, processing of the information it allows immediate 13
XML WEB SERVICES Web Services are a prime example of an organic, as opposed to a synthetic, evolution in technology. They exist because the HTTP protocol is ubiquitous: Just about everyone today has access to the Web. Web services build on the HTTP protocol methods, mostly GET and POST, to build an RPC (Remote Procedure Call) that allows two systems to exchange messages over HTTP. But, why not use CORBA, COM, JINI, or other distributed computing protocols? XML based Web services are not efficient: They convert binary to text to convert it back to binary again. This is a weak point of XML based Web services when it comes to dealing with mobile applications. However, there are work- arounds Web services are a text-based MMI (Machine-to-Machine Interface). However, they are simple to build and they take advantage of the ubiquity of the Web. Protocols such as CORBA have failed in becoming ubiquitous. Other protocols such as COM are proprietary to a platform. The platform of Web services is the Web. Regardless of level of efficiency, those two aspects alone create an economic reason for Web services to exist. Another consideration that accompanies the use of Web services (typically HTTP based though they can be based on other protocols such as SMTP) is security. 14
Web Services and Mobile Applications 1. Web Service Proxy: The infrastructure of mobile applications can use Web services for messaging. For example, a given system may allow mobile users to find someone s phone number through a directory service and subsequently get the driving directions to that person s place of residence. These two functions, finding the phone number and the driving directions, may be fulfilled by two different systems, each implemented in a different environment. So, the back end for our mobile system may use Web services to connect to each one of these systems and retrieve the information we need to return it to us. The interface between the back-end system and the device remains consistent and can be implemented through whatever communication protocol may be necessary. This is the more likely scenario for most systems. 15
Web Services and Mobile Applications 2. Direct Connection to Web Services: Mobile devices with more resources can directly access the network through the use of Web services (see Figure 3.4). Of course, this requires a considerably advanced mobile device as we have to have very efficient XML parsing as well as the ability to write substantial applications that application of XML that supports the particular Web service to which the mobile device must connect to. implement the 16
KEY XML TECHNOLOGIES FOR MOBILE COMPUTING Some standard applications of XML have been specifically designed with mobile applications in mind. Standardization of such applications of XML is required to provide interoperability between disparate systems. As we mentioned previously, mobile applications should be able to handle XML content. This may mean parsing the content to take some actions based on the content, transforming the content for various user interfaces, or using XML as the metadata for handling various types of content. There are a set of standards by W3C and proprietary recommendations by various vendors that apply for these cases. We will recommended by W3C as they are typically more encompassing than proprietary recommendations. focus on standards 17
XML-Based User Interface Technologies for Mobile Applications As we previously mentioned, one of the first markup languages to be pervasively used was HTML. Most of the Web documents today exist in HTML. HTML is an application of SGML, but it is not very clean. XHTML is an attempt at cleaning up the HTML syntax and providing a version of HTML that is an application of XML. XHTML will replace HTML past version 4.01 and it is an approved W3C standard. One of the biggest problems that HTML presented was that it was not designed to be used by a wide variety of user interface types. HTML was designed with minimum requirements of a color screen of 640 480 pixels and the PC in mind. Though some considerations were made for screens that did not display graphics, not much else was available to the developer. Also, HTML was not strict enough in enforcing syntax. So, programmatic changes to HTML to make it fit various devices was not possible without making assumptions (which in turn create bugs). 18
XML-Based User Interface Technologies for Mobile Applications XForms allows us to build user interfaces with a focus on the interactions and data exchanges between the user and the user interface as opposed to specific types of user interface. XForms allows us to separate concerns among presentation logic specific presentation logic specific to the device, the data exchanged between the user and the system, and the interaction flow. It is natural for XML to be the core of a user interface system infrastructure, mobile or not. XML is textual, structured, and document based. Those three elements are of utmost importance in building a human computer interface (HCI). There are other applications of XML for mobile application infrastructures as well. We will now briefly introduce some applications of XML that control flow of interactions. to the application, the 19
Putting XML to Work XML has already become the de facto document standard for exchange of human readable data. Whether such will be the case for machine-to-machine communication is questionable; nevertheless, such applications exist and their popularity is increasing. In this chapter, we looked at a variety of XML-based technologies and took an introductory glimpse at their use in mobile applications. Then, we looked at RDF, a part of the Semantic Web that is becoming pervasively more crucial to mobile applications. We followed this by discussions of CC/PP and UAProf as applications of RDF and XML for mobile applications and finished off the chapter by talking about XML to UML mapping. The significance of XML to mobile applications is twofold: First, it offers a well-formed and deterministically modifiable format for human-readable data, and second, it offers interoperability. 20
Chapt.5 Generic User Interface Development such as issues related to human factors are not well defined. In this text, we will use terminologies outlined by ECMA (European Association), W3C (World Wide Web Consortium), or similar non-commercial standards bodies. It is also important to note that user interface development for mobile applications is a new field; therefore, there will be occasions when these bodies have not decided on a standard way of addressing these problems. In such cases, we will build some logical vocabulary as built on top of the existing standards and as decided by the author of this book. The first step in moving forward is to ask ourselves, Why do we want to build generic user interfaces? First, mobile applications are typically used by a wider array of operating environments and systems than a PC. Because there is such a wide array of end clients for mobile applications, we need to be able to adapt the application quickly, if not in real time, with very little or no additional development effort. Computer Manufacturer 21
User Interface Development A software application is started by a person, another software application, application, or a combination thereof. A demon program may invoke a server application at a particular time; this is an example of a software application being invoked by another software application. The operating system itself is an application that may hardware/software driven application, turning the computer on, providing power to the CPU, and allowing the initialization software permanently stored on the hardware to invoke an operating system. Excluding artificially intelligent systems, all software applications, at some point and perhaps through a long line of succession, are either started or scheduled to start by a person a user. a hardware be started by a 22
Human Factors Dix et al. define human factors, often referred to as ergonomics, as the study of the physical characteristics of the interaction: how the controls are designed, the physical environment in which the interaction takes place, and the layout and physical qualities of the screen [Dix et al. 1998]. For any typical application, we need to consider the following as the elements of human factors consideration: 1. the look and feel of the application and how the users like the user interface, 2. the ease of learning the interface well and becoming efficient at using the user interface, and 3. health issues in using the user interface. 23
Usability, Human Factors, and Other Considerations for Developing Stationary PC-Based User Interfaces list some issues that the software engineering industry, as a whole, deems to be important 1. Intuitiveness: User interfaces should be intuitive. User interfaces should be intuitive. The first time a user uses an application, he or she should be able to navigate his or her way through without too much trouble, assuming a reasonable amount of familiarity with the application domain. 2. Consistency: Consistency: A software application should present user interface components that are consistent with each other and consistent with their operating environments. 24
Usability, Human Factors, and Other Considerations for Developing Stationary PC-Based User Interfaces 3. Learnablility: The user should be able to learn how to use the user interface within the first few times of using it and remember how to use it without having to refer to manuals. This goes hand in hand with the user interface being intuitive. 4. Nonintrusively Helpful: The user interface and the underlying application should provide help and hints. There can never be too much in the way of help and hints on a user interface. 25
Usability, Human Factors, and Other Considerations for Developing Stationary PC-Based User Interfaces 5. Accommodating Expert Users: A good user interface provides shortcuts for the expert users. Applications should be efficient and fast to use for expert users. As a user learns how to use the system better, he or she should be able to access the information and perform the tasks faster and faster. 6. Trustable: The user interface should be predictable, trustable, and easily understood. There should be a simple set of rules that are used in building the user interface that allow the user to be able to guess what the reaction of the user interface may be. 26
Usability, Human Factors, and Other Considerations for Developing Stationary PC-Based User Interfaces 7. Robustness [Dix et al. 1998]: A good user interface should gracefully recover from user errors (e.g., display the proper dialogue boxes to guide the user when an error happens), should convey the relation to the application logic easily to the user (e.g., make sure that the user knows which data are changing, when committed, etc.), and should be fast enough and let the user know when there are long waits for responses. transactions are 27
Example 5.1: User Interface Consistency Guidelines for a Mortgage Banking Application. A) Guidelines by Domain: a. Color: Use white, black, scales of gray, and scales of blue only. These are the branding colors associated with ACME Mortgage corporation. b. VUI Prompts: All prompts relating to gathering information for the financial portions of the loan application should be recorded by a female voice talent. All prompts relating to gathering information for the personal sections of the loan applications should be recorded by a young male voice talent. B) Guidelines by User Interface Components: a. Color: Use blue for all of the buttons. Use white for all of the backgrounds. Use black for all of the fonts. Use scales of gray for all other interface components. b. VUI prompts: All informative prompts must be recorded by a female voice talent. All warnings must be recorded by a male voice talent. When the user does not understand one prompt pronounced by a given voice artist twice, the voice talent should be dynamically changed to allow the user to understand the voice of another voice talent. 28
BUILDING GENERIC USER INTERFACES Before we go into this further, let us look at when we want to build generic interfaces and when we do not. Let us consider applications that can benefit from a layered user interface approach: 1. Applications that change frequently: Many applications change very frequently. Such constant changing of state may be caused by the business model that the application serves or a variety of other reasons. 2. Applications that support a wide variety of devices: We have talked about this several times now, so the reader should well know that mobile applications need to support a variety of device types. 3. Applications that must have many loosely coupled parts: One of the advantages of building a generic user interface to a system is that it enables loose coupling between the user interface components themselves and among the look-and-feel components, interaction logic, and application flow logic. 4. Applications that offer multiple user interfaces with a range of complexity: A good reason to justify building systems with generic user interfaces is the requirement of supporting multiple user interfaces, each with some difference in the required feature sets. 29
BUILDING GENERIC USER INTERFACES So, when implementing the generic user interface, we provide all of the possible functionality needed from the various user interfaces. In this way, we achieve several goals: a. We avoid building the logic for the user to interact with the system multiple times. b. We build a consistent way of accessing all functionality. Remember that maintaining consistency across multiple user interfaces for our system is a must. The first place to start to establish such consistency is with the way the back end expects the user interactions to behave. c. If we decide to make the system state full (so that the system remembers the things that the user does as he or she navigates through the system), we can easily maintain the state across different user interfaces. (We will look at exactly how to implement such functionality in Chapter 8.) d. Changing the set of functionality supported by the various user interfaces becomes significantly easier. To support a piece of functionality supported by the generic user interface, all we need to do is to add the corresponding specialization features to the components that specialize the generic user interfaces. 30
Device/Platform Specific Specialization Multimodal Specifications Channel Specialization Modal Specialization Generic Presentation Logic (help, temporal ordering, spatial ordering, etc.) Generic User Interaction Logic Application Logic FIGURE 5.1. Layering User Interfaces. 31
Developing Mobile GUIs Chapter6 final goal: building mobile user interfaces. Mobile user interfaces inherently have different requirements than their stationary counterparts because of the dimensions of mobility and the mobile condition of the user. The dimensions of mobility affect design and implementation of user interfaces in two fundamental ways. The first is that the user interface has to accommodate functionality that relates to the dimensions of mobility. For example, user interfaces must be available on all of those devices through which the user of an application may access a system. Second, the dimensions of mobility create various concerns that require further separation of concerns when building user interfaces. Today s state-of-the- art techniques in model-view-controller (MVC) and presentation abstraction- control are incomplete in treating these concerns so we will first examine them and then examine enhancements and alternatives to the existing techniques that allow us to design and implement with the proper separation of concerns for the new concerns introduced by the dimensions of mobility 32
Developing Mobile GUIs We have already begun this process by looking at building generic user interfaces. Generic user interfaces simply model a user s interaction with the system (independent of the modality and the communication channels). 33
PAC, MVC, and Others As you recall, we face multiple challenges in developing user interfaces for mobile applications. There are a multitude of devices and platforms used by the consumers (device proliferation), the user interface must be robust enough to allow the modalities that fit the condition of the mobile user at the time of using the system (support for a wide variety of user interfaces), and the user interface of one application may need to adapt itself to be used under a number of system conditions (low battery, poor QOS, and low device user interface capabilities). Because of the relative short lifetime of the mobile device acceptance in the marketplace and the large permutations of possible platforms (mobile operating system, hardware, network, deployment, etc.) we have to do our best to construct the device so that code is maintainable, extensible, and flexible. Whatever problems you may have faced in maintainability, extensibility, and flexibility of software for stationary applications are permutated by the dimensions of mobility. 34
PAC, MVC, and Others There are a variety of software development techniques for developing the user interface to stationary applications, but we will focus on those techniques that have evolved from the study of object-oriented programming and design patterns. If your chosen language for building your mobile application is C++, Java, or another object-oriented programming language, these techniques will apply directly. However, even if you are using a language such as C (and the relevant tool sets), the concepts will still apply. You may need to apply some creativity (or read up on writing object- oriented applications with C) in adapting these techniques to the language of your choice. 35
Model-View-Controller Model-View-Controller (MVC) is an object-oriented design pattern for separation of concerns of applications with user input (see Figure 6.1).MVCis best defined by Buschmann, Meunier, Rohnert, Sommerlad, and Stal (also known as the Gang of Five ) in one of the staple texts of software application development called Pattern Oriented Software Architecture: A System of Patterns. MVC divides an interactive . The model is the internal implementation of the application and does not encapsulate any data or have any behaviour related to interactions with the user or the presentation of data to the user. The view encapsulates any output through the user interface to the user. What you can view on the screen or hear on the phone is rendered by the view. MVC allows separation of three different concerns: receiving input from the user (controller), implementing components that model business logic and operations that build the core functionality of the application (model), and presenting information to the user (view). 36
Model-View-Controller MVC has a couple of disadvantages. First, proliferation of views and controllers becomes unmanageable and very difficult to maintain as mobile applications have multiple user interfaces rendered through multiple channels and can receive input from numerous controllers. Second, the inherent asymmetry in treating the input and the output from the user to the model compounds the effect of this proliferation problem. For example, a system that offers a VUI and an HTML user interface for its users would need at least two separate controllers, one that can receives user input through a voice channel and another that receives input from the user through HTTP. Likewise, two different views would be needed, one that renders a GUI in HTML and another that renders an aural user interface through playback of audio. If we wanted access to the aural user interface through the PC as well as the telephony system, we would end up with two controllers and two views for the VUI. It is easy to see that the user interfaces and channels to be supported for a mobile application can become unmanageable. 37
Model-View-Controller MVC still gives us some value in separating the three major concerns, but its tightly coupled and asymmetric nature, as well as its inability to treat multiple views and controller types elegantly, makes it less than ideal for user interfaces in mobile applications. Let us continue our search through existing techniques by looking at a similar design pattern, also exposed by the Gang of Five called PAC. 38
Presentation-Abstraction-Control Presentation-Abstraction-Control (PAC) is an object-oriented design pattern that separates the concerns of a system by breaking it down into loosely coupled agents, each responsible for one task (see Figure 6.2). The Presentation-PAC architectural pattern defines a structure for interactive software systems in the form of a hierarchy of cooperating agents . Every agent internally has components that serve one of three tasks: those components that abstract away the core functionality and data used by the agent (abstraction), those components that provide access to the agent (presentation), and those components that control the interactions between the abstraction and presentation layers (control). Note that the PAC pattern is similar to the MVC pattern in that it hides the internal implementation of the logical functions of the system from the user interface (i.e., the abstraction layer hides the business logic). 39
Transformation-Based Techniques for Mobile Applications The first attempts at building mobile user interfaces has been to transfer today s HTML-driven Web model to handheld mobile devices The goal of such markup languages is to take a subset of functionality of HTML. This has two benefits: 1. Only a subset is needed for devices with limited capabilities, bandwidth, power supply, etc. and 2. having a subset enables us to have a simpler and smaller browser that uses less of these scarce resources. Because Web content is mostly in HTML, this means that HTML has to be transformed to the markup language supported by the target device. But because there are a variety of devices and slightly different implementations and variations of the markup languages, developers were left with a significant problem: how to automate the task of publishing to these various user interfaces. 40
Developers began using two techniques to complement both PAC and MVC: 1. Transcoding: If the content is initially in HTML, we are dealing with a view of the existing system. Transcoding techniques focus on extracting the information out of this view to create an intermediate format that can in turn be used to produce other views. The process of creating this intermediate format is referred to as transcoding. Prior to use in the moble context, the term transcoding typically meant conversion of one compressed format to another. And, as in the case of conversion of one compressed format to another, there is almost always some loss of data in conversion of HTML (or another markup language) into the intermediate format. The intermediate format is used like a generic user interface and then transformed to the various views using XSL or a similar technology. 2. Transforming: Although we can start with HTML (or some other presentational view of the system) and convert to other views of the system, this is a solution that should be done only as a last measure. The preferred situation is that all content is initially produced in XML that gives a presentation-neutral view of the system. This content can then be transformed to the appropriate views using XSL or similar technologies. 41
Developers began using two techniques to complement both PAC and MVC There are two main differences between transcoding and transforming. First, in transcoding, we are starting out with some final (specialized) content, not raw (generic) content. Second, transcoding is typically lossy and needs special instructions whereas transforming is not lossy and should not need special instructions (other than the transformation). Both transcoding and transforming are complementary to MVCand PAC. Figure 6.4 shows how the content produced by a system using PAC is transcoded and transformed to other forms of content for access by multiple user interfaces. 42
Developers began using two techniques to complement both PAC and MVC 43
VUIs and Mobile Applications As their name indicates, voice user interfaces (VUIs) are interfaces that allow users to interact with computing systems through use of voice. Although our voice can be used in different ways, VUIs typically refer to communication through the use of language. This narrows down the problem at hand as communication through VUIs is a subset of communicating through aural user interfaces. It is possible to communicate with computers through sounds other than pronounced words and sentences. Different sounds can be used to communicate information through their frequency, amplitude, duration, and other properties that make them unique. However, language is how we naturally communicate, be it through voice or text; therefore, when referring to VUIs, we refer to communicating with machines using pronounced language.
VUIs and Mobile Applications The qualities of speech are those things that differentiate speech from other types of aural input. To build good VUIs, a general understanding of the physical qualities of speech not only give us a better high-level insight into the operation of voice recognition engines but also leads us toward building better VUIs. So, let us take a survey of what these qualities of speech are.
VOICE RECOGNITION Unlike voice transcription, voice recognition has not been so illusive in achieving. Voice recognition allows the recognition of a word, a phrase, a sentence, or multiple sentences pronounced by voice against a finite set possible matches. In other words, the computing system tries to match something said by the user to a given set of possibilities that it already understands. For example, telephone companies have used this technology for years in their directory systems asking the user to Please say one to reach Bob and two to reach Phil. If the user says three, the system cannot find a match and tells the user That s not a valid option; please say one to reach Bob and two to reach Phil. Though the term voice recognition is often used as an encompassing definition of voice transcription and voice recognition, in this text, we will use it to recognize the so-called command-and-control type of recognition. Some major distinctions between voice transcription and voice recognition, as defined in this text, are the following:
VOICE RECOGNITION 1. Directed Dialogue: As the term suggests, this is the case when every response by the user is preceded by a list of acceptable responses as well as an explanation of them. An example of such a dialogue is shown in Figure 7.2. As you see in this example, the dialogue is directed by the system. The analog of this type of dialog in the GUI world would be an interface entirely comprised of list boxes that are bound to predetermined selections. 2 Natural Language: The ultimate goal of voice recognition is to be able to have the computing system understand the commands that you give it even if things are paraphrased or are put into the wrong order. Figure 7.3 is an example of a natural language interaction, taking place between a user and the computing system. As you can see in this example, although the system can only understand sentences and words that concern turning on and off lights or adjusting the temperature in the house, the user is able to put those words and sentences in any order desired
VOICE RECOGNITION System: Welcome home Bob. How was your day? Can I help you tonight? Bob: Yeah. Turn on the lights in the garage, will you? System: Lights are already on in the garage Bob. Is there anything else I can do for you? Bob: Can you warm up the dinner please? System: I m sorry Bob, I only understand tasks related to lighting and temperature. You ll have to upgrade me to help you with the other household controls? Bob: Ok, well, turn on the lights in the kitchen and go into quiet mode. System: Thank you Bob. Lights are now on in the kitchen. Just say Genie if you need me. FIGURE 7.3. Natural Language.
VOICE RECOGNITION 3. Mixed-Mode Dialogues: Mixed-mode dialogs are often referred to as mixedinitiative or natural language as well (though this second is a bit of a misnomer as mixed-mode dialogues are not as flexible as natural language dialogues). Mixed-mode dialogues allow natural language interactions while directing the user so as to contain the possible responses to a given question to a minimum. Figure 7.4 shows an example of a mixed-mode dialog between our fictitious system and Bob. Note that although the system drives the conversation taking place with the user and tries to limit the expected responses from the user, it understands the user s natural language response.
System: Welcome home Bob. How was your day? Can I turn on any lights or adjust the temperature for you tonight? Bob: Yeah. Could you turn on the lights please? System: Where would you like to turn on the lights Bob? Your bedroom, the bathroom, the kitchen, or the garage? Bob: My Bedroom and the bathroom lights please? System: Ok Bob. Those lights are now on. Bob: Great. You can go into quiet mode now. FIGURE 7.4. Mixed-Initiative Dialogs.