Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called WML for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it. WML Script by Shanti katta.
This presentation agenda like,
Hey friends, here is my "query tree" assignment. :-) I have searched a lot to get this master piece :p and I can guarantee you that this one gonna help you In Sha ALLAH more than any else document on the subject. Have a good day :-)
Remote Procedure Call in Distributed SystemPoojaBele1
Presentation to give description about the remote procedure call in distributed systems
Presentation covers some points on remote procedure call in distributed systems
Hey friends, here is my "query tree" assignment. :-) I have searched a lot to get this master piece :p and I can guarantee you that this one gonna help you In Sha ALLAH more than any else document on the subject. Have a good day :-)
Remote Procedure Call in Distributed SystemPoojaBele1
Presentation to give description about the remote procedure call in distributed systems
Presentation covers some points on remote procedure call in distributed systems
This is part of the course given at the Strathmore University Mobile Boot Camp in Nov 2010.
Facilitator: Michael Wakahe, Director, Shujaa Solutions Ltd
Date: Nov 18th - 20th, 2010
Venue: Strathmore University Mobile Boot Camp
A frequently used class of objects are the quadric surfaces, which are described with second-degree equations (quadratics). They include spheres, ellipsoids, tori, paraboloids, and hyperboloids.
Quadric surfaces, particularly spheres and ellipsoids, are common elements of graphics scenes
This article is the first part of a series of articles on using JavaScript tools. Today, JavaScript is a very powerful language that can be used to build web apps, mobile apps, and even some pc games — perhaps a bit faster than you would build them otherwise.
New libraries have emerged in the web industry to address the challenges of JavaScript — libraries such as JQuery, Prototype and many others have been released. Today, a popular question asked by many is — should i learn the libraries such as jQuery or learn basic JavaScript. The truth is that the libraries help you to create faster, responsive JavaScript, but there are still times when your basic knowlege of JavaScript will be called into question. It is for this reason that I have created this eBook, to assist newbies learn JavaScript.
Using SPMetal for faster SharePoint developmentPranav Sharma
This session will cover the ins and outs of SPMetal, a tool which ships with SharePoint 2010. SPMetal allows developers compile-time access to SharePoint lists, content types and columns. This allows for type-safe access to columns/fields on a SharePoint site. Additionally, developers can write LINQ queries against these lists using SPMetal which speeds up query writing tremendously. We will cover adding support for complex column types (Managed Metadata, Publishing HTML, etc) which aren’t supported by SPMetal out of the box. Lastly we will also touch upon performance considerations and other best practices when coding with SPMetal.
Wireless Communication and Networking by WilliamStallings Chap2Senthil Kanth
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called Wireless Communication and Networking
by WilliamStallings for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it.
Wireless Communication and Networking
by WilliamStallings Chapter : 2Transmission Fundamentals
Chapter 2
Electromagnetic Signal
Function of time
Can also be expressed as a function of frequency
Signal consists of components of different frequencies
Time-Domain Concepts
Analog signal - signal intensity varies in a smooth fashion over time
No breaks or discontinuities in the signal
Digital signal - signal intensity maintains a constant level for some period of time and then changes to another constant level
Periodic signal - analog or digital signal pattern that repeats over time
s(t +T ) = s(t ) -¥< t < +¥
where T is the period of the signal
Time-Domain Concepts
Aperiodic signal - analog or digital signal pattern that doesn't repeat over time
Peak amplitude (A) - maximum value or strength of the signal over time; typically measured in volts
Frequency (f )
Rate, in cycles per second, or Hertz (Hz) at which the signal repeats
Time-Domain Concepts
Period (T ) - amount of time it takes for one repetition of the signal
T = 1/f
Phase () - measure of the relative position in time within a single period of a signal
Wavelength () - distance occupied by a single cycle of the signal
Or, the distance between two points of corresponding phase of two consecutive cycles
Sine Wave Parameters
General sine wave
s(t ) = A sin(2ft + )
Figure 2.3 shows the effect of varying each of the three parameters
(a) A = 1, f = 1 Hz, = 0; thus T = 1s
(b) Reduced peak amplitude; A=0.5
(c) Increased frequency; f = 2, thus T = ½
(d) Phase shift; = /4 radians (45 degrees)
note: 2 radians = 360° = 1 period
Sine Wave Parameters
Time vs. Distance
When the horizontal axis is time, as in Figure 2.3, graphs display the value of a signal at a given point in space as a function of time
With the horizontal axis in space, graphs display the value of a signal at a given point in time as a function of distance
At a particular instant of time, the intensity of the signal varies as a function of distance from the source
Frequency-Domain Concepts
Fundamental frequency - when all frequency components of a signal are integer multiples of one frequency, it’s referred to as the fundamental frequency
Spectrum - range of frequencies that a signal contains
Absolute bandwidth - width of the spectrum of a signal
Effective bandwidth (or just bandwidth) - narrow band of frequencies that most of the signal’s energy is contained in
Frequency-Domain Concepts
Any electromagnetic signal can be shown to consist of a collection of periodic analog signals (sine waves) at different amplitudes, frequencies, and phases
The period of the total signal is equal to the period of the fundamenta
wireless communication and networking Chapter 1Senthil Kanth
wireless communication and networking by WilliamStallings
Hai I'm Senthilkanth, doing MCA in Mepco Schlenk Engineering College..
The following presentation covers topic called Wireless Communication and Networking
by WilliamStallings for BSc CS, BCA, MSc CS, MCA, ME students.Make use of it.
This presentation agenda like,,
Introduction
Chapter 1: Wireless Comes of Age
Chapter 2: Transmission Fundamentals
Chapter 3: Communication Networks
Chapter 4: Protocols and the TCP/IP Protocol Suite
Chapter 5: Antennas and Propagation
Chapter 6: Signal Encoding Techniques
Chapter 7: Spread Spectrum
Chapter 8: Coding and Error Control
Chapter 9: Satellite Communications
Chapter 10: Cellular Wireless Networks
Chapter 11: Cordless Systems and Wireless Local Loop
Chapter 12: Mobile IP and Wireless Access Protocol
Chapter 13: Wireless LAN Technology
Chapter 14: IEEE 802.11 Wireless LAN Standard
Chapter 15: Bluetooth
WAP- Wireless Application Protocol
by
Team 11 Presenters:
Suma Pramod Connie Barbosa
Niti Pandey Patrick Cunning
Olga Pavlenko
This ppt contains the topic like,,
WAP Introduction,
WAP architecture requirements,
Architecture overview,
World-wide web model,
WAP model,
Components of WAP architecture,
Sample Configuration of WAP technology,
Usage, Advantages & Disadvantages of WAP,
Wireless Application Protocol (WAP),
Wireless Markup Language (WML),
Generating WML with XSLT,
WAP Emulator.
Presentation on WAP Keerti Sharma
This ppt contains the topic like,,
What is WAP ?
Limitations of Internet for wireless applications
WAP Architecture / protocol stack
WAP Components / WML
WAP brings Internet to hand-held devices
Conclusion
Introduction to Mobile Application DevelopmentSenthil Kanth
Introduction to Mobile Application Development
This ppt contains the topic like,,
WAP Network Structure,
The WAP Gateway plays an important role,
WAP Programming Model,
WML Example,
Java Platform,
Java 2 Platform,
Virtual Machines and horizontal and vertical APIs specified in configurations and Profiles,
Configurations
Introduction to wireless application protocol (wap)ogiSenthil Kanth
Introduction to wireless application protocol (wap)ogi Presented by
Dragomanov Andon
Paunovski Ognen
This ppt contains the topic like,,
What is WAP?
Development and Objectives
WAP Concept
WAP 1.0 Architecture
WAP 2.0 Architecture
WAP 2.0 Features
WML
Real Life Examples
Routing protocols for mobile ad-hoc networks have to
face the challenge of frequently changing topology, low
transmission power and asymmetric links. Both
proactive and reactive routing protocols prove to be
inefficient under these circumstances. The Zone Routing
Protocol (ZRP) combines the advantages of the proactive
and reactive approaches by maintaining an up-to-date
topological map of a zone centered on each node. Within
the zone, routes are immediately available. For
destinations outside the zone, ZRP employs a route
discovery procedure, which can benefit from the local
routing information of the zones.
On-Demand Multicast Routing Protocol.
This paper presents a novel multicast routing protocol for mobile ad hoc wireless networks. The protocol, termed ODMRP (On-Demand Multicast Routing Protocol), is a mesh-based, rather than a conventional tree- based, multicast scheme and uses a forwarding group concept (only a sub- set of nodes forwards the multicast packets via scoped flooding). It applies on-demand procedures to dynamically build routes and maintain multicast group membership. ODMRP is well suited for ad hoc wireless networks with mobile hosts where bandwidth is limited, topology changes frequently, and power is constrained. We evaluate ODMRP’s scalability and performance via simulation.
Routing Protocols for Ad-Hoc Networks. This is a book for Ad-hoc On-Demand Distance Vector Routing
&
DSR: The Dynamic Source Routing Protocol for Multi-Hop Wireless Ad Hoc Networks. November 2011,
Authors : Giorgos Papadakis & Manolis Surligas
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
Senthilkanth,MCA..
The following ppt's full topic covers Operating System for BSc CS, BCA, MSc CS, MCA students..
1.Introduction
2.OS Structures
3.Process
4.Threads
5.CPU Scheduling
6.Process Synchronization
7.Dead Locks
8.Memory Management
9.Virtual Memory
10.File system Interface
11.File system implementation
12.Mass Storage System
13.IO Systems
14.Protection
15.Security
16.Distributed System Structure
17.Distributed File System
18.Distributed Co Ordination
19.Real Time System
20.Multimedia Systems
21.Linux
22.Windows
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdfTechSoup
In this webinar you will learn how your organization can access TechSoup's wide variety of product discount and donation programs. From hardware to software, we'll give you a tour of the tools available to help your nonprofit with productivity, collaboration, financial management, donor tracking, security, and more.
1. WML Script
CS 486
Global Knowledge
Networks
Instructor: Dr.V.Juggy
Presented By: Shanti Katta
2. Objective
What is WMLScript?
What is WMLScript used for?
WMLScript Vs JavaScript
How to call WMLScript?
Pragmas
WMLScript language syntax
Variables, naming rules, data types and operators
WMLScript standard libraries
Example
Summary
3. What is WMLScript?
WMLScript is the client-side scripting
language used in WML pages.
WMLScript is a light version of JavaScript.
WMLScripts are not embedded in the WML
pages. WML pages only contain references to
script URL’s.
WMLScript is compiled into byte code on
the server before it is sent to the WAP
browser.
4. What is WMLScript?
(Cont…)
WMLScript is part of the applications layer of
the WAP architecture.
WMLScript is an event-based language used to
add interaction to documents.
WMLScript has a weak type definition.
They contain collection of related functions into
source code files which are hosted on server and
accessed through URL’s.
5. What is WMLScript used
for?
WMLScript is used to validate user input.
WMLScript is used to generate message boxes
and dialog boxes locally, to view error messages
and conformations faster.
WMLScript is used to access facilities of the
user agent.
WMLScript enhances WML by adding local
intelligence to distributed applications.
6. What is WMLScript used for?
(Cont…)
WMLScript can be used to add procedural
logic to WAP devices, either as part of WML
documents, or as a standalone tool in
independent applications.
WMLScript can be used to add interaction
and dynamic code to documents.
WMLScript includes functions which are
called if a task calling the functions has been
linked to WML events and the event occurs.
7. WMLScript Vs JavaScript
WML contains references to the URL address of a
WMLScript function, whereas JavaScript functions are
normally embedded in HTML code.
WMLScript units have to be compiled into binary
WMLScript code before they can be executed in a WAP
device. This means that WMLScript Virtual Machine
(VM) has to be included on the browser that executes the
script.
WMLScript makes heavy use of libraries than
JavaScript.
Call-by-address is not supported by JavaScript. It
supports only call-by-value.
8. WMLScript Vs JavaScript
(Cont…)
Feature WMLScript JavaScript
Supports objects No Yes
Supports arrays No Yes
Typeof returns Integer String
Supports Libraries Yes No
Supports extern Yes No
Supports invalid Yes No
Supports for..in No Yes
Supports pragmas Yes No
Supports delete No Yes
9. WMLScript Vs JavaScript
(Cont…)
Feature WMLScript JavaScript
Semicolons Mandatory Optional
Supports HTML Comments No Yes
Non-escape characters
No Yes
preceded by a backslash
Names may include ‘$’ No Yes
Supports global variables Yes Yes
Supports auto declarations Yes Yes
Supports the genericterm
Yes No
number
Specifies max and min values Yes No
10. How to call WMLScript?
WMLScripts are not embedded in WML pages. The WML pages
only contain references to script URL’s.
In the example below, a card is created where you enter a URL,
select the ‘go’ label, and then go off to the specified URL.
<?xml version=“1.0”?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN”
“http://www.wapforum.org/DTD/wml_1.1.xml”>
<wml>
<card id=“no1” title=“Go to URL”>
<do type=“options” label=“Go”>
<go href=“check.wmls#go_url(‘my_url’)”/>
</do>
11. How to call WMLScript?
(Cont…)
<p>
Enter a URL:
<input type=“text” name=“my_url”/>
</p>
</card>
</wml/>
The red line above contains a reference to a WMLScript. The script is
in a file called check.wmls, and the name of the function is go_url.
The go_url function sends you to the URL you entered. The function
also checks if you omitted the “http://” part in the URL.
12. How to call WMLScript?
(Cont…)
Here is the WML page called :
check.wmls
Extern function go_url (the_url)
{
if (String.find(the_url , “http://”) < 0 )
{
the_url = “http://” + the_url;
}
WMLBrowser.go (the_url);
}
NOTE: The extern keyword is used to allow other functions access
to this function, or WML events outside the .wmls file.
13. WMLScript Bytecode
Interpreter
WMLScript must be compiled into binary form before it
can be interpreted by the WMLScript bytecode
interpreter. WMLScript compiler encodes one
WMLScript compilation unit into WMLScript bytecode.
Interpreter Architecture
call http://www.host.com/script#myFunc(“Test”,12)
WMLScript
Libraries
Functions
Interpreter WMLScript
Bytecode
Functions
…..
myFunc()
State
IP Operand
Stack
Call Stack Variables
14. Pragmas…
WMLScript is a compiled language and uses
Compilation Units (Collection of functions) and Pragmas,
which are contained in them.
Pragmas are statements that are interpreted by the
compiler.
WMLScript uses pragmas to identify other compilation
units that it uses.
All pragmas are optional and appear at beginning of
compilation unit, before any function declarations.
There are 3 WMLScript pragmas :-
15. Access Control Pragmas
A WMLScript computation unit can protect its content
by using a special access control pragma, which is
examined before any externally-defined functions are
executed.
access
Syntax: use
access
Domain domain_name
Path path_name
Domain domain_name path path_name
One can restrict access to specific domains, specific
paths, or their combinations. Path names can be
absolute or relative, which are always converted to
absolute later.
16. Meta Pragmas
Meta pragmas convey information to different entities in
WAP environment.
meta
Syntax:
Use meta
Meta elementName “elementvalue”
http equiv elementName “elementvalue”
User agent elementName
“elementvalue”
Compilation units may contain more than 1 meta
pragma, but no more than 1 meta pragma of same type.
17. Meta Pragmas(Cont…)
Name information is intended for origin servers, and
may contain such information as copyright assignments.
http equiv information is used to control HTTP headers.
It is used to specify HTTP header information to
mediating servers that transfer compilation unit.
User agent information is reserved for passing
information to specific WAP user agents to implement
WAP extensions
18. URL Pragmas
To access a function outside of a compilation unit, one
must include a pragma that associates the URL of the
other compilation unit, an internal identifier, which
can be used to access external functions.
url
Syntax: use url Identifier string_literal
The use url pragma specifies the location (URL) of the
external WMLScript resource and gives it a local
name.
19. URL Pragmas(Cont…)
For example:
use url DocJS “http://www.docjavascript.com/mywml”;
function divide(nom, denom)
{
if (denominator = = 0) return invalid;
return DocJS#mydiv(nom, denom);
}
The use url pragma specifies a URL to the compilation
unit. Once the file is found, the function call
DocJS#mydiv() triggers the loading of external
compilation unit http://www.docjavascript.com/mywml.wmlsc.
20. WMLScript Language
Syntax
WMLScript syntax is based on the ECMAScript.
Following points summarize some basic syntactical
features:
The smallest unit of execution in WMLScript is a
statement and each statement must end with a semicolon(;).
WMLScript is case-sensitive.
Comments can either be single-line(starting with //) or
multiline (bracketed by /*…*/).
A literal character string is defined as any sequence of
zero or more characters enclosed within double(“ “) or
single(‘ ‘).
21. WMLScript Language
Syntax(Cont…)
New variables are declared using var keyword.
Boolean literal values correspond to true and false.
WMLScript is a weakly-typed language.
Internally, the following data types are supported:
Boolean, Integer, Floating-point, String, and
Invalid.
Includes assignment, arithmetic, logical, string,
comparison, and array operations.
Includes control statements like if-else, for loop,
while loop, break and continue statements.
22. Naming Rules
Identifiers within WMLScript can be used to name
variables, functions and pragmas.
When managing names, WMLScript differentiates
between three name spaces:
function names
function parameters and variables
pragmas
It is allowable to use the same name for a function and
variable. Like most languages, WMLScript has a list of
reserved words like access, agent, meta, url, use, etc.
23. Variables and Data Types
WMLScript is a weakly typed language. No type
checking is done at compile-time and no variable types
are declared. Four types of values can be declared for
WMLScript variables:
integer, floating point, string and Boolean.
The fifth type is invalid, which is reserved for cases
when the type cannot be determined. This may happen in
type conversions or when dividing by zero.
Because the data types are only supported internally,
they are not defined during the declarations, but the type
is determined during the execution of the function.
WMLScript converts between the types if necessary.
24. Operators
WMLScript supports 45 arithmetic, assignment, and
logical operators.
Arithmetic: Provides basic math in WMLScript,
including addition, subtraction, multiplication, floating
point and integer division.
Assignment: Allows assignment of a value to a variable,
but WMLScript also supports assignment with operators.
Logical: WMLScript supports logical operations AND,
OR and NOT. If WMLScript evaluates the first operand
to be INVALID, the expression is INVALID.
25. WMLScript Standard
Libraries
While WMLScript does not support the creation of new
objects via object-oriented programming, it does provide six
“pre-built” libraries.
Lang – This library contains a set of functions that are
closely related to the WMLScript language core. Included in
this library are functions for data type manipulation, absolute
value calculations, and random number generation.
Function Description
abort() Aborts a WMLScript and returns a message to the
caller
Abs() Returns the absolute value of a number.
characterSet() Returns the character set supported by WMLScript
interpreter.
26. WMLScript Standard
Libraries(Cont…)
exit() Exits a WMLScript and returns a message to the caller.
float() Returns true if floating-point numbers are supported.
isFloat() Returns true if specified value can be converted into float.
max() Returns the largest value of two numbers.
maxInt() Returns the maximum possible integer value.
random() Returns random integer between 0 and specified number.
seed() Initializes random number generator with a number.
Note: Since the Lang library contains some functions that
we would expect to find in a Math library, the Lang
library has a little misleading name. But it is called the
Lang Library because it contains functions that are
closely related to the core of WMLScript engine.
27. WMLScript Standard
Libraries(Cont…)
Float – The Float library is optional and is only supported
on those clients who have floating-point capabilities.
Typical functions provided are:
Function Description
ceil() Returns the nearest integer not smaller than given no.
floor() Returns the nearest integer not longer than given no.
int() Returns the integer part of a specified number
maxFloat() Returns the largest possible floating-point number.
minFloat() Returns the smallest possible floating-point number.
pow() Raises a no. to the power of a second number.
round() Returns the nearest integer to a specified number.
sqrt() Returns the square root of a specified number.
28. WMLScript Standard
Libraries(Cont…)
String – The String library contains a set of functions for
performing string operations.
Function Description
charAt() Returns a character is placed in a specified position.
compare() Compare two strings, and returns an integer.
elementAt() Separates a string into elements and returns element.
elements() Returns the frequency of a specified value in a string.
squeeze() Reduces all white spaces to single spaces.
find() Returns the position of a substring in a string.
format() Formats a value, and returns result.
trim() Returns a string without leading and trailing spaces.
toString() Creates a string from a number, and returns the
result.
29. WMLScript Standard
Libraries(Cont…)
URL – This library contains a set of functions for handling
both absolute URLs and relative URLs. Typical functions:
Function Description
escapeString() Replaces special char’s in URL with escape
sequence.
getFragment() Returns the fragment in a URL.
getHost() Returns the host specified in a URL.
getParameters() Returns parameters in last path segment of URL.
getPath() Returns the path specified in a URL.
getPort() Returns the port no. specified in URL.
getQuery() Returns the query part in a URL.
getScheme() Returns the scheme in a URL.
isValid() Returns true if URL has a right syntax.
30. WMLScript Standard
Libraries(Cont…)
WMLBrowser – This library contains functions by which
WMLScript can access the associated WML context. These
functions must not have any side effects and must return
invalid in cases where the system does not support
WMLBrowser.
Function Description
getCurrentCard(
Returns the (relative) URL of the current card.
)
getVar() Returns the value of a variable.
go() Goes to the new card, specified by the new URL.
newContext() Clears all variables, and returns an empty
string.
prev() Browser goes back to previous card.
refresh() Refreshes the current card returns empty string.
31. WMLScript Standard
Libraries(Cont…)
Dialogs – This library contains a set of typical user
interface functions including:
Function Description
alert() Displays a message, waits for a confirmation, and
returns empty string.
confirm() Displays a message, waits for an answer, and returns a
boolean value depending on the selected answer.
prompt() Displays a question, waits for an input, and then returns
the user’s answer.
The functions in Dialogs library are quite similar to
JavaScript alerts and message boxes.
32. Example:Validating User
Input
We build a simple WML card that asks the user to input a
social security number (an identification number). We will
then use WMLScript to verify that the user’s input was
formatted correctly. Following this verification, we’ll alert
the user whether their number was accepted or not.
First, let us create a normal WML file containing two
cards(an input card and a results card). Accepting the input
will result in our validateSSN() being called.
Note that this function is stored in a separate .wmls file
(WMLScriptExample.wmls) and is declared within that
file using the extern keyword.
35. Example:Validating User
Input(Cont…)
WMLScriptExample.wmls
extern function validateSSN(SSN)
{
if (String.length(SSN) != 9)
{
WMLBrowser.setVar("SSN", "Error: String must be 9 digits
long.");
}
WMLBrowser.go("WMLScriptExample.wml#Results");
};
37. Summary
WMLScript is a client-side scripting language used
to provide interactivity to thin clients via WML
scripts.
WMLScript is not embedded in WML pages unlike
JavaScript.
Contains six standard libraries to provide various
functionalities.
WMLScript is compiled into bytecode before it can
be interpreted.
WMLScript makes use of compilation units and
pragmas.
38. Reference
a. http://www.webreference.com/js/column61/4.html.
b. http://www.w3schools.com/wmlscript.
c. http://www.allnetdevices.com/developer/tutorials.
d. http://updev.phone.com/dev/ts/htmldoc/41/wmldev.
e. http://www.wirelessdevnet.com/channels/wap.
39. Thank You
Any questions or suggestions ?
shantikatta@usa.net
Editor's Notes
WMLScript is a client side scripting language based on ECMAScript (which is based on Netscape’s JavaScript language), whose purpose is to provide client-side procedural logic. It provides general scripting capabilities to the Wireless Application Protocol(WAP) architecture. Specifically, WMLScript complements the Wireless Markup Language (WML). While WML focuses on content. It is a declarative document markup language designed to convey the essence of a user-interface. WMLScript is imperative language which focuses on procedure and logic.
WMLScript belongs to the application layer of the WAP archicture and makes use of services and facilities of the lower layers. It causes WML documents to interact with the users.WMLScript is to WML, is like JavaScript is to HTML. WMLScript is the JavaScript of the wireless world. WMLScript has a weak type definition which means that variable types are not defined during declaration, the data types are determined during execution. While the WMLScript code is maintained on the servers, the script execution takes place on the local device.
WML, which is based on Extensible Markup Language(XML), specifies application content for narrowband devices like cell phones. WML allows simple formatting to make the user interface more readable, but its content is static with the following limitations:
1)checking the validity of user input.
2)Access to facilities of the device. For example, on a phone, allow the programmer to make phone calls, send messages etc.
3)Generating messages and dialogs locally thereby reducing the need for expensive round-trips to show alerts, error messages, confirmations, etc.
4)Allowing extensions to the device software and configuration of the device after it has been deployed.
WMLScript is designed to overcome these limitations and to provide programmable functionality that can be used over narrowband communication links in clients with limited capabilities. WmlScript is a function-oriented scripting language which enhances WML applications.
WMLScript focuses on procedure and logic. It adds dynamic code to static WML data. For example, when validating form field entries, providing rapid responses and calculations, for expanding the normal functions to mobile phones, sending messages and dialogs and even for creating games.
Many of the services that can be used with thin mobile clients can be implemented with WML.. Scripting enhances the standard browsing and presentation facilities of WML with behavioral capabilities. They can be used to support more advanced User Interface(UI) functions, add intelligence to the client, provide access to the device and its peripheral functionality, and reduce the amount of bandwidth needed to send data between the server and the client.
WMLScript is simple scripting language similar to JavaScript but there are, quite a lot of differences between the two.
While HTML documents normally contain embedded JavaScript code, WML only contains references to the URL addresses of a WMLScript function.
Unlike HTML, in which the JavaScript code is compiled along with HTML, WMLScript has to be compiled into binary code before being executed on a WAP device. Therefore a WMLScript Virtual Machine has to be included in the browser that executes the script.
To speed up data transfer, WMLScript libraries are pre-compiled and loaded to the user agent’s memory, providing quick access to the WMLScript script.
JavaScript does not support call-by-address whereas it is supported in WMLScript. That is, an argument can be set inside a function and communicated back to the caller. JavaScript, on the otherhand supports call-by-value, that is, functions can read parameter values from their caller, but cannot change these values in the caller’s scope.
WMLScript code is written in normal text files with the extension *.wmls (for example, script1.wmls). These text files are placed on the same server as normal WML documents; however, it is also possible to call WMLScript functions on other servers from within WML documents or from WMLScript code.
A text file is called a compilation unit, and it may contain one or several functions. A compilation unit can be placed in the same directory as WML documents, or in a separate subdirectory. Functions that have similar properties should be placed in the same compilation unit.
When a WML document contains a reference to a WMLScript function, the call will be routed from the browser through the gateway to the server. The server will then send the necessary WMLScript compilation, which is converted into binary format in the gateway.
The reason for this is, that binary file is smaller and therefore easier to transmit over a wireless network. The binary file is sent from the gateway to the WAP browser. The WAP browser has an interpreter that is able to execute WMLScript programs in their binary format.
The same reference system is used for calling WMLScript functions as in HTML and WWW, which means that resources are referred to with their relative or absolute addresses. The call should always include the name of the target WMLScript function and its list of parameters. The call may be absolute or relative.
The WMLScript function may call functions within the same compilation unit or functions in other compilation units or libraries. If the WMLScript function is defined with the word extern, it can be called from any other compilation unit, unless it is protected by access control programs.
WMLScript is a compiled language and uses Compilation Units and Pragmas. In addition to collection of functions, a compilation unit also contains Pragmas, which are the statements interpreted by the compiler.
A pragma is a directive that generates special behavior from the compiler.
All pragmas are optional, but if used must be preceded by the keyword use and appear at the beginning of a compilation unit before any function declarations.
A certain application may include separate scripts that were individually and independently compiled. A compilation unit can call functions that are defined in another compilation unit. WMLScript uses pragmas to identify other compilation units that it uses.
A WMLScript computation unit can protect its content by using a special access control pragma, which is examined before any externally-defined functions are executed.
A compilation unit may use only one access control pragma. The use access pragma is written at the beginning of the WMLScript compilation unit.
For example,
use access domain “wap.acta.fi” path “/wap”;
An access control pragma is specified by the unique word access. The level of protection is always checked before the function is executed. If the compilation unit contains the defined reserved words use access in front of the domain name(with the reserved word domain) and/or a path(with reserved word path), the authority of the compilation unit that calls the pragma-protected function to execute the function will be checked before execution.
The syntax of access control pragma may be specified in any one of the ways:
use access domain
use access domain ;
use access path ;
Use access domain path ;
The third type of pragma is the meta pragma. It communicates between different players of the wireless communication: originating connection servers and user agents. The name meta pragma request the originating servers for different kinds of information.
Meta pragmas convey information to different entities in the WAP environment. Compilation units may contain more than one meta pragma, but no more than one meta pragma of the same type.
The Name information is intended for origin servers, and may contain such information as copyright assignments. Network servers should not emit WMLScripts containing, and user agents should ignore, meta pragmas.
For Example,
use meta name “Created” “22-May-00”;
http equiv information is used to control HTTP headers. It is used to specify HTTP header information between intermediating servers that transfer the compilation unit.
For Example:
use meta http equiv “keywords” “Script, Language”;
User agent information is reserved for passing information to specific WAP user agents to implement WAP extensions.
For Example:
use meta user agent “Type” “Test”;
Functions in WMLScript are accessed by using a URL. To access a function outside of a compilation unit, one must include a pragma that associates the URL of the other compilation unit an internal identifier. The identifier can then be used to access the external function. Multiple url pragmas are permitted in a compilation unit.
The use url pragma specifies the location (URL) of the external WMLScript resource and gives it a local name. This name can then be used inside a function declarations to make external function calls.
For example:
use url DocJS “http://www.docjavascript.com/mywml”;
function divide(nom, denom)
{
if (denominator == 0) return invalid;
return DocJS#mydiv(nom, denom);
}
The use url pragma specifies a URL to a WMLScript compilation unit, http://www.docjavascript.com/mywml. If the file extension is omitted, the user agent will look for the extension .wmlsc , I.e it will look for http://www.docjavascript.com/mywml.wmlsc .
Once the file is found, the function call DocJS#mydiv() triggers the loading of the external compilation unit,
http://www.docjavascript.com/mywml.wmlsc. Upon successful loading of the external resource, its content is verified to have the definition of the mydiv() function, and it is with the calling parameters, mydiv(nom, denom).