18.04.2013 Views

B2B Integration : A Practical Guide to Collaborative E-commerce

B2B Integration : A Practical Guide to Collaborative E-commerce

B2B Integration : A Practical Guide to Collaborative E-commerce

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

352 <strong>B2B</strong> <strong>Integration</strong> — A <strong>Practical</strong> <strong>Guide</strong> <strong>to</strong> <strong>Collaborative</strong> E-<strong>commerce</strong><br />

1.<br />

2.<br />

3.<br />

4.<br />

5.<br />

6.<br />

7.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

12.3.3. WMLScript<br />

Continued from page 351<br />

paragraph<br />

check the Accept and Previous<br />

but<strong>to</strong>ns<br />

go <strong>to</strong> this URL<br />

perform and action<br />

close do loop<br />

end card<br />

WMLScript is a scripting language that employs procedural logic,<br />

loops and conditionals that are optimized for small-memory, small-CPU<br />

devices. It is derived from European Computer Manufacturers Script<br />

(ECMAScript). WMLScript is integrated with WML, which results in<br />

a powerful extension mechanism that serves <strong>to</strong> reduce overall network<br />

traffic and enhance functionality. Typically, WMLScript is used for field<br />

validation, device extensions and conditional logic. With WMLScript,<br />

compiled byte code is transferred <strong>to</strong> the terminal. Standard libraries<br />

include: Lang for general purpose math functionality, string processing,<br />

Universal Resource Loca<strong>to</strong>r (URL) processing, WML browser interface,<br />

dialogue and floating point functions.<br />

Some representative code is as follows:<br />

1.<br />

2.<br />

3.<br />

4.<br />

5.<br />

6.<br />

The WMLScript example — Script part<br />

//random.wmls<br />

external function getRandom ( ) {<br />

var r= Lang.random(lOO)<br />

WMLBrowser.setVar("result", r);<br />

WMLBrowser.go("random.wml#card2");<br />

}<br />

The WML part which calls WMLScript<br />

comment<br />

start of function<br />

variable<br />

end of function

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!