The previous two chapters described some of the features found in WML that don’t exist in HTML. This chapter covers the features that WML provides to receive input from the user, and most of these are much more powerful than their equivalents in HTML.
Using HTML forms for this purpose suffers from one major problem: the processing has to be done on the server. The client displays the controls, collects their results, packages them, and sends them to the server, but that’s it. Apart from some simple constraints such as the maximum length of the text in an input box, you can’t even check the input for validity before sending it off. This results in a lot of extra network connections, slowing things down a lot, even on a fast Internet link. Imagine how slow all those extra network connections are on a much slower link, as WAP has to contend with.
Another, subtler problem with the Web’s way of doing these things is that there are multiple ways to declare the controls. Suppose you want to display a text input box. Using a form, you can use something like:
<INPUT TYPE="TEXT" NAME="wibble">
<INPUT TYPE="TEXT" NAME="wibble" ONCHANGE="wibble_chg( );">
If using Java applets, something like:
TextField wibble = new TextField ( ); add (wibble);
Each of these fragments has to be referenced in a completely different way from within the HTML page that forms the skeleton. Furthermore, the same control has to be added to the page in three different ways, even though they are all drawn in the same way by the browser, and the user interacts with each in the same way. This makes it hard to change the action of a control once it has been implemented. It requires rewriting everything related to that control, and probably restructuring the whole page as well.
 It isn’t completely fair to compare Java with HTML here, since Java is a full-featured programming language, and HTML is just a markup language. But since Java is often used to implement this sort of thing on web pages, it’s appropriate to mention it here.