Home arrow Web Services arrow Page 2 - WML: An Introduction
WEB SERVICES

WML: An Introduction


Full-house, Go-Fish, and Blackjack – some of my favorite games to play when I’m with friends. Alright, maybe that’s not true, but they’re definitely a way to pass the time. The words “deck” and “card” are synonymous to playing cards.  However, they are also the terms used when developing WAP-enabled websites using WML.  In this tutorial, I’ll give a breakdown on just what WAP and WML are and how they can be used.  We’ll also run through creating a simple WAP-enabled site making use of multiple cards in a deck.  There will be ample code to get you started on developing your own WAP-enabled site, whether for fun or for business.

Author Info:
By: Frank Manno
Rating: 5 stars5 stars5 stars5 stars5 stars / 23
February 11, 2004
TABLE OF CONTENTS:
  1. · WML: An Introduction
  2. · Deal 'Em, Baby!
  3. · Shuffle That Deck
  4. · Would You Like My Special Offer
  5. · Welcome Aboard!
  6. · Wrap It Up

print this article
SEARCH DEVARTICLES

WML: An Introduction - Deal 'Em, Baby!
(Page 2 of 6 )

We’ll start by building a simple deck of cards. Remember, a deck is simply a group of WML cards. It’s that simple.



<?xml version=&quot;1.0&quot;? >

<!DOCTYPE wml PUBLIC &quot;-//OPENWAVE.COM//DTD WML 1.3//EN&quot; &quot;http://www.openwave.com/dtd/wml13.dtd&quot;></p>
<p> </p>
<
p><!-- WML file created by the Openwave SDK -->



</p>
<
p><wml>

 
<card title=&quot;Home Card&quotid=&quot;home&quot;>

  
<big>Our First Card</big>

  
<p>Welcome to our first WAP-enabled page.  We're using WML1.3 to construct this deck of cards!</p>

  <p>Here'
s a 

 
</card>

</wml>


In the example above, we created a simple single-card deck that, when executed, will display a welcome message to our device.  As you can see, WML is very similar to HTML – most WML tags are derived from HTML.  We open our document with an XML declaration, followed by the location to the DTD we’ll be modeling our page after.  If you’re unfamiliar with XML documents and/or DTDs, feel free to read one of our XML tutorials. Next, we open our deck using the <wml> tag.  To create our card, we use the <card> tag, and simply make use of a couple of HTML tags, including the <big> tag to increase the font size, as well as our standard paragraph (<p>) tag.

Here’s what the output would look like:

WML & WAP

In case you’re wondering what type of cell phone I’m using, I’ll take this time to introduce a development environment suited for WML: Openwave SDK.  Openwave is a company providing open software products and services for the mobile market.  Here’s a snip from their website:

"Openwave products include phone software, multimedia messaging, Email, location, device management and mobile gateways. As one of the foremost innovators and market leaders in the mobile field, Openwave has gained worldwide experience and deep industry expertise.

"Openwave leverages that expertise through a set of strategic and operational services. Our broad product portfolio and industry experience combine to make operators and device manufacturers successful by improving the end user experience."

Openwave SDK is a free download and is a great tool for developing WML-based sites.  The SDK comes with various emulators, each with their own set of features, allowing you to test your sites on various phones.


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials