Welcome!

You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article

Developing Wireless Apps with ColdFusion Pt. 1

Developing Wireless Apps with ColdFusion Pt. 1

There's a growing buzz around the world of wireless Web applications, that is, Web sites accessible to phones and other wireless devices. You may have read that in ColdFusion 4.5 Allaire added support for something called WAP (Wireless Access Protocol).

It's the core of a powerful (and surprisingly easy) approach to creating applications for phones, pagers, two-way radios and more.

Perhaps you're wondering how all that works and whether you should jump on the bandwagon. How do you get started? How do you make it work in ColdFusion? What version of CF do you need? Are all wireless phones alike? What are the programming challenges of things such as browser detection, error handling, security and session management?

In this series of articles I hope to lay a foundation of principles and understanding to determine if and how you should go about developing wireless applications in ColdFusion. It's easy to do, but there are quite a few sources of confusion, so don't be surprised if your first attempts to look into it leave you wondering.

Much of the information in these articles is excerpted from my chapter on developing dynamic WAP applications using CF from the upcoming book, Professional WAP Programming (Wrox Press), which will already be out by the time you read this.

In this article, however, I'll lay some groundwork that I didn't get to address in that chapter (since mine was a later chapter in the book, and other writers addressed general WAP issues prior to it). I'll also share some of my own take on the state of affairs revolving around WAP application development.

First I want to address the question of if and how you should get started with WAP programming. I'll also introduce the challenges of converting an existing site to be supported on wireless devices.

More important, I'll show you how to create and begin testing WAP applications even if you don't have a wireless phone so you can at least get started.

I'll also identify some resources for learning more on your own.

In the remaining articles in this series, I'll address the specifics of doing WAP development in ColdFusion and those challenging programming issues I mentioned above.

Building on Previous Articles
This article builds on two previous ones that appeared in ColdFusion Developer's Journal.

In the December issue (Vol. 1, issue 6) the illustrious Ben Forta wrote "No Strings Attached," a great introductory article on WAP and WAP programming. He laid out some of the foundation principles of WAP and showed some basic WML (Wireless Markup Language) code. You can find it online at www1.sys-con.com/coldfusion/archives/0106/forta/index.html.

In the April issue (Vol. 2, issue 4) Paul Elisii wrote an excellent article entitled "ColdFusion in the Palm of Your Hand" ( www.sys-con.com/coldfusion/archives/0204/elisii/index.html). His focus was developing wireless applications for the Palm computing platform (PalmPilots and related devices). As he indicated, the "Web clipping" approach he described is limited to those devices, and he mentioned WAP as a competing standard typically found in wireless phones.

I recommend that you read both as a precursor to this article to get a taste of the WML language and to tide you over until next month when I'll begin showing some substantial examples and solutions.

Wireless Application Protocol
WAP-enabled phones are increasingly common; many if not most newly manufactured mobile phones now support the protocol.

The "wireless Web," as many phone companies call it, will open a whole new world for accessing information on the Web in a timely and succinct manner (and, again, on more than just phones).

The best news of all (for readers of this magazine) is that you can use ColdFusion to create and drive such wireless Web sites, so it also opens up huge opportunities for those willing to invest a little time in learning about WAP and the WML language.

Created as an open protocol managed by the independent WAP Forum ( www.wapforum.org), WAP is similar to - and in fact works in conjunction with - HTTP. The WML language is similar to HTML, but different enough so you really need to learn more than just the differences in syntax.

Developing for wireless devices really requires a new conception of what (and how much) to present to users and how to enable them to traverse the "site" you're offering. Of course, the limited display interface is the most obvious challenge, but data entry is also extremely challenging on those simple keypads (see Figure 1).

Don't let the minimal screen and features of the phone scare you away. With clever design, many powerful applications can leverage the ubiquity and flexibility - and indeed the minimalist interfaces - of these phones.

WML is easy to learn and should help wireless application development take off, much like Web page development did with the ease of learning and developing in HTML.

