<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card>
<p><b>2: Setting up a development environment</b></p>
<p>Writing code for a WAP-portal is easy. It's mostly just a cut down-version version of HTML, depending on the version of WAP being targeted there might be more or less features for one to work with. There's also scripting, I didn't touch any of it but it's there. If you now save your code in the correct </p><p>
 // .wml //
</p>
<p>---<br /></p>
<p> file format, you can just chuck it onto an nginx server and It'll automatically set the correct </p><p>
 // text/vnd.wap.wml //
</p>
<p>---<br /></p>
<p> content-type when sending it to the client over http. Apache probably does that too, but I haven't tried that.</p><p>
After you did all that and access the thing in a modern browser, this is what you get:
</p>
<p><img src="3ee06abc-2737-4904-8204-fc0a70f7dcf3_img/wap_in_firefox.png.wbmp" alt="A screenshot of firefox showing some code that looks like HTML with light text on a dark background." /></p>
<p>
Desktop browsers don't support WAP. Or ever did, as far as I know.
</p>
<p>---<br /></p>
<p>
To be able to view a Wapsite you either need a device that supports wap or an emulator. There are some recommendations in Maartjes getting started guide. Most of them suck (which is also mentioned in the guide).
</p>
<p>
I ended up using M3Gate 0.3 with IE5 as well as Openwave SDK 6.22 running on a Windows 2000 VM. I also tried to get the Nokia mobile internet toolkit running without any success.
</p>
<p>
In addition to that I've been also using wApua on my PC running Linux Mint.
</p>
<p><img src="3ee06abc-2737-4904-8204-fc0a70f7dcf3_img/win2k.png.wbmp" alt="Windows 2000 with the well-known gray taskbar on the bottom. There's a Pink phone-shaped windows with M3Gate written on it to the left and a normal square window with the title Openwave SDK to the right. The Openwave window has a phone displayed as well. In the center, overlapping the two simulators is the error-message 'could not find the main class. Program will exit'." /></p>
<p><img src="3ee06abc-2737-4904-8204-fc0a70f7dcf3_img/wApua.png.wbmp" alt="wAPua on my Linux Desktop. It displays the start page of my website." /></p>
<p>---<br /></p>
<p>
In my opinion those Emulators do a great job displaying how fractured WAP support with different manufacturers is. The version of M3Gate I'm using support basically nothing, wApua supports way too much IMO and Openwave is somewhere in the middle. That doesn't mean Openwave is the best option or anything, however. In the end I used all three to figure things out.
</p>
<p>
Another thing that is important to mention is that those emulators get the wml file directly from the webserver and parse it as they see fit. On a real phone everything goes trough a WAP-Gateway first which converts everything down into a binary format for the phone to display. I'll write more about this further down in this post.
</p>
<p align="center">
<a href="3ee06abc-2737-4904-8204-fc0a70f7dcf3-0.wml">previous page</a>
<a href="3ee06abc-2737-4904-8204-fc0a70f7dcf3-2.wml">next page</a>
<a href="/blog">post index</a>
</p>
</card>
</wml>
