View Full Version : WML programming
dyenne10
16-08-2004, 08:50 AM
askum and hi guys..
i need some help here...pls.
now i am doing my project on sms wap gprs using perl script..
i have problems in wml script..i am blur..how do i integrate wml in perl...and how use wml+perl+mysql..
anybody know please reply me...sooner..thanks
I don't have any experience with WML but I assume WML is HTML for WAP, am I right?
if I am right in my assumption above, then this is what I can say about WML+Perl+MySQL:
all the 3 things are of different classes altogether; WML is a client-side markup language, Perl is a server-side scripting language and MySQL is a database query language ..
and they work in a series, usually in the order: MySQL->Perl->WML ... MySQL is the source of the data, Perl is used to get those data from MySQL and transform them into a markup language, which in this case is WML ...
since they are of different classes, you don't integrate MySQL into Perl or Perl into WML, but you use Perl to invoke MySQL to send data, get and sort the data, and then generate WML from them ... so, in the end only WML gets sent to the WAP browser, MySQL and Perl are merely the seed and medium ..
in order to utillize all the 3 of them optimally, you have to have adequate knowledge and 'fluency' in all the 3 languages ...
that's all what I can say .. but I hope it helps ... tell me if you still not clear ..
dyenne10
16-08-2004, 11:05 AM
emm..that right luke what u explain to me...but... :?:
like html .., to use in perl we type...
print "Content-type: text/html\n\n";
print <<ENDHTML;
<HTML>
<HEAD>
bla..bla..
</HTML>
ENDHTML
or
....bla...blaaa
print"</tr>";
print"<tr>";
print"<td width=\"30%\"><font face=\"Verdana\" size=\"2\">No of Bathroom</font></td>";
print"<td width=\"70%\">:<select name=\"ubathroom\">
<option value=\"$zbathroom\" selected>$zbathroom</option>
<option value=\"1\">1</option>
<option value=\"2\">2</option>
<option value=\"3\">3</option>
</select></td>";
print"</tr>";
print"<tr>";
print"<td width=\"100%\" colspan=\"2\">
...bla...bla
but in wml how do i do that..??? :?: :!:
[/quote]
it seem that you still haven't got what i explained ...
ok, in perl you do that (I'm refering to your code) ... ok, let me ask, what are those <HTML><HEAD> bla bla thingies? that's HTML, right? now if you want WML just put the WML code in the place of those HTML thingies ... you don't scrap all the Perl code and replace it with WML code .. like I said, the Perl code generates the HTML / WML / XML / You-name-it-ML code and sends it to the user's browser ... so keep the Perl intact but replace those HTML thingies (only a part of the Perl code) with your WML thingies ... and like I said, you have to learn the WML language if you want to use it ..
maybe something like:
print "Content-type: text/html\n\n";
print <<ENDWML;
<WML>
<WMLHEAD>
WML sucks! go XML! bla..bla..
</WML>
ENDWML
dunno go figure ..
masterof_none
16-08-2004, 12:26 PM
HTML, XML and all other ML's are all from the same root:
SGML . developed by IBM:
http://en.wikipedia.org/wiki/SGML
HTML is just a strip-down version of the ML's .
WML comes from XML. so, the syntax resembles XML. (and XML also the descendant of SGML).
but WAP is just a competing protocol develop by this european company, just like HTML created by Tim-Berners Lee at Cerns.
(and WML is another ,not sure what's the difference)
check this out
http://www.w3schools.com/wap/)
we can create our mark-up language too, if we want : Recom Markup Language (RML). But we must have a browser that understand the mark-up tag (aka format) of the file, just like Mozilla or Safari recognize HTML.
So, in conclusion, if you have perl's code that says:
print " <html> welcome to Recom </html> "; bla...
just replace it with :
print " <wml> welcome to Recom </wml>";
than, the apps/browser that support the markup would understand the data inside that wml tag. just like the IE understand HTML.
vBulletin® v3.7.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.