Slow Uptake of WAP Phones
Still, there will inevitably be those who will point to articles and press releases foretelling the doom of WML, and to the slow uptake of WAP phones, especially in the U.S. They're actually quite popular in Europe, Australia and Asia (in Japan there's also another wireless protocol growing in popularity, called iMode).

WAP phones and wireless Web services aren't yet taking the world by storm for a few reasons. I think it's just a matter of time, but these problems are indeed a stumbling block to broader reception in the near term. Should you wait? I don't think so. As I'll explain here, much of the consternation comes from simple confusion about the new technology. However, it won't take long for these problems to be overcome.

First, most phone service providers charge extra to access the wireless Web, but, fortunately, many are now letting it simply count against your talk-time minutes.

A considerable source of confusion (for users and information providers debating whether to "go wireless") is the limited number of sites listed on the front of the phones by default (as shown in Figure 1). If you're not listed there, how are people going to know about your site, let alone visit?

This is similar to the default portals that show up for users who install new copies of IE or Netscape. Novice users think "the Web" is only what's listed on Microsoft's MSN or Netscape's NetCenter sites. But we know those sites are simply ones that have established relationships with Microsoft or Netscape, enabling them to be listed there.

While most users know (or soon learn) they can type in any Web address (URL) on their browsers, many wireless phone users face a greater challenge when doing so. First, they need to know they can type in any address (it's usually buried in a menu system). Then they need to type it in laboriously using the phone's limited keyboard (shortened domain name aliases are becoming popular for many well-known sites).

More important, users need to know that the sites they're interested in (from broadly popular ones to those focused on some specific interest, or even an intranet) are available for wireless browsing. Many of the more popular sites are now creating wireless versions of their sites (often using the same URL but detecting and redirecting wireless visitors to a separate, WML-enabled section, as we'll discuss later). Like the introduction of a new "traditional" Web site, promotion and marketing of a "wireless" site is critical.

Finally, many users (and, again, potential information providers) are under the false impression that the wireless Web is merely about presenting mini versions of existing Web sites. While it's conceptually true, the wireless Web is actually about creating an entirely new class of applications suited to the smaller screen and, more important, leveraging the "always on, always at hand" nature of the phone.

Creating wireless apps is about rethinking what your users need, and either building modified versions of your existing applications to serve their unique needs or seeing the opportunity to create an entirely new application for wireless visitors.

In many ways this is like the early days of the Web - a lot of confusion, some hemming and hawing, and plenty of opportunity for early movers. Early adopters often get a bit bloodied, but in this case the significant similarity to HTML makes an investment of time and energy in WML seem very worthwhile, yet relatively inexpensive. It's really easy to get started. So let's do it.

Visiting (or Creating) a WML Site
Wireless Web sites (developed with WML) can't be viewed (yet) in normal HTML browsers. To do wireless development - or simply to visit some sites to get an idea of how things work - you don't need to have access to a wireless phone. If you do have access, great (though not all phones are created equal - more on that in a moment).

If you don't have a wireless phone, don't despair. Just head over to www.phone.com (the makers of the UP.browser, which is at the heart of many WAP-enabled phones). They have a simulator you can install on your workstation that presents a life-like replica of a phone (see Figure 1, taken from the simulator) that allows you to enter the URL of any site, whether on your local workstation or on any site on the network (Internet or intranet).

To get the free simulator (what they call the UP.SDK or software developer kit) you'll need to register (again free) on their developer site. It's painless (and doesn't seem to lead to a lot of junk mail, etc.) and a link is clearly offered on their Web site.

The term SDK is a bit of a misnomer. It conjures up the notion of APIs you need to learn, installable libraries you need to compile and "distributions" you need to keep up with. In this case it's a simple, single-installation program that loads the simulator and a couple of related programs onto your workstation.

The SDK also installs some excellent documentation, including getting started, tutorial and reference guides for both WML and the phone (as well as WMLScript, discussed later).

The phone.com developer site has additional resources for learning more, including a technical library, a training program and even alternative "skins" to make the simulator look like your favorite phone.

Once you install and start the simulator, it'll load the page shown in Figure 1 (if you're connected to the Internet). From there you can browse the sites offered (which include some interesting how-to's, examples and links to real WAP-enabled sites).

You can also visit sites of your own choosing. On a real phone you'd have to find the menu command that allows you to enter the URL using the keypad (did I say how annoying that is?). Fortunately, in the simulator you can simply type in a URL with your keyboard using the top GO line of the simulator window (not shown in Figure 1, but obvious in the simulator). Again, you can enter any valid URL to open a WAP-enabled Web site, whether local or on the Internet. (I should add that users of real phones can usually bookmark a site address that they've "typed" in, saving them from frustration in future visits.)

