royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [royale-asjs.wiki] branch master updated: Updated Terminology and Concepts (markdown)
Date Tue, 15 May 2018 05:56:35 GMT
This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/royale-asjs.wiki.git


The following commit(s) were added to refs/heads/master by this push:
     new 3aba88c  Updated Terminology and Concepts (markdown)
3aba88c is described below

commit 3aba88cd761e7e8d5d83e3957b16e8216c0a3629
Author: aharui <aharui@apache.org>
AuthorDate: Mon May 14 22:56:34 2018 -0700

    Updated Terminology and Concepts (markdown)
---
 Terminology-and-Concepts.md | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/Terminology-and-Concepts.md b/Terminology-and-Concepts.md
index 632a960..3934c4f 100644
--- a/Terminology-and-Concepts.md
+++ b/Terminology-and-Concepts.md
@@ -18,7 +18,7 @@ If you examine the various source files, you should find that they are divided
i
 * **Utility Functions and Classes**  These are bundles of functionality designed to be reused
by other source files that don't need the overhead of a Strand and/or do not make sense in
a class hierarchy
 * **Top-Level Components** A Top-Level Component (TLC) is a strand with a useful set of default
beads.
 
-Beads, Base Classes and TLCs and even Utility Functions and Classes are all Components. 
They all consist of code that can be combined to create a higher-level component.
+Beads, Base Classes and TLCs and even Utility Functions and Classes are all Components. 
They all consist of code that can be combined to create a higher-level component.  TLCs can
be composed in part by other TLCs.
 
 ### Component Set
 
@@ -57,6 +57,8 @@ How do we achieve small code size and good performance?  By executing with
the f
 3. Choose Composition over inheritance in most cases
 4. Use Inheritance and utility functions in other cases
 
+There are no hard rules.  If you take code reuse to an extreme, you would create a class
for running for loops, but the performance overhead of that would outweigh the code reuse
savings.
+
 ### Organization Goals
 
 We want to support multiple component sets.  Users may mix-and-match TLCs from various component
sets, but that should be relatively rare since, once you have used a more complex TLC, there
are few code size savings to also using a simpler TLC.  What is more likely is that users
may mix and match beads from various component sets.
@@ -69,10 +71,22 @@ Backward compatibility will become more important after 1.0 but don't
do too man
 ### Subclassing  
 Because TLCs are always compositions, there is less value to subclassing them.  There is
less code to re-use.   TLCs are primarily reserved for Application Developers since the MXML
component model must use subclassing.  Thus, there should be no "final" TLCs.  Subclassing
TLCs can also be used within a component set if it helps code reuse or styling.  TLCs are
just examples and labels for popular compositions of beads.
 
-On the other hand, subclassing is commonly used in creating beads (and always used in base
classes).  
+On the other hand, subclassing is a good way to implement PAYG in beads (and always used
in base classes).  Simple beads can be subclassed and more complex things can be implemented
in the subclass.  
 
 ### Exploded Component
-Any Top-Level Component should be able to be approximated in MXML by using the base class
and beads.  This is known as the "exploded component".  The code in the Top-Level Component
should proxy model properties and hopefully do little else.  The beads should not ever reference
the Top-Level Component, only the Strand.  That allows the exploded component to work and
makes it easier to re-use the beads in other component sets or as base classes for beads in
other component sets.  
+Any Top-Level Component should be able to be approximated in MXML by using the base class
and beads.  This is known as the "exploded component".  The code in the Top-Level Component
should proxy model properties and hopefully do little else.  The beads should not ever reference
the Top-Level Component, only the Strand.  That allows the exploded component to work and
makes it easier to re-use the beads in other component sets or as base classes for beads in
other component sets.
+
+IOW, a Basic Button (which extends UIBase) should be represented by the MXML
+
+~~~~
+<js:UIBase>
+   <js:beads>
+     <js:ButtonModel />
+     <js:ButtonView />
+     <js:ButtonController />
+   </js:beads>
+</js:UIBase>
+~~~~
 
 ### CSS
 

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

Mime
View raw message