|
Dynamic WAP Application Development Soo Mee Foo, Christopher Hoover, Wei Meng Lee 2001 | 888 pages ISBN: 1930110081 |
|||
![]() |
$15.00 | Softbound print book | |
![]() |
$7.50 | PDF ebook | |
Table of Contents
preface xxvacknowledgments xxvii
about this book xxix
about the cover illustration xxxiii
Introducing wireless development 1
- Understanding WAP 3
- The next big thing 3
- The phone is different than a PC 5 ï The phone is better than a PC 7
- How the wireless Web works 7
- The Wireless Application Protocol 10
- Why wireless requires new technology 12 ï Common WAP terms 14
- Understanding wireless applications 14
- The card and deck paradigm 15 ï Mobile markup languages 16
- Your development target: the mobile phone 17
- WAP development challenges 18 ï The phone user interface 19
- Getting started 20
- Summary 21
- WAP application development platforms 22
- Introduction 22
- Working with emulators 23
- UP.SDK 24
- About UP.Simulator 25 ï Obtaining and installing UP.SDK 25 ï Creating and viewing a wireless application 27 ï Debugging your application 30 ï Reloading a document in the UP.Simulator 30 ï Configuring the UP.Simulator 30
- Nokia WAP Toolkit 32
- Obtaining and installing the Nokia WAP Toolkit 32 ï Using the Nokia WAP Toolkit 33 ï Creating and viewing an application 35 ï Debugging your application 35 ï Reloading a document to the phone simulator 36 ï Configuring the Nokia WAP Toolkit 36 ï Blueprint phone emulator 37 ï Nokia 7110 emulator 38
- Summary 39
Introduction to WML 41
- Getting started with WML 43
- Introduction 43
- What is WML? 44
- Opening and closing tags 44
- Learning by example: Hello World! 48
- Understanding the code 49
- Formatting text 50
- Specifying font styles 51 ï Inserting a carriage return 51 ï Specifying reserved characters 53
- Positioning text on the display 54
- Wrapping text 54
- Default line wrap mode 55 ï The Times Square wrap mode 55
- Tables 55
- Using table elements 55
- Defining metainformation 57
- Using the <head> element 57 ï Using the <access> element 57 ï Controlling deck caching using the <meta> element 59 ï Controlling bookmarking using the <meta> element 61
- Summary 62
- Navigating in WML 63
- Introduction 63
- Navigation basics 63 ï Planning your WML application 64
- Using the task elements 65
- Using the <go/> task element 65 ï Using the <prev/> task element 67 ï Using the <refresh/> task element 68 ï Using the <noop> task element 69
- Defining tasks within WML 69
- Using the <do> element 69 ï Using the <anchor> element 70 ï Placing a phone call with WML 72
- Using menus for navigation 73
- About backward navigation 75
- About the history stack 75
- Implementing card-level events 76
- Using the attributes in the <card> element 77 ï Using the <onevent> element 77 ï Using the <timer> element 77
- Implementing deck-level events 78
- Using the <template> element 79
- Summary 79
- Getting information 81
- Introduction 81
- About menus 82
- Overview of the WML menu elements 82 ï Using the < select> element 82 ï Using the <option> element 83 ï Using the < optgroup> element 86
- Using input fields 87
- Using the <input> element 88
- Restricting data entry 89
- Formatting input fields 89 ï Preformatting entry data 90 ï Ordering input fields 91
- Images 91
- Using the <img/> element 92 ï The WBMP image format 92 ï Using the ALT attribute 93 ï Icons 93
- Summary 94
- Using variables in WML 95
- Introduction 95
- Definition of a variable 96
- About variables 96
- Naming variables 97 ï Referencing variables 97
- Setting variables 99
- Setting variables implicitly 99 ï Setting variables using input fields 100 ï Setting variables using selection menus 101
- Sending variables to server-side programs 103
- Using the post method 104 ï Using the get method 105 ï Specifying the URL 107
- Summary 108
- Extending WML 109
- Introduction 109
- About extended WML elements 110
- About context 111 ï Managing state in nested contexts 111
- Implementing context 112
- An example: variable state in a context 112
- Navigating between contexts 114
- Returning from a child context to the parent 115 ï Returning to the calling card 115 ï Returning to a specific card 115 Using the <throw> and <catch> elements 116
- Passing variables between contexts 118
- Sending variables to a child context 118 ï Receiving values from a child context 119
- Summary 120
Introduction to WMLScript 121
- Getting started with WMLScript 123
- Introduction 123
- Overview of WMLScript 124 ï Using WMLScript files 124
- Structure and syntax 125
- About variables 127
- Declaring variables 128 ï Data type assumptions 129
- First look: adding two numbers 130
- The WML code: add.wml 130 ï The WMLScript code: add.wmls 131 ï The result 131
- Summary 131
- Using WMLScript statements and operators 132
- Introduction 132
- What a statement does 133 ï What an operator does 134
- Statement types 135
- Operators 140
- Operator quick reference 143
- Summary 144
- WMLScript functions and pragmas 146
- Introduction 146
- Functions 147
- Function declarations 147 ï Local functions 148 ï External functions 149
- Library functions 149
- Pragmas 152
- URL pragma 152 ï Access pragma 153 ï Meta pragma 153
- An example applicationóguessing a number 154
- About the example application 154 ï The WML code 155 ï The WMLScript code 156 ï The result 157
- Summary 158
Introducing HDML 159
- Getting started with HDML 161
- Introduction 161
- Why learn HDML? 162
- HDML syntax and structure 162
- Commenting HDML code 164 ï The card/deck paradigm in HDML 165
- An example: Hello World! 165
- Formatting text 166
- Specifying reserved characters 167 ï Positioning text on the display 168
- Wrapping text 168
- When to wrap versus Times Square 169
- Summary 170
- Building interactivity with HDML 171
- Introduction 171
- HDML interaction basics 172
- Assigning actions to the Accept button 172
- Using the <ACTION> element 173
- Using the <A> element 176
- Using the DEST attribute 177
- User input cards 177
- CHOICE cards 178 ï ENTRY cards 179
- Controlling text entry 180
- Entering different types of data 182
- Using images 183
- About images 183 ï Placing images within HDML 183 ï Using icons 185
- Summary 185
- Using variables in HDML 186
- Introduction 186
- About variables in HDML 187
- Naming variables 188 ï Referencing variables 188
- Setting variables explicitly 189
- Using the <NODISPLAY> card 190
- Setting variables implicitly 191
- Using the CHOICE card 191 ï Using the ENTRY card 192
- Putting it all together 193
- The code 193 ï The result 194
- Sending variables to server-side programs 194
- Using the POST method 195 ï Using the GET method 195
- Summary 196
- Activities, bookmarks, cache, and access control 197
- Introduction 197
- How activities work 198
- Navigating between activities 199
- Using GOSUB 200 ï Using RETURN and CANCEL 200 ï Example: calling external applications 202 ï Example: providing help with activities 202
- Using variables in activities 203
- Using VARS 204 ï Using RETVALS 204 ï Using RECEIVE 205 ï Using CLEAR 205
- Bookmarks 205
- Disabling bookmarks 207
- Using the phoneís cache 207
- Using a cache to improve performance 208
- About access control 208
- How deck access works 209 ï Controlling deck access 209
- Summary 210
Wireless application design issues 211
- WAP design principles 213
- Design considerations 214
- The user 214 ï The device 215 ï The default phone 216
- Design goals and guidelines 217
- General design guidelines 218 ï Navigation guidelines 218 ï Text guidelines 219 ï Bookmark guidelines (Phone.com gateway only) 219 ï Image rules 220
- Softkey label guidelines 221
- Hyperlink guidelines 222
- Other rules 222
- Nokia browser considerations 224
- Summary 225
- Converting HDML to WML 227
- Introduction 227
- Things to keep in mind 228
- Syntax conventions 228
- Bookmarks 229
- Emulating HDML card types in WML 230
- Emulating actions 235
- Emulating HDML activities in standard WML 236
- Suggested strategy 236
- WML versus HDML quick reference 237
- Summary 242
Dynamic WAP applications with ASP 243
- Introduction to Microsoft Active Server Pages 245
- Overview of Microsoft Active Server Pages 245
- Browser independence 247 ï ASP support for non-Microsoft web servers 247
- Processing ASP documents 248
- Writing ASP scripts 248
- The ASP 3.0 object model 249
- Working with built-in ASP objects 250
- Retrieving values using the Request object 251 ï Displaying a message to the browser 252 ï Redirecting pages using Response 252 ï Buffering data using the Response object 253 ï Setting cookies using the Response object 254 ï Managing data caching using the Response object 255
- Enabling information-sharing using the Application object 257
- Setting application variables 257 ï Application.Lock and Application.Unlock methods 258 ï Scope of the application 259
- Maintaining state 260
- Setting session variables 260 ï Implementing sessions 261
- Using the Server object 262
- Server.Execute method 263 ï Server.Transfer method 263 ï Server.Transfer versus Response.Redirect 264
- Handling application and session events using the global.asa file 265
- Identifying a client type 266
- Request.ServerVariables collection 267
- Error handling in ASP 267
- ASPError object 269 ï ASPError.ASPDescription property 269
- Summary 270
- Database connectivity with ADO 271
- Database terminology 272
- Relationships 273
- Structured Query Language 274
- The Open Database Connectivity technology 275
- Components of ODBC 276 ï Setting up a data source name 277
- Object linking and embedding databases 280
- ActiveX Data Objects 282
- Database connection types 282 ï Cursors 283
- Database access using ASP 284
- Retrieving records from a database 284 ï Adding a record to a table 286 ï Updating a record 290 ï Deleting a record 291 ï Navigating records 292 ï Searching for a record 294 ï Displaying records across multiple pages 295
- Connection strings 299
- Migrating to a database server 299
- Changing the connection string 300
- Summary 302
- Using ASP to generate dynamic WAP content 303
- Introduction 303
- Creating a dynamic WAP application 304
- Testing using WAP emulators 305
- Step 1: editing an ASP document 305 ï Step 2: saving to the web-publishing directory 305 ï Step 3: using the emulators 307 ï Step 4: testing the look and feel 307
- Sending and retrieving data 309
- Passing values from client to server 309 ï Using the POST method 310 ï Using the GET method 310 ï A common pitfall using the GET method 311
- Retrieving values sent to the server 311
- Using the Request.Form collection 312
- Session support in WAP devices 312
- Using environment variables 313
- Detecting web and WAP browsers 314
- Detecting WAP devices 317
- Testing using a real handset 319
- Size constraints of WAP devices 320
- Controlling page caching 320
- Disabling caching 322 ï Caching on WAP gateways, proxy servers 323
- Summary 324
- Using ASP to implement data-based WAP applications 325
- Introduction 325
- Authentication by example 325
- Logging on 326 ï Authenticating the logon 327 ï Handling an invalid logon 328 ï Entering new account information 329 ï Creating an account 330
- Understanding mobile data entry 331
- Packaging records with the <select> element 331
- Record display by example 333
- Displaying records across multiple pages 334 ï Understanding the code 334
- Summary 337
- Troubleshooting your ASP/WAP application 338
- Errors and problems 338
- ASP script errors 339 ï MIME type errors 341 ï Emulator problems 343 ï Web server and gateway configuration problems 343 ï Logical errors 343 ï User interface issues 344 ï Detecting the user device 344 ï Memory problems 345 ï Redirection problems 346 ï Performance problems 346 ï WMLScript support 347 ï Cookies problem 348
- Summary 348
Dynamic WAP applications with Java technologies 349
- Introduction to Java servlets 351
- Overview of servlets 351
- What are servlets 352 ï Why servlets 352
- Software used for development 353
- Servlet framework 354
- Life cycle of a servlet 356
- Initializing a servlet 356 ï Servicing client requests 357 ï Termination 358
- Invocation of a servlet 358
- Handling requests with service methods 359
- Retrieving parameters from the client 360 ï Responding to the client 361 ï Generating dynamic HTML content 362
- Summary 365
- Database connectivity using JDBC 366
- Introduction 366
- Database connectivity APIs 367
- Types of JDBC drivers 367
- Basic tasks in database access 368
- Loading the JDBC driver 368 ï Establishing a connection to the database 368 ï Formulating and executing SQL statements 369
- Database-independent code 370
- Accessing properties using InputStream 371 ï Accessing properties using ResourceBundle 371
- Servlet example: library book search 372
- Creating the front end 372 ï Creating a data store for book information 373 ï Servlet for retrieving book information 374
- JDBC 2.0 features 378
- Summary 379
- Using Java servlets to generate dynamic WAP content 380
- Generating dynamic WAP content 380
- The role of the servlet 381
- Generating output to WAP clients 382
- Writing the response header information 382 ï Writing the response body 382 ï Creating a WAP application using a servlet 383 ï Viewing the result 384
- Invoking a Java servlet 385
- Calling a servlet from a card 385 ï Passing parameter values 387
- Processing client requests 388
- Retrieving header information 388 ï Retrieving parameter values 390 ï Understanding the code 391
- Summary 393
- Information tracking 395
- Introduction 395
- Cookie support in servlets 396
- Adding and retrieving cookies 396 ï The Cookie class 396
- Understanding cookies by example 397
- Creating a cookie 397 ï Retrieving a cookie 399
- Testing the example 401
- Invoking PutCookieServlet 401 ï Invoking GetCookieServlet 403
- Session support in servlets 404
- Understanding session management 405
- Overview of the shopping cart 405 ï Creating WML deck for selecting items 407 ï Displaying an empty-cart message 407 ï Creating the servlet 408
- A shopping cart example 412
- Selecting items 412 ï Viewing servlet results 412 ï Navigating from the acknowledgement screen 413 ï Navigating from the confirmation screen 414
- Summary 414
- Using Java servlets to implement database access 415
- Introduction 415
- Overview of the book inquiry system 416
- System requirements 416 ï Program components 417 ï LIBRARY database 417
- Creating the static WML decks 418
- Creating the servlet 421
- The doPost() method 422 ï Database programming issues 425 ï The bookDetails() method 426 ï The displayTitles() method 429 ï Good practices and common pitfalls 431
- A book inquiry example 432
- Summary 435
- Introduction to JavaServer Pages 436
- Introduction 436
- How JSP works 437
- A JSP example 437
- Resources for running JSP 437 ï Example code 437 ï Running the example 438 ï Understanding the example 439
- JSP container tags 440
- JSP implicit objects 441
- JSP standard actions 442
- Server-side error troubleshooting 443
- Compilation error 443 ï Run-time error 444
- Summary 446
- Developing email applications using Java 447
- Introduction 447
- What is an email message? 448
- Overview of email protocols 449
- Introduction to JavaMail 450
- JavaMail architecture 450 ï JavaBeans activation framework 451 ï JavaMail classes and interfaces 452 ï JavaMail exceptions 453
- Using JavaMail 454
- Establishing a session with an email server 454 ï Composing and sending email messages 455 ï Retrieving email messages 456 ï Deleting email messages 459
- JavaServer Pages 459
- Sample WAP email application 461
- Architecture of WAP email system 461 ï Sample application design 462 ï JSP component 464 ï Servlet component 468 ï Email Facade 471 ï Enhancements to sample application 474
- Advanced WAP messaging technologies 474
- Naming and directory services 475 ï Asynchronous notification of new messages 476 ï Email configuration 478 ï Unified communications 478 ï Security 479 ï Future direction 480
- Summary 482
Transforming XML into wireless formats 483
- Introduction to XML, XPath, and XSLT 485
- Introduction 485
- Transformations 486
- What is XML? 488
- Understanding XML markup 488 ï XML elements 492 ï Document type definition 495
- What is XPath? 502
- XPath data model 503 ï XPath expressions 504 ï XPath functions 508
- What is XSLT? 511
- XSLT template rules 513 ï Generating text: the xsl:value-of element 516 ï Repetition: the xsl:for-each element 516 ï Conditional processing: the xsl:if and xsl:choose elements 516
- Simple XSLT style sheet example 517
- The input document 518 ï The style sheet 519 ï How XML documents and XSL style sheets work together 521
- Summary 522
- XML parsers and XSLT processors 524
- Introduction 524
- XML parsers 525
- About DOM and SAX 526 ï Microsoft XML parser 533 ï Xerces XML parser 533
- XSLT processors 535
- Microsoft XSLT processor 536 ï Xalan XSLT processor 537
- How XML parsers and XSLT processors work together 539
- A sample transformation: XML to HTML 541
- MSXML and ASP 541 ï Xalan and Java 544
- Tracing the transformation process 546
- Tracing with Xalan 546 ï Tracing style sheet execution 547
- Static versus dynamic transformations 550
- Compiled style sheets 551
- Summary 553
- Implementing transformations 554
- Introduction 554
- Transformation to HDML using MSXML/ASP 555
- Setting up a development environment 555 ï Understanding the product catalog 555 ï Designing the presentation 557 ï HDML elements 559 ï Defining the XSLT style sheet 560 ï Running the transform 565
- Transformation to WML using Java 568
- Setting up a development environment 569 ï Understanding the movie list 569 ï Designing the presentation 571 ï WML elements 573 ï Defining the XSLT style sheet 573 ï Running the transform 580
- Transformation to VoiceXML using Java 585
- An introduction to VoiceXML 586 ï A sample VoiceXML document 588 ï Setting up a development environment 589 ï Understanding the movie list 589 ï Designing the presentation 591 ï VoiceXML elements 593 ï Defining the XSLT style sheet 593 ï Introduction to TellMe Studio 600 ï Running the transform 602 ï Testing the application 604
- Summary 608
Setting up a testing environment 609
- Using WAP gateways 611
- Introduction 611
- WAP architecture revisited 612
- Emulator versus gateway 613
- Running your own gateway 614
- Preparing to run a WAP gateway 614
- WAPlite 616
- Installing WAPlite 617 ï Starting WAPlite 617 ï Connecting to WAPlite using an emulator 619 ï Enabling cookie support in WAPlite 622
- Nokia WAP Server 624
- Downloading and installing the Nokia WAP Server 624 ï Starting Nokia WAP Server 625 ï Connecting using an emulator 626 ï Monitoring traffic 626 ï Converting HTML and text to WML 628
- Hosting versus subscribing to WAP gateway 632
- Deploying WAP gateway 633
- Security of WAP-based systems 634
- Cryptography 636 ï Digital certificates 637 ï Security in traditional communications 641 ï Security in WAP client-server communications 643
- Summary 645
- Configuring WAP devices 646
- Introduction 646
- Ericsson R320 647
- Configuring Ericsson R320 for WAP services 647 ï Loading a WML deck 648 ï Options available during browsing 649
- Ericsson R380 649
- Configuring Ericsson R380 for WAP services 650 ï Loading a WML deck 652
- Siemens S35 654
- Configuring for WAP services 654 ï Loading a WML deck 655 ï Setting a home page 655
- General tips on testing 655
- Handling entry of long URLs 655 ï Connecting WAP devices to gateways 656
- Summary 657
Case studies 659
- Mobile inventory and ordering system 661
- Introduction 661
- Setup 662
- Why use Microsoft Access? 662
- Database structure 663
- Table structure 663
- System flow diagram 664
- Welcome deck 666 ï The login deck 667 ï Authenticating the staff login 668 ï Performing the search 671 ï Displaying the book cover 674 ï Displaying detailed information 675 ï Viewing reservation information 680 ï Viewing detailed reservation information 681
- Converting image files using a WBMP converter 684
- Image types supported by pic2wbmp converter 685 ï Converting an image 685 ï Adjusting the size of the image 687 ï Saving the WBMP file 687
- Summary 688
- Mobile library system 689
- Introduction 689
- System design 690
- Searching for a book 691 ï Renewing a book 692 ï Contacting administrator for interlibrary loan 693
- Setup 693
- Library database 693
- Database structure 694 ï Table structure and contents 694
- Code of the example 696
- Database properties file 696 ï The welcome deck 696 ï The login deck 697 ï Authenticating user login 698 ï The main menu deck 701 ï Searching by title 704 ï Display-not-found and too-many-matches messages 712 ï Reserving a book 713 ï invalidPW.wml and rsrvSuccess.wml 719 ï Renewing books based on ISBN 720 ï Interlibrary book loans 722
- Summary 727
Appendices 729
 
