Wireless Markup Language (WML) is a markup language that is based on HTML and HDML. It’s an XML document type that’s been specified. It’s a markup language for creating mobile-friendly webpages. Wireless device limits, such as small display screens, limited memory, poor transmission bandwidth, and limited resources, must be considered while designing with WML. WAP (Wireless Application Protocol) sites differ from standard HTML sites in that they are monochromatic (just black and white), brief, and have a small screen space, limiting the material on WAP sites to only the most important information, similar to how telegraphs worked in the past.
The metaphor used by WML is that of a deck of cards. A WML document can be thought of as a collection of cards. A WAP site has several cards, similar to how cards can be gathered to form a deck. One card will be displayed on the screen at a time, similar to how one page of an HTML website is displayed at a time. A WML document can include many cards, and the WML deck is recognized by a URL. The user can navigate to the deck using the WML browser, which will fetch the deck as needed.
WML has the following features:
- Text and Illustrations: WML provides information about how text and graphics should be delivered to the user. The user determines the final presentation. The images must be in WBMP format and be monochrome.
- Interaction with the user: WML supports a variety of input components, including a password entry field, an option picker, and a text entry control. The user has the option of using keyboard or voice input.
- WML provides hyperlink navigation as well as browsing history.
- Management of Context: The state can be shared between decks and saved between decks as well.
- WAE (Wireless Application Environment), which comprises of WML and the WML scripting language, is the uppermost layer in the WAP (Wireless Application Protocol) architecture.
- Wireless Markup Language (WML) is an acronym for Wireless Markup Language.
- WML is an XML application that is specified in a document-type declaration.
- WML is a modified version of HDML that can be compared to HTML.
- WML takes care of the small screen and low transmission bandwidth.
- The WAP specification defines WML as a markup language.
- WAP sites use the WML markup language, whereas online pages use HTML.
- WML is a markup language that is extremely similar to HTML. Both are written in plain text style and employ tags.
When a web application is used in a mobile and wireless environment, it encounters the following issues:
Hypertext Transfer Protocol:
Delay and bandwidth:
HTTP was not designed with low bandwidth and high latency in mind. Because HTTP is uncompressed and stateless, its protocol headers are extensive and redundant.
Client firms cannot gain feedback if a cache is placed between a server and a client, so content providers block caching. Because HTTP is stateless, users are subjected to downloading the same content from the server many times.
Sending content from a client to a server will cause further issues if the client is currently disconnected.
HTML was created with the intention of being used to create content for World Wide Web webpages (www). Initially, it was only intended for desktop use. As a result, when used in hand-held devices, the following issues arise:
- The display is small and the resolution is low.
- User Interfaces that are limited.
- CPU with low performance.
- HTML has to be improved for use in wireless environments:
- Image resizing
Transformation of Content:
Because PDF and PPS documents take up more memory, they should be converted to plain text.
Extraction of Content:
To avoid lengthy wait times, some content from the document, such as headlines, can be removed and given to the user. This allows the user to select which information should be downloaded separately. HTTP needs to be improved for use in wireless environments:
Reuse of a connection:
The same TCP (Transmission Control Protocol) connection can be utilised by the client and server for multiple requests and responses. Pipelining is a technique that can be used to boost productivity.
Enhancements to Caching:
To reduce response time and bandwidth for subsequent responses, a cache could store cacheable responses. Using a client proxy, caching can be done in the mobile client’s web browser. On the network side, a network proxy might be employed.
Optimization of Bandwidth:
Compression is supported via HTTP, which also negotiates compression parameters and compression styles. Partial transmissions will be possible as a result of this.
Versions of WML:
WAP Forum has released WAP 2.0, the most recent version. XHTML Mobile Profile is the markup language described in WAP 2.0. (MP). The WML MP is a subset of the XHTML markup language. Along with XHTML MP, a style sheet named WCSS (WAP CSS) was released. CSS2 has a subset called WCSS.
WAP 2.0 is supported by the majority of modern mobile phone models. WAP 2.0-enabled mobile devices may display both XHTML MP and WML documents because it is backward compatible with WAP 1.x.
WML 1.x is an older version of the technology. However, this does not rule out the possibility of it being useful, as many wireless devices that only support WML 1.x are still in use.
WML 2.0 is the most recent version, and it was built for backward compatibility. As a result, WAP site developers do not need to be concerned about WML 2.0.
WML Cards and Decks:
A key distinction between HTML and WML is that in HTML, the basic unit of navigation is a page, whereas in WML, it is a card. A deck of cards can be created from multiple WML files.
When a mobile phone accesses a WML page, the WAP server downloads all of the cards on the page.
Because the file containing the deck is already stored on the wireless device, the mobile browser does not need to send any queries to the server if the user moves to another card from the same deck.
A card can contain links, text, photos, input forms, option boxes, and a variety of other elements.
WML Program Structure:
Following is the basic structure of a WML program:
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN"
<card id="one" title="First Card">
This is the first card in the deck
<card id="two" title="Second Card">
Ths is the second card in the deck
This text’s first line declares that it is an XML document with a version of 1.0. The second line selects the document type and provides the URL for the definition of that document type (DTD).
As illustrated above, one WML deck (i.e. page) can have one or more cards. In the next chapter, we’ll go through the WML document structure in great depth.
Text cannot be contained directly in the card>…/card> tag pair, unlike HTML 4.01 Transitional. As a result, as demonstrated above, you must place content inside p>…/p>.
Considerations for WAP Site Design:
The size of wireless devices’ screens and keypads restricts their functionality. As a result, when creating a WAP site, it’s critical to keep this in mind.
When creating a WAP site, it’s important to keep things basic and straightforward. It’s important to remember that there are no typical microbrowser behaviours and that the data link may be slow, at roughly 10Kbps. However, depending on where you are, this may not be the case for long with GPRS, EDGE, and UMTS.
The following are some common design guidelines to bear in mind when creating a service:
Keep WML cards and photos to 1.5KB or less.
Keep content succinct and meaningful, and precode alternatives as much as possible to reduce the arduous experience of user data entering.
Keep URLs short and simple to remember.
Reduce the number of menu levels to avoid people getting lost and the system slowing down.
Use common layout tags like big> and b>, and organise your data properly.
Don’t go overboard with visuals because some target devices may not be able to handle them.
WML vs. HTML comparison:
- WML is only supported by WAP hosts that accept WML and is only used for WAP sites on mobile phones. Any web server can host HTML files.
- Unlike HTML sites, WML sites are monochrome.
- Although coding is similar in many ways, a badly coded WAP site will not run as well as a badly coded HTML one.
- In contrast to the more permissive HTML coding, all WML tags must be closed.
- In WML, there are no alignment tags like there are in HTML. Instead, in WML, must be used to align text.
- When utilising archaic HTML tags with no closing tag, such as br>, there are issues. In WML, several tags, such as br />, include a “/” at the end to get around this.
- In WML, only monochrome photos in the WBMP format are supported, although HTML has no such constraint.
What are the Benefits of Using WML?
WML, like HTML, is simple to use. In the context of wireless, however, WML provides the following advantages over HTML:
- WML is a mandatory component of the WAP standard.
- Because WML documents are simpler and WML is compressed before being delivered to the WAP device, transmission of WML (WMLC) documents uses less bandwidth than HTML pages.
- Displaying WML pages takes less processing power and memory than HTML documents. As a result, a WAP device can employ a less powerful (cheaper) CPU, and using less power means the battery can last longer between charges.
- Limited graphics with a limited grey scale are supported by WML.
What are some of WML’s drawbacks?
- WML, like HTML, specifies how the content should be displayed. As a result, WML content may appear differently in different micro browsers on different WAP devices.
- Large decks will not be accepted by WAP devices such as WAP phones (1.4K for some WAP phones).
- WAP phones, for example, come in a variety of shapes and sizes. Different screen sizes, keypads, and soft keys are available. As a result, WML decks should be tested on the most common WAP devices. This variation is analogous to the differences between Web browsers and platforms. Because there are many more WAP devices than Web browsers and platforms, the challenge is more difficult in the case of WML.
While keeping backward compatibility, WAP 2 answers the complaints of the bulk of WAP opponents. Although there is still a lot that is unique to the wireless Web, WML 2 allows you to create wireless content that can be presented directly in Web browsers. Other wireless Web standards are likely to follow a similar evolutionary path—in fact, I-Mode has already declared that its cHTML markup language will be replaced by XHTML Basic. It’s unclear whether this “march to the centre” will help WAP achieve its goal of becoming the global wireless Web standard.