AstroJS/botanjs/src
2016-10-25 19:31:01 +08:00
..
Astro Gusets Comment Reply impl 2016-10-25 19:31:01 +08:00
Components Merge remote-tracking branch 'vim/master' into Astro 2016-04-17 20:05:39 +08:00
Dandelion IDOMElement: added clear, renamed lootChildren 2016-05-25 12:15:36 +08:00
externs Merge remote-tracking branch 'origin/master' into Astro 2016-05-25 12:16:56 +08:00
Libraries/SyntaxHighlighter Remove that freakin scrollbar! 2016-10-17 16:41:01 +08:00
System Should also aware of the loaded classes 2016-05-09 15:51:00 +08:00
_this.js Assign Version Number 1.0.0b 2016-04-03 07:48:28 +08:00
README.md Update README.md 2015-08-14 18:17:44 +08:00

Goals:

  • Scalable
  • Compressable ( Closure compiler with ADVANCED option )
  • Readable
  • Only use 1 var in global scope, I.E. window.BotanJS
  • Python-like

Predefined programming rules:

    __namespace
    __import
    __readOnly
    __static_method
    __extends

    ns = __namespace( <package> )
    ns[ NS_INVOKE ]( <Same Level Packages> )
    ns[ NS_EXPORT ]( <TYPE>, <Name>, <Object> )
    ns[ NS_TRIGGER ]( <TYPE>, <Callback> )

Usage:

    BotanJS.import( <package> )

BotanJS Class Map:

<BotanJS>
    <class name="System" location="/System/_this.js">
        <class name="Global" location="/System/Global.js">
            <export>ALLOWED_ORIGIN</export>
        </class>
        <class name="Debug" location="/System/Debug.js">
            <import>System.Global</import>
        </class>
    </class>

    <class name="Dandelion" location="/Dandelion/_this.js">
        <class name="Swf" location="/Dandelion/Swf/_this.js">
            <!-- problem exists on Extern -->
            <!-- extern must follow path order -->
            <import>Dandelion.Swf.ExtAPI</import>
            <!--
                once Dandelion.Swf is imported
                Dandelion.MY_CLASS_DEPENDENT_PROP will become available
            -->
            <prop src="/Dandelion/Swf/_this.js">MY_CLASS_DEPENDENT_PROP</prop>
            <class name="ExtAPI" location="/Dandelion/Swf/ExtAPI.js">
                <import> ... </import>
            </class>
        </class>
    </class>
</BotanJS>

Css Inheritance: Unlike js, which use classes only when __import is explicitly called. Structure of css class are inherited by it's parent namespace

Dandelion.Swf.ExtAPI.css
inherits from Dandelion.Swf.css
inherits from Dandelion.css