-
Notifications
You must be signed in to change notification settings - Fork 33
HybridOS View Markup Language
HybridOS Specification 01-B
Topic: HybridOS View Markup Language
Author: Vincent Wei
Category: App Framework
Date: November 2018
Status: Proposal
Copyright Notice
Copyright (C) 2018, 2019 FMSoft Technologies
All Rights Reserved.
This specification describes the extended HTML 5.3 tags (HVML tags) supported by HybridOS, and the basic method to define a HybridOS app.
HVML
means HybridOS View Markup Language, which defines a few new tags
based on HTML 5.3.
First, the tag hvml
is a replacement of the tag html
, represents this is
a HVML document.
The HVML tag view
represents a complex widget which can not be described and
rendered easily by using the standard HTML 5.3 tags and CSS, for example,
a chart, a calendar, a meter panel, a watch dial, and so on.
As we know, HTML 5.3 introduced some new tags especially the ones for
interaction, such as progress
, meter
, details
, summary
,
and dialog
. HVML provides well support for these tags.
However, if we want to show a complex widget, we either use a plugin or
use the canvas
to render them by using script. In order to reduce the
development efforts and improve the performance, we introduce the view
tag for HVML.
For example, to define a meter panel, we use the following HVML tag view
:
<view type="meter" class="CLASS" name="NAME" id="IDENTIFIER">
<param name="NAME" value="VALUE">
<param name="NAME" value="VALUE">
</view>
HTML 5.3 also introduced the template
tag. A template is a virtual element,
which can be used to generate other real elements by substituting some
attributes and inserting them to the DOM tree.
However, you still need to write a piece of script code to clone the template in HTML. But in HVML, you can use the some new tags to clone a template element without the script code.
HybridOS uses CSS to define the style of all view types. You can apply your own CSS to any HVML element as well.
The implementation of HVML will be based on the latest WebKit. Therefore, the latest HTML5/CSS technologies will be supported well, for example:
- canvas and canvas object.
- WebStorage
- WebSocket
- Geolocation
- SVG
- MathML
- Audio
- Video
Because it is an extension of standard HTML, so the implementation,
named hiWebKit
, is a WebKit derivative.
For more information, please refer to hiWebKit.
In HybridOS, we will provide some extended features for device and/or client apps:
- Extended DOM interfaces for activity and intent.
- SQLite interfaces for local database access.
- hiBus interfaces to interact with the local system services.
- MQTT interfaces to communicate with the cloud and clients.
For the C++ edition of your HybridOS app, you use
[HybridOS Foundation C++ Class Library] (HFCL
for short) directly.
HFCL runs based on hiWebKit and provides the most extented interfaces for HybridOS apps.
Hybrid App Engine is developed based on HFCL.