Uppercase identifiers helps you to determine:
- static vars (e.g. API namespaces, global configs, constants, flags, switches)
- read-only values
- special definitions in object notation to fulfill conventions of Xone automated system
- special members and classes also used by the automated system
Note: You are free to use or not to use these automated concept, most of those features can also be used directly outside of the automated chain.
ENV
PLATFORM
DEBUG
Note: Globals only available in non-production environments. All globals are removed in production builds.
APP
CORE
CONFIG
MANIFEST
Note: Globals only available in non-production environments. All globals are removed in production builds.
Constants: (read-only)
- CONFIG.
ENV
- CONFIG.
PLATFORM
- CONFIG.
DEBUG
get more details here
- APP.
INIT
: function() - APP.
SETUP
: function() - APP.
MAIN
: function()
- APP.
MODEL
- Methods:
- APP.MODEL.
new
: function(name, data<, persistent>) - APP.MODEL.
create
: function(name, data) - APP.MODEL.
register
: function(name, model)
- APP.MODEL.
- Methods:
- APP.
CONTROLLER
- Methods:
- APP.CONTROLLER.
build
: function build(view<, data>) - APP.CONTROLLER.
render
: function render(target<, data>) APP.CONTROLLER.(deprecated)changeLanguage
: function(lang)
- APP.CONTROLLER.
- Methods:
- APP.
MODEL
: Array([model]) implements ModelInterface - APP.
CONTROLLER
: Array([controller]) implements ControllerInterface - APP.
ROUTE
: Array([route]) implements RouteInterface - APP.
PAYLOAD
: Array([function]) - APP.
MAPPER
: Array([object]) - APP.
LANG
: Array([object])
- APP.
EVENT
: Array([event]) implements EventInterface - APP.
HANDLER
: Array([function]) - APP.
HELPER
: Array([function]) - APP.
INTERFACE
: Array([interface]) - APP.
ADAPTER
: Array([class]) - APP.
REQUIRE
APP.(dropped)CHANGELOG
: Array([object])- APP.
MIGRATE
(in progress) - APP.
PLUGIN
- APP.
VIEWPORT
- Constants: (read-only)
- APP.VIEWPORT.
ASPECT_RATIO
- APP.VIEWPORT.
PIXEL_RATIO
- APP.VIEWPORT.
ORIENTATION
- APP.VIEWPORT.
WIDTH
- APP.VIEWPORT.
HEIGHT
- APP.VIEWPORT.
SCALE
- APP.VIEWPORT.
ZOOM
- APP.VIEWPORT.
- Methods:
- APP.VIEWPORT.
lockOrientation
: function(orientation) - APP.VIEWPORT.
update
: function()
- APP.VIEWPORT.
- Constants: (read-only)
- APP.
DEVICE
(coming soon)- Constants: (read-only)
- APP.DEVICE.
ASPECT_RATIO
- APP.DEVICE.
PIXEL_RATIO
- APP.DEVICE.
ORIENTATION
- APP.DEVICE.
WIDTH
- APP.DEVICE.
HEIGHT
- APP.DEVICE.
SCALE
- APP.DEVICE.
ZOOM
- APP.DEVICE.
- Constants: (read-only)
- APP.
CONFIG
- Constants: (read-only)
- APP.CONFIG.
LANG
: String APP.CONFIG.(deprecated)PROC
- APP.CONFIG.
GZIP
: Boolean APP.CONFIG.(deprecated)PASSIVE_EVENTS
APP.CONFIG.(deprecated)EVENT_OPTIONS
- APP.CONFIG.
LAYOUT
: Array([string])
- APP.CONFIG.
- Switches:
APP.CONFIG.(deprecated)SHOW_DEBUG
APP.CONFIG.(deprecated)SHOW_GRAPH
APP.CONFIG.(deprecated)SHOW_STATS
- Constants: (read-only)
- APP.
VARS
- Globals:
- APP.VARS.
CURRENT_USER
: Object - APP.VARS.
HEADER
: Object - APP.VARS.
AUTH
: String
- APP.VARS.
- Globals:
- APP.
STATS
: Object - APP.
SETTINGS
(implements StorageInterface)- Methods:
- APP.SETTINGS.
clear
: function() - APP.SETTINGS.
del
: function(index) - APP.SETTINGS.
get
: function(index) - APP.SETTINGS.
keys
: function() - APP.SETTINGS.
set
: function(index, value) - APP.SETTINGS.
update
: function(index, value)
- APP.SETTINGS.
- Methods:
- APP.
LAYOUT
(deprecated) - APP.
STORAGE
(extends StorageAdapter) - APP.
WORKER
- Methods:
- APP.WORKER.
register
: function(name, worker<, callback>)
- APP.WORKER.
- Methods:
- CORE.
Math
- Methods:
- CORE.Math.
min
: function(a, b<, c, d, ...>) - CORE.Math.
max
: function(a, b<, c, d, ...>) - CORE.Math.
med
: function(a, b<, c, d, ...>) - CORE.Math.
rad
: function(num) - CORE.Math.
cos
: function(num) - CORE.Math.
sin
: function(num) - CORE.Math.
abs
: function(num) - CORE.Math.
round
: function(num) - CORE.Math.
rand
: function(<seed>)
- CORE.Math.
- Methods:
- CORE.
query
: function(query) - CORE.
queryOne
: function(query) - CORE.
queryAll
: function(query) - CORE.
getByClass
: function(classname, context) - CORE.
getById
: function(id) - CORE.
getByTag
: function(tag, context) - CORE.
getClosest
: function(query) - CORE.
getHTML
: function(node) - CORE.
getText
: function(node) CORE.(deprecated)getNode
: function(element)- CORE.
getValue
: function(node) - CORE.
setHTML
: function(node, html, async) - CORE.
setText
: function(node, val) - CORE.
setValue
: function(node, value)
- CORE.
css
: function(obj, style, val) - CORE.
paint
: function(fn, delay) CORE.(deprecated)addByClass
: function(name, node<, callback>)- CORE.
addCssRule
: function(selector, rules, value) - CORE.
addClass
: function(node, name<, callback>) - CORE.
animate
: function(obj, params) - CORE.
getStyle
: function(obj, style) - CORE.
scrollTo
: function(node, from, to<, duration>) - CORE.
scrollToTop
: function(node) CORE.(deprecated)removeByClass
: function(name, node, callback)- CORE.
removeClass
: function(node, name, callback) - CORE.
removeNodes
: function(element) - CORE.
hasClass
: function(node, name) CORE.(deprecated)toggleByClass
: function(name, node, callback)- CORE.
toggleClass
: function(node, name, callback) - CORE.
toggleStyle
: function(obj, css, val) - CORE.
setStyle
: function(obj, css, val) - CORE.
hasStyle
: function(obj, css, val)
- CORE.
on
: function(elem, query, event, fn<, preventDefault, stopBubble, key>) - CORE.
addEvent
: function(elem, event, fn<, preventDefault, stopBubble>) - CORE.
addInputEvent
: function(node, fn<, preventDefault>) - CORE.
addMouseWheelScroll
: function(node, fn) - CORE.
addTouchEvent
: function(node, fn<, preventDefault, stopBubble>) - CORE.
addTouchMoveEvent
: function(node, fn<, preventDefault, stopBubble>) - CORE.
delegateByClass
: function(node, classname, event, fn<, preventDefault, stopBubble>) - CORE.
delegateByTag
: function(node, tag, event, fn<, preventDefault, stopBubble>) - CORE.
delegateByTagClass
: function(node, tag, classname, event, fn<, preventDefault, stopBubble>) - CORE.
handleEvent
: function(event, elem, fn, preventDefault, stopBubble) - CORE.
preventEvent
: function(event, prevent, stop) - CORE.
triggerMouseEvent
: function(node, event) - CORE.
switchKeyCode
: function(keycode, payload)
- CORE.
contains
: function(array, item) - CORE.
isArray
: function(value) - CORE.
isBlank
: function(value) - CORE.
isDefined
: function(value) - CORE.
isEmpty
: function(value) - CORE.
isObject
: function(value) - CORE.
isString
: function(value, item) - CORE.
isNumber
: function(value, item) - CORE.
isBoolean
: function(value, item) - CORE.
isCollection
: function(value, item) - CORE.
isNode
: function(value, item) - CORE.
isType
: function(value<, type>) - CORE.
is
: function(item<, type>) - CORE.
hasValue
: function(value) - CORE.
hasValues
: function(array) - CORE.
hasKeys
: function(object) - CORE.
has
: function(item<, type>)
- CORE.
Browser
- Constants: (read-only)
- CORE.System.
isOpera
: Boolean - CORE.System.
isFirefox
: Boolean - CORE.System.
isSafari
: Boolean - CORE.System.
isMSIE
: Boolean - CORE.System.
isChrome
: Boolean - CORE.System.
is
: function(type)
- CORE.System.
- Constants: (read-only)
- CORE.
System
- Constants: (read-only)
- CORE.System.
isIphone
: Boolean - CORE.System.
isIpod
: Boolean - CORE.System.
isIpad
: Boolean - CORE.System.
isAndroid
: Boolean - CORE.System.
isIOS
: Boolean - CORE.System.
isWindows
: Boolean - CORE.System.
isCordova
: Boolean - CORE.System.
isWebapp
: Boolean - CORE.System.
is
: function(type)
- CORE.System.
- Constants: (read-only)
- CORE.
Device
- Constants: (read-only)
- CORE.System.
isMobile
: Boolean - CORE.System.
isRetina
: Boolean - CORE.System.
isTouch
: Boolean - CORE.System.
isOnline
: Boolean - CORE.System.
isOffline
: Boolean - CORE.System.
is
: function(type)
- CORE.System.
- Constants: (read-only)
- CORE.
merge
: function(a, b<, c, d, ...>) - CORE.
unique
: function(array<, field>) - CORE.
registerEach
: function(fn) - CORE.
registerFilter
: function(fn) - CORE.
registerMap
: function(fn) - CORE.
reverse
: function(array) - CORE.
shuffle
: function(array<, times>) - CORE.
fill
: function(array, content) - CORE.
sort
: function(array<, compare>) - CORE.
sortAsc
: function(array) - CORE.
sortDesc
: function(array) - CORE.
sortNum
: function(array<, compare>) - CORE.
sortNumAsc
: function(array) - CORE.
sortNumDesc
: function(array) - CORE.
sortBy
: function(array, field<, compare>) (in progress) - CORE.
sortByAsc
: function(array, field) (in progress) - CORE.
sortByDesc
: function(array, field) (in progress) - CORE.
getKeys
: function(data) - CORE.
replace
: function(array, find, replace) - CORE.
count
: function(array, find)
- CORE.
replace
: function(string, find, replace) - CORE.
count
: function(string, find) - CORE.
randomString
: function(pattern) - CORE.
trim
: function(string)
- CORE.
async
: function(fn<, delay>) - CORE.
stack
: function(fn<, delay>) - CORE.
clear
: function(id) - CORE.
time
: function() CORE.(deprecated)getStackLength
: function()
CORE.(deprecated)ajax
: function(params)- CORE.
xhr
:- Methods:
- CORE.xhr.
get
: function(host, payload, callback) - CORE.xhr.
post
: function(host, payload<, callback>) - CORE.xhr.
patch
: function(host<, payload, callback>) - CORE.xhr.
delete
: function(host<, payload, callback>) - CORE.xhr.
download
: function(host, destination<, callback>) (in progress) - CORE.xhr.
upload
: function(host, source<, callback>) (in progress)
- CORE.xhr.
- Methods:
- CORE.
request
: function(type<, payload, callback>) - CORE.
paramsToString
: function(params)
- CORE.
formatDate
: function(date) - CORE.
formatNumber
: function(number, places, decimal, seperator) - CORE.
capitalize
: function(text)
- CORE.
buildData
: function(pattern, parent<, data>) - CORE.
buildPattern
: function(pattern, parent<, data>) - CORE.
parseNode
: function(pattern, data)
- CORE.
console
- Methods:
- Console.
log
: function(msg) - Console.
warn
: function(msg) - Console.
err
: function(msg) - Console.
info
: function(msg) - Console.
show
: function() - Console.
hide
: function()
- Console.
- Methods:
- CORE.
Storage
: StorageAdapter implements StorageInterface - CORE.
crc32
: function(str) - CORE.
imageToDataUrl
: function(src, callback, format, quality) CORE.(deprecated)initRetina
: function(data, context)- CORE.
loadScript
: function(src, callback) - CORE.
loadStyle
: function(src, media) CORE.(deprecated)prefix
CORE.(deprecated)preloadImages
: function(images)- CORE.
focusInput
: function(input_element)
Each model class provide some built ins.
- ModelHelper.
new
: function(data) - ModelHelper.
create
: function(data) ModelHelper.(deprecated)newFromList
ModelHelper.(deprecated)createFromList
ModelHelper.(deprecated)parse
- ModelHelper.
find
- ModelHelper.
findBy
- ModelHelper.
all
- ModelHelper.
range
- ModelHelper.
count
- ModelHelper.
countBy
- ModelHelper.
countWhere
- ModelHelper.
each
- ModelHelper.
where
- ModelHelper.
like
- ModelHelper.
saveAll
- ModelHelper.
deleteAll
- ModelHelper.
updateAll
- Constructor:
- ModelHelper.constructor.
beforeUpdate
- ModelHelper.constructor.
beforeCreate
- ModelHelper.constructor.
beforeSave
- ModelHelper.constructor.
onCreate
- ModelHelper.constructor.
onUpdate
- ModelHelper.constructor.
onSave
- ModelHelper.constructor.
- Constructor:
All instances of a model provide some built ins.
- ModelClass.
save
- ModelClass.
update
- ModelClass.
restore
- ModelClass.
delete
- Constructor:
- ModelClass.constructor.
beforeUpdate
- ModelClass.constructor.
beforeCreate
- ModelClass.constructor.
beforeSave
- ModelClass.constructor.
onCreate
- ModelClass.constructor.
onUpdate
- ModelClass.constructor.
onSave
- ModelClass.constructor.
- Constructor:
The controller can be used directly or can be automatically connected to a chain via definitions.
- Controller.
render
- Controller.
build
- Controller.
request
- Controller.
requestBatch
- Controller.
requestSync
A route definition connects either: a request controller with its default chain or an event controller chain.
- Route.
to
- Route.
action
- Route.
type
- Route.
field
- Route.
limit
- Route.
last
- Route.
params
- Route.
header
- Route.
cache
- Route.
clear
- Route.
async
- Route.
default
- Route.
sort
- Route.
error
- Route.
filter
- Route.
map
- Route.
arrayfilter
- Route.
arraymap
A mapper definition maps a model to a different representations (e.g. model > server, model > storage, storage > model)
- Mapper.
mapToView
- Mapper.
mapToPayload
(in progress) - Mapper.
mapToData
(in progress) - Mapper.
mapFromPayload
(in progress) - Mapper.
mapFromData
(in progress)
Templates will be auto generated by built-in compilation.
- Template.
if
- Template.
map
- Template.
data
- Template.
loop
- Template.
else
- Template.
include
A viewmodel payload has to be passed when calling the view controller by
Controller.render()
directly.
- ViewModel.
data
- ViewModel.
target
- ViewModel.
view
- ViewModel.
default
- ViewModel.
callback
The view cache is automatically used by the view controller.
- ViewCache.
set
,update
: function(key, view) - ViewCache.
get
: function(key) - ViewCache.
del
,delete
: function(key) - ViewCache.
clean
,cleanup
function() - ViewCache.
clear
: function() - ViewCache.
has
: function(key)
This pattern scheme is used to render templates from JSON into DOM elements by
CORE.build()
- Pattern.
tag
- Pattern.
attr
- Pattern.
text
- Pattern.
child
,childs
- Pattern.
length
An event definition is used to make event delegation more simple.
- Event.
on
- Event.
if
- Event.
at
- Event.
to
- Event.
do
- Event.
go
- Event.
stopBubble
- Event.
preventDefault
An request definition is used to setup server calls or when calling the request controller directly by
CONTROLLER.request()
.
- Request.
type
- Request.
url
- Request.
params
- Request.
success
- Request.
error
- Request.
header
- Request.
async
- Request.
clear
- Request.
cache
A storage can be one of both: persistent or temporary (cache).
- Storage.
new
,create
,register
function(name, persistent?) : Storage - Storage.
get
function(key) : value - Storage.
set
function(key, data) - Storage.
update
function(key, data) : hasUpdate? - Storage.
del
,delete
function(key) - Storage.
clean
,cleanup
function() - Storage.
clear
function() - Storage.
has
function(key) : value
The filesystem provides access to larger capacity and can also be one of both: persistent or temporary.
- FileSystem.
init
- FileSystem.
load
- FileSystem.
save
- FileSystem.
delete
- FileSystem.
copy
- FileSystem.
move
- FileSystem.
exist