Other WAP Phones and Simulators
While the phone.com simulator and the UP.Phone browser included in many (if not most) wireless phones are very popular, they're not the only game in town. Sadly, like the challenges of different browsers in the early days of the Web (which still haunt us today), multiple WAP-enabled browsers are used to power phones and alternative simulators for those WAP browsers.

Nokia, a prominent wireless phone manufacturer, has their own embedded phone browser and simulator. While also based on WAP, it may process a page differently than a phone.com driven phone or simulator. Part of the problem is that the phone.com browser (in the phones and the simulator) allows for extensions to the WML language, just as Netscape extended HTML early on.

The formal specification (or DTD, Document Type Definition) for WML is laid out by the WAP Forum. If you rely solely on the phone.com simulator or a phone.com-driven phone for your testing and development, you run the risk of creating code that won't run in all phones. This is a reality. Many phones do embed the phone.com browser. However, it's up to you to decide what level of effort you want to expend on avoiding browser-specific WML and testing on multiple phones and simulators.

For early testing (rather than full-blown production rollout), it may be safe to let this issue slide while the industry sorts out these challenges. (Phone.com offers a 16-page white paper addressing this very issue of compatibility and standards integration. See www.phone.com/pub/IOTWP_0400.pdf.)

Next Issue, and Learning More in the Meantime
We're out of time and space. In the next issue I'll show you how to create WML applications in ColdFusion. It's really very easy. Remember that Ben Forta's December article shows the basics: the CFCONTENT tag and the special value needed for its "type" attribute, some simple WML code, issues such as case sensitivity of WML and more.

To learn more about WML and WAP, see the phone.com (or Nokia) documentation. Links to both are offered at a new developer area "reference desk" on the subject of WAP, available on the Allaire site at www.allaire.com/developer/TechnologyReference/wap.cfm.

Ben Forta recently took part in an interesting Q&A session on WAP and CF directions, available at www.allaire.com/handlers/index.cfm?id=15970&method=full.

In future articles I'll provide more substantial examples of WML development in ColdFusion. I'll also share information on some important items that will inevitably arise as you begin developing WML applications. I'll continue the discussion by identifying several tricks and traps to be aware of as you pursue this technology.

It's ever evolving, as is Allaire's support for it. It's an exciting time, and I hope you enjoy the ride!

More Stories By Charlie Arehart

A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
High-velocity engineering teams are applying not only continuous delivery processes, but also lessons in experimentation from established leaders like Amazon, Netflix, and Facebook. These companies have made experimentation a foundation for their release processes, allowing them to try out major feature releases and redesigns within smaller groups before making them broadly available. In his session at 21st Cloud Expo, Brian Lucas, Senior Staff Engineer at Optimizely, will discuss how by using...
In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
Organizations do not need a Big Data strategy; they need a business strategy that incorporates Big Data. Most organizations lack a road map for using Big Data to optimize key business processes, deliver a differentiated customer experience, or uncover new business opportunities. They do not understand what’s possible with respect to integrating Big Data into the business model.
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, will discuss how they b...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
Amazon is pursuing new markets and disrupting industries at an incredible pace. Almost every industry seems to be in its crosshairs. Companies and industries that once thought they were safe are now worried about being “Amazoned.”. The new watch word should be “Be afraid. Be very afraid.” In his session 21st Cloud Expo, Chris Kocher, a co-founder of Grey Heron, will address questions such as: What new areas is Amazon disrupting? How are they doing this? Where are they likely to go? What are th...
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...