A Framework for Building An WML/HTML Application Using Perl???

2001-09-10 Thread David Simcik

Hey all,
I'm trying to modify an existing script that searches a test file for what
one could qualify as normal phonebook style entries; name, phone #, email
addy, etc. We've got an internal presentation coming up in two weeks, and my
boss would like to WAP-ify this directory for it. That almost certainly
means moving the app to produce an XML doc of some kind. Ideally, I would
like to use XSLT to convert the raw XML doc into WML and HTML; to seperate
data from presentation of course. The Perl script would handle the actual
search mechanism, any logic required to detect different browsers, and the
handling of the XSL transformations.

Can anybody provide a few pointers on the best approach to take with this?
More specifically, any recommended modules that could be used to facilitate
this? How can I detect different WAP browsers???

Thanks!
DTS




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: A Framework for Building An WML/HTML Application Using Perl???

2001-09-10 Thread Gunther Birznieks

At 09:30 AM 9/10/2001 -0500, David Simcik wrote:
>Hey all,
> I'm trying to modify an existing script that searches a test file 
> for what
>one could qualify as normal phonebook style entries; name, phone #, email
>addy, etc. We've got an internal presentation coming up in two weeks, and my
>boss would like to WAP-ify this directory for it. That almost certainly
>means moving the app to produce an XML doc of some kind. Ideally, I would
>like to use XSLT to convert the raw XML doc into WML and HTML; to seperate
>data from presentation of course. The Perl script would handle the actual
>search mechanism, any logic required to detect different browsers, and the
>handling of the XSL transformations.

The most comprehensive XSL Transform API for Perl is Matt Sergeant's AxKit. 
http://www.axkit.org/. It works with mod_perl and is quite heavily optimized.

>Can anybody provide a few pointers on the best approach to take with this?
>More specifically, any recommended modules that could be used to facilitate
>this? How can I detect different WAP browsers???

You can detect different WAP browsers with an Agent string, but really 
there are some guidelines to programming WAP in a fairly cross-browser way. 
I've programmed for about 12 different WAP phones and found many of them to 
be quite similar with the original Nokia 7110 and Motorola PDA phone being 
the biggest offenders and pain in my neck programming.

Caveat: my experiences may not be the same as you may find because I wrote 
my apps for use in a GSM market phones in Asia. But if you are in the USA, 
your WAP phones may have different quirks than the entire rest of the world.

As a shameless plug, I would direct you to the book Applied Perl edited by 
Peter Williams where I've written a chapter on programming WAP applications 
using Perl based on my experiences writing WAP and SMS enabled 
Web-applications in that market.

Anyway, since all you really want is a demo, I would just download one of 
the WAP emulators and just simply code for that emulator and your life will 
be much easier than coding some weird XSLT transform. I am of the opinion 
that WML is really so completely different and changes your forms so 
drastically and what you would want to display and bring back as data, that 
a simple XSLT transform is not enough -- you really require logic changes 
to the application.

People talk all the time about separation of UI from application code, but 
to some degree, the UI medium does have a big effect on the workflow of the 
application. For example, in an HTML app, you can often get away with long 
parameters passed back and forth but in WML where you might have a single 
HTML form split into many WML forms, you have to more readily maintain the 
state of the previous forms in your WML application which requires more 
session logic.

These things can't really be emulated in a "simple" transform.

Good Luck,
   Gunther


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]