This article contains recommendations for application developers developing components in Foresight Analytics Platform.
The list of articles:
Apart from features described in articles, there are general development requirements:
The main libraries PP.js and PP.css must be connected above the other additional platform libraries.
A component can be created on creating a class instance by means of "new". A component can be created by creating a class instance by means of "new".
It is allowed to use only public methods and properties. Private methods can change their names or can be deleted.
Names of classes, enumerations, enumeration members, fields must correspond to the UpperCamelCase rule. Names of local variables, methods must correspond to the lowerCamelCase rule. Property names in event parameters must correspond to UpperCamelCase.
To create examples using DHTML components, follow HTML markup rules.
Set two tags in the <html> tag:
<head>…</head>:
It contains links to CSS and JS files that determine style and library classes in the <link> and <script> tags:
<link href="<relative path of CSS file>" rel="stylesheet" type="text/css"/>
<script src="<relative path of JS file>" type="text/javascript"/></script>
It contains container style in the <style> tag:
<style type="text/css">
<container style parameters>
</style>
NOTE. Tag with style parameters is optional.
It contains function with DHTML component implementation in the <script> tag:
<script text="text/javascript">
function <function name>() {
<scenario of DHTML component use>
}
</script>
<body onload="<function name>()">
<div id="<component identifier>"></div>
</body>
See also: