Chapter 15. Currency Converter

IN THIS CHAPTER

Now comes the exciting moment where we finally apply the skills we've learned from the previous chapters and create our first set of production-level WAP applications. This chapter highlights the basic features of WML, WMLScript, and general navigation within these two languages. Chapter 16—a chapter detailing a user directory application—includes more server interaction and demonstrates how you can create a dynamic back-end for these kinds of applications. In deciding what application to create here, we used standard criteria to select a relevant mobile application, where data is needed, selected, and easily accessed on the go—in this case, a currency converter.

Note

The final four chapters of this book, starting with this one, contain complete sample WAP-based applications. Having learned all the basics of WAP development thus far, seeing WAP used in real-world scenarios will help put all the information into perspective for you.

As the intent of these examples is not to teach WML basics, you will not find line-by-line coverage of all the code. Rather, the chapters are ordered as follows:

  • An overview of the application, complete with screen shots where appropriate.

  • A discussion of application design and flow.

  • Specific blocks of code that are of special interest are then explained.

  • And finally, the complete code listing is presented (the code is also provided on the accompanying CD).

Each of the example applications uses different client and server technologies. The application in this chapter is simple WML and WMLScript; other applications are pow ered by ASP, ColdFusion, and JSP. This mixture of technologies allows us to demonstrate techniques and practices that will be of use to you in your development.


Listing 15.1 (presented at the end of this chapter) will establish the user interface for a currency converter application, including soft keys, and then collect input from the user about which kind of currency she wants to convert. Finally, this deck will display results as generated by a WMLScript file which we will explain later in the chapter.

Listing 15.2, the complete code for the WMLScript file process.wmls, which was mentioned in the previous code listing, is given. This application actually computes the currency conver sion, based on data passed to it from the home.wml file. After the calculation is complete, it then returns the processed data to the home.wml file, on the display card.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.30.232