|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
|
| Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
This thread endeavors to answer a few frequently asked questions
and list useful resources to help you make your own WAP pages. Please PM me, jabba_29, if you wish any additions or modifications. Contents
What is WAP? The Wireless Application Protocol (WAP) is an open, global specification that empowers mobile users with wireless devices to easily access and interact with information and services instantly. Source: OMA
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ Last edited by jabba_29 : June 20th, 2007 at 09:20 PM. Reason: Added links to ToC |
|
#2
|
||||||||
|
||||||||
|
Creating a simple WAP 1 & WAP 2 (xhtml MP) page
Just save the snippets and upload to your web server.
test.wml Code:
test.mhtml Code:
Good tutorials: WAP 1: http://www.w3schools.com/wap/default.asp http://www.developershome.com/wap/wml/ wmlscript: http://www.w3schools.com/wmlscript/default.asp http://www.developershome.com/wap/wmlscript/ WAP 2: http://www.developershome.com/wap/xhtmlmp/ WAP 2 CSS: http://www.developershome.com/wap/wcss/ |
|
#3
|
||||||||
|
||||||||
|
Content Type
To get mobiles content served correctly from your server, in this example Apache 2x no real configuration is needed, especially if you use PHP to modify headers. However, if you would like Apache to handle .mhtml files as application/vnd.wap.xhtml+xml, then AddType is what you are looking for. These modifications can be made at server level or per directory using .htaccess if your server's configuration permits.
Code:
httpd.conf
AddType application/vnd.wap.xhtml+xml .mhtml #same can be done for wml file extension if it isn't serving as text/vnd.wap.wml AddType text/vnd.wap.wml .wml To get PHP to do this for you, see the following examples: test_wml.php Code:
test_mhtml.php Code:
ASP and JSP examples to follow. Good tutorial: SERVER SETUP: http://www.developershome.com/wap/wapServerSetup/ |
|
#4
|
|||||
|
|||||
|
Testing
Before uploading you should validate your code.
Q: Why? A: Because WAP 1 and WAP 2 are derivatives of XML, any malformed code will cause the page to break, leading to, in most cases, a page that won't render at all. XML is essentially a stricter version of HTML, which requires html tags to be in the right order, proper nesting, and closed correctly. xml code examples Code:
See the tutorials links above for more info. To help, you can validate your code online using a validator. Online Validators http://www.w3schools.com/wap/wml_validate.asp http://www.validome.org/ http://mr.dev.mobi/ Last edited by jabba_29 : December 28th, 2006 at 02:23 AM. Reason: Added resource |
|
#5
|
||||
|
||||
|
Viewing
So you have now created your pages. You want to see how they look like. There are a 4 ways to do this.
1) Upload your files to a publicly accessible web server (IP address or host) and visit the url using your mobile device 2) Upload your files to a publicly accessible web server (IP address or host) and visit the url using an online emulator. 3) Use an emulator on a privately hosted server (eg: your PC) and use an emulator.. Online emulators http://pukupi.com/tools/mimic/ (imode) http://wapsilon.com/ (WAP) http://emulator.mtld.mobi/emulator.php (Java required) 3) Download wap software or emulators and check on your PC Software: http://www.forum.nokia.com/main/0,6566,033_3-3,00.html (Nokia) http://www.winwap.com/ (winwap) http://www.ericsson.com/mobilityworld (Ericsson) http://www.w3schools.com/wap/wap_software.asp (general) http://www.marketcircle.com/iphoney/ (iPhone - currently MAC only) 4) View your pages using a web browsers with wap and /or SSR capabilities. You can upload your files to your local web server or a publicly accessible one. Browsers with WAP/WAP2 capabilities Opera - http://www.opera.com/ Firefox - http://www.spreadfirefox.com/?q=aff...&id=109892&t=82 + https://addons.mozilla.org/extensio...ication=firefox (wml browser) + https://addons.mozilla.org/extensio...ication=firefox (mhtml profile) + https://addons.mozilla.org/extensio...ication=firefox (web developer's toolbar) Last edited by jabba_29 : July 8th, 2007 at 08:09 PM. Reason: Added resource |
|
#6
|
||||
|
||||
|
Detection
There are a few ways of detecting wap enabled devices, and rendering content accordingly.
One of the most popular is WURFL. Another method is by checking against the "HTTP_ACCEPT" of the device. Detection http://www.developershome.com/wap/detection/ For me, I use a PHP script that I developed myself that checks HTTP_ACCEPT primarily, then a bit of HTTP_USER_AGENT. Still a work in progress: http://www.skiffie.com/code/php/php-device-detection. CMS plugins / modules. There are a few modules around that enable mobile content for ready made CMS solutions: Accessibility module for Drupal v5x Accessibility module for Drupal v4.7 Mobile plugin for Wordpress. Enjoy... Last edited by jabba_29 : December 19th, 2007 at 06:42 PM. |
|
#7
|
||||
|
||||
|
More Resources & Further Reading
General
http://www.wirelessdevnet.com/ http://www.wap-shareware.com/ http://www.devguru.com/technologies/wml/home.asp http://24ways.org/2006/the-mobile-web-simplified Forums This one ![]() Apache PHP XML Forum Nokia Dot Mobi Forums Name Pros Specifications & interests Open Mobile Alliance Mobile Web Initiative MTLD MTLD Guides SMS Sending SMS thread Sending SMS Thru HTTP Similar article to the one above http://www.developershome.com/sms/ PHP / WAP tutorials http://www.tutorialized.com/tutorials/PHP/WAP-and-WML/1 http://www.zend.com/zend/tut/wap.php http://www.wirelessdevnet.com/chann...mlcast_php.html XML & XSLT http://www.xml.com http://www.xml.com/pub/rg/142 http://www.devshed.com/c/b/XML/ Media Types Add Video Mime Type for 3gp Video on Apache Server - article MIME Media Types Yahoo Groups http://groups.yahoo.com/group/wmlprogramming/ Last edited by jabba_29 : July 18th, 2007 at 12:29 AM. Reason: added resource |
|
|