Page 189 - DCAP512_WAP_AND_WML
P. 189

Unit 13: Writing for HTML and WML




              WML is part of the WAP standard and its use is required.                         Notes
              Transmission of WML (WMLC) documents requires less bandwidth compared to HTML
               documents because WML documents are simpler and WML is compressed before it is sent
               to the WAP device.
              Compared to HTML documents, displaying WML documents requires less processing
               power and memory. Consequently, a WAP device can work with a less powerful (cheaper)
               CPU and the use of less power means that the battery can operate longer without recharging.
              WML provides support for limited graphics with a limited gray scale.

          Is WML A Programming Language?

          Most software developers agree that HTML (by itself, without  JavaScript) is only a markup
          language and not a true programming language. HTML lacks variable assignments, control
          flow statements, and conditionals. WML, however, is much closer to a programming language
          if not squarely in that camp.
          WML supports variables. The <setvar> tag assigns a value to an alphanumeric name as follows:
                 <setvar name=”index” value=”1">

          Accessing a variable in WML is similar to Perl:
                 <a href=”page_$(index).wml”>Next page</a>
          WML supports control flow through tasks. It also supports events including timer events with
          the <timer>  tag. These  features make  things like  form validation in the  browser easier  for
          developers  to implement in WML  than HTML. Validating form data in the browser saves
          bandwidth over the alternative of sending data to the server for validation.

          13.2 Difference between HTML and WML

          WML (Wireless Markup Language) and HTML (Hypertext Markup Language) are markup languages,
          the main function of which is to serve content from web sites. The main difference between WML
          and HTML is the target devices that they aim to serve. HTML was created to serve content to desktop
          computers, which have a lot of processing power to spare in parsing and rendering the content.
          When the internet began to expand to mobile phones, it became very apparent that mobile phones
          do not have the processing power, screen size, and color range to actually work with HTML. Thus,
          WML was created as an alternative to HTML in serving web content to mobile phones.




              Task  Like HTML, WML does specify how the content is to be displayed. Analyze
          WML is very limited with the things that it can do. This is necessary in order to simplify the flow
          of the page and to minimize the amount of processing needed in rendering the page. It is also
          not beneficial to include many or large images into a WML page as it would probably not be
          discernable on the very small screens of mobile phones. On the other hand, HTML is quite full
          featured, even in its earlier versions. Coders can place multiple images, animations, frames,
          tables, and a whole lot  more to their pages. Compared to  other tasks done with computers,
          rendering web pages is relatively very simple and would not load the processor too much.
          As technology evolves, computers and mobile phones are also getting better and better. Color
          and high resolution screens become more and more common in mobile phones; especially with
          smartphones. This improvement means that more phones are able to process HTML pages. The




                                           LOVELY PROFESSIONAL UNIVERSITY                                   183
   184   185   186   187   188   189   190   191   192   193   194