MyMobileWeb Certification Part III - Presentation Transcript
MyMobileWeb “Authoring adaptive Mobile Web Applications with MyMobileWeb” FIT-350405-2007-1 FIT-350401-2006-2
Part III Advanced MyMobileWeb
Contents
Exploiting the Delivery Context
Device Description Repositories
DDR Simple API
DevInfo Simple API
The MyMobileWeb DDR REST Service
Device Clustering
Convenience Functions for the Delivery Context
Internationalization
Media Sets and Content Selection
The Mobile Web Client Runtime
Device Description Repositories
In the desktop Delivery Context, the number of different Properties that affect the usability is limited but in mobile Delivery Context this number is higher and affect the usability of the resulting content
Historically, it has been difficult or impossible to upgrade Web browser software on mobile devices or to add support for features not present in the Web browser originally shipped with de device
DDRs have become essential components of development of content targeted at the mobile Delivery Context
Screen size, markup language support or image format support information is stored in “ Device Description Repositories ” (DDRs)
DDR Simple API (I)
Minimal API for retrieving device properties needed for content and application adaptation.
http://www.w3.org/TR/DDR-Simple-API/
Promote the development of Web content that adapts to its Delivery Context.
From the point of view of the DDR Simple API
Aspect: represents a category of hardware or software that participates in delivering a Web experience.
Property : characteristic of an aspect that can affect the Web experience.
Vocabulary: set of properties and the aspects with which the properties are associated
DDR Simple API (II)
Interfaces :
Evidence : information to determine the Delivery Context.
PropertyName : the name of a Property together with its namespace.
PropertyRef : the name of a Property together with its Aspect together with the namespace they are in.
PropertyValue : models a PropertyRef together with its value.
PropertyValues : a set of PropertyValues.
Service : the core of the DDR Simple API .
ServiceFactory : factory for instantiating Service with the supplied default namespace and configuration.
Several exceptions together with its codes ( DDRException , SystemException ,…)
DDR Simple API (III)
DDR Core Vocabulary
Essential vocabulary of properties for adaptation in the Mobile Web environment
Available a REST Service to access to DDR Repositories
So thirds can know dynamically properties values
E.g. from Javascript code
The REST Service is consisted of
Meta Service
It lists the combination of all known Properties and Aspects in all Vocabularies, and furthermore it provides the data type and default Aspect for each property
Query Service
It provides the property values passed as parameter property, aspect and vocabulary
MyMobileWeb provides two ways to access to Device Description Repositories
Local DDR
Embedded DevInfo Simple API (previous MyMobileWeb versions)
Remote DDR (DevInfo Simple API Connector - Based)
Platform retrieves property values asking to the DDR REST Service
The DevInfo Simple Connector Library is licensed under LGPL 3.0 and the DevInfo Simple API is licensed under GPL 2
The LGPL does not propagate itself in the same way that the GPL does so if you need a commercial development you should user a remote DDR option
Local DDR - Architecture
Local DDR - Configuration
If you choose the local DDR option you should download the current DevInfo Simple API RI and copy the rest of libraries and configuration/descriptor files in your MyMobileWeb application
Literal . It is a "tag" information that appears in a presentation and that can be formed by more than one word
Examples: “Type of Company", "Enter", "Search"
Message . It is a sentence with subject and predicate used to indicate something to the user.
Usually the sentence is parameterized
Example: "We have found {0} products“
The messages have a type
Information, Warning, Error, Question, ....
They appear in presentations of the pseudo-OP 'Messages‘
The platform solves the multilanguage
The platform handles the internationalization for both: literal and messages
Internationalization - Literals
The platform makes possible to develop applications that are multilanguage “by definition”
Traditionally: An application designed for a single language, requires an effort of "adaptation" when it is translated into several languages
All views should be modified to incorporate a indirection mechanism for resolving literals
Unnatural
It is possible to do things in other way
Each developer in their mother tongue
The multilanguage is transparent to developers
The tools of the platform, if the application is decided to deploy in several languages, are responsible for extracting the literal and outsourcing, by language, in XML files, which included translations
The platform runtime will make the translation at runtime
The literal in the mother tongue programming is the key translation
Internationalization - Literals - Tools
Literal Extractor
Takes all presentations of an application and extracts the literals, leaving them in translation XML files, the same number as languages specified.
The translations for the language in which was development are left in place (they are the identity)
For all other languages they are leave prepared for sending to the translation department
It is managed the cleanup, updates, etc.
There are application literal and platform literal
Next, Previous, Select
Internationalization -Literals -Redefinition
Using the same translation mechanism we can redefine literals for different families of devices
Example: a literal too long destroying the layout in a terminal or family of terminals
Redefinition Mechanism
A new translation will be created and it will be applied in runtime when a user connects with a terminal or family of devices that matches the specified
There are resources in applications, typically images, videos or audios, which rely heavily on the capabilities of devices
To meet the requirement of displaying or supporting the most appropriate resource for each terminal, it is handled the concept of abstract identifier of resource which has different instances
Example: a ‘home’ resource, which it is available in jpg, gif and wbmp and with different sizes.
It is responsibility of the developer provides resources for each of these instances, so MyMobileWeb can send the best resort to each terminal
Media Sets & Content Selection (II)
Relative paths of media resources are configured in MyMobileWeb.Global.xml file
Content selection on CMS is also implemented
Multi-device instances are stored into resource directory or generic subdirectory
Redefined instances per markup, technology or family of devices are stored into directory whose name is the same as the technology or family name
Media Sets & Content Selection (III)
MyMobileWeb supports content selection according to the language
For that it is needed to add a folder level with the concatenation of the country code and code language (ISO)
If there is a definition of family or technology:
If within this subfolder are defined instances for the current language, the system will select only between them
Otherwise, it will be selected from the ones that hangs directly from the family and not language
If there is no a definition of family or technology:
With language definition (folder with country code) under the generic folder is chosen only by these instances
Without defining language select among all instances except from which are defined for other languages
Media Sets & Content Selection (IV)
The Mobile Web Client Runtime (I)
Common
mymw-common
AJAX
mymw-ajax
UI
mymw-ui
mymw-tabview
Much more to come (sliders, calendar…)
Other Modules
XForms
DCCI, Context
Recommendation
Autocompletion
…
mymw-common mymw-ajax mymw-ui
The Mobile Web Client Runtime (II)
The platform handles different device behaviours (including Windows Mobile 5)
The platform offers a minimized version of the scripts to reduce load times.
Scripts are located under script/ISO-8859-1/All/*.js
Common Module
Source “script/ISO-8859-1/All/mymw-common_min.js”
Element $ (<String> elementId)
Gets an element by id
boolean isDefined (<Object> o)
Validates if an object is defined or not
boolean isFloat (<Object> str)
Validates if an string has a float format
boolean isInteger (<Object> str)
Validates whether an string has an integer format
String trim (<String> str)
Trims a String, removing every leading or tailing whitespace.
0 comments
Post a comment