appendix A WML elements 731
appendix B WMLScript function libraries 752
appendix C HDML reference 777
appendix D Setting up PWS and IIS 793
appendix E HTTP/1.1 request and response headers 811
appendix F Java servlet packages 823
references 835
index 837
DESCRIPTION
Note: Because the book is nearly 900 pages, there is a special shipping/handling charge of $8 per copy for U.S. customers, $25 per copy for non-U.S. customers.
This comprehensive guide provides developers with the necessary skills to develop WAP applications and build dynamic Web sites for wireless use. Dynamic WAP Application Development first introduces the Wireless Application Protocol (WAP) and offers an in-depth explanation of the prominent wireless languages.
The authors begin with HDML (Handheld Device Markup Language), the first wireless language and one still supported by many Internet-enabled phones in the United States. They next cover WML (Wireless Markup Language), the XML-based successor to HDML that is supported by most phones worldwide. The third language described is WMLScript, the client-side scripting language of the wireless world that enables the developer to include procedure logic within their WML markup. In addition to hands-on practice with each of these languages, the book examines the issues involved in wireless application design and in converting HDML documents into WML.
The book also provides an overview of Microsoft Active Server Pages (ASP) and Java Servlets, and guides developers through the process of creating dynamic WAP applications using these server-side technologies.
Application design specific to the small display and limited memory capacity of wireless phones is also covered. Advanced topics include security, performance, and the intricacies of WAP gateways. The book also includes robust case studies that put WAP concepts into practice.
This book is geared for developers who are called upon to extend existing Web services to wireless phone subscribers and for those who need to understand the resources involved in the development and deployment of WAP applications.
Translation rights for Dynamic WAP Application Development have been granted for Brazil. If you are interested in learning where to buy this book in a language other than English, please inquire at your local bookseller.
ABOUT THE AUTHORS...
Soo Mee Foo has a Master's degree in Computer Science with specialization in parallel programming and artificial intelligence. She also conducts workshops on Web and WAP application development to IT professionals. She lives in Singapore, where she is a lecturer at a polytechnic.
Christopher Hoover manages platform technologies for Openwave Systems, Inc., an industry leader in wireless web technology and co-founder of the WAP forum. He currently resides in San Francisco.
Wei Meng Lee has a Computer Science degree from the National University of Singapore. His interest is in web technologies and he conducts training for Visual Basic and web developers. He lives in Singapore.

