Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r12 - trunk/www

aspectes
Discussion topic

Back to topic list

svn commit: r12 - trunk/www

Reply

Author cbalz
Full name Christopher M Balz
Date 2006-01-21 11:07:11 PST
Message Author: cbalz
Date: Sat Jan 21 11:07:11 2006
New Revision: 12

Modified:
   trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.html
   trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.sxw
Log:
More detail on event and method standard definition.

Modified: trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.html
Url: http://aspectes.tigr​is.org/source/browse​/aspectes/trunk/www/​TreeLogic_Software_E​ngineering_Web_Codin​g_Standard.html?view​=diff&rev=12​&p1=trunk/www/TreeLo​gic_Software_Enginee​ring_Web_Coding_Stan​dard.html&r1=11​&p2=trunk/www/Tre​eLogic_Software_Engi​neering_Web_Coding_S​tandard.html&r2=​12
====================​====================​====================​==================
--- trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.html (original)
+++ trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.html Sat Jan 21 11:07:11 2006
@@ -6,7 +6,7 @@
     <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.2 (Win32)">
     <META NAME="AUTHOR" CONTENT="Christopher M. Balz">
     <META NAME="CREATED" CONTENT="20060114;17450000">
- <META NAME="CHANGED" CONTENT="20060114;18505764">
+ <META NAME="CHANGED" CONTENT="20060121;11045601">
     <STYLE>
     <!--
         @page { size: 8.5in 11in; margin-left: 1.27in; margin-right: 1.26in; margin-top: 1in; margin-bottom: 1in }
@@ -49,7 +49,7 @@
 </P>
 <P CLASS="western" ALIGN=LEFT STYLE="margin-left: -4.43in">January
 14, 2005</P>
-<P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium"><SDFIELD TYPE=DATETIME SDNUM="1033;1033;MM/​DD/YY">01/14/06​</SDFIELD></P​>
+<P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium"><SDFIELD TYPE=DATETIME SDNUM="1033;1033;MM/​DD/YY">01/21/06​</SDFIELD></P​>
 <P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium"><BR>
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in; font-weight: medium"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Christopher
@@ -130,7 +130,7 @@
         Basic Standard</A> 8</FONT></F​ONT></P>
         <P STYLE="margin-left: 0.59in; margin-bottom: 0in; widows: 0; orphans: 0">
         <FONT FACE="Times New Roman, serif"><FONT SIZE=3><A HREF="#2.1.11.2.2.1.11.2 Rules for Documenting JavaScript Datatypes|outline">2.1.11.2
- Rules for Documenting JavaScript Datatypes</A> 8</FONT></F​ONT></P>
+ Rules for Documenting JavaScript Datatypes</A> 9</FONT></F​ONT></P>
         <P STYLE="margin-left: 0.59in; margin-bottom: 0in; widows: 0; orphans: 0">
         <FONT FACE="Times New Roman, serif"><FONT SIZE=3><A HREF="#2.1.11.3.2.1.11.3 Functional and Procedural Code|outline">2.1.11.3
         Functional and Procedural Code</A> 12</FONT></​FONT></P>
@@ -151,7 +151,7 @@
         Maintaining Type Correctness</A> 13</FONT></​FONT></P>
         <P STYLE="margin-left: 0.59in; margin-bottom: 0in; widows: 0; orphans: 0">
         <FONT FACE="Times New Roman, serif"><FONT SIZE=3><A HREF="#2.1.15.2.2.1.15.2 Type Prefixes |outline">2.1.15.2
- Type Prefixes </A> 13</FONT></​FONT></P>
+ Type Prefixes </A> 14</FONT></​FONT></P>
         <P STYLE="margin-left: 0.59in; margin-bottom: 0in; widows: 0; orphans: 0">
         <FONT FACE="Times New Roman, serif"><FONT SIZE=3><A HREF="#2.1.15.3.2.1.15.3 Type Prefixes Table|outline">2.1.15.3
         Type Prefixes Table</A> 14</FONT></​FONT></P>
@@ -331,8 +331,6 @@
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
-<P CLASS="western" STYLE="margin-bottom: 0in"><BR>
-</P>
 <H3 CLASS="western"><A NAME="2.1.3.2.1.3 DOM Operations|outline"​></A>2.1.3
 DOM Operations</H3>
 <P CLASS="western" STYLE="margin-bottom: 0in">All DOM operations must
@@ -360,13 +358,24 @@
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in">See section 2.1.6,
 &ldquo;Inline JavaScript&rdquo;, for example code showing how to make
-the DOM/Html elements send events into the event architecture.</P>
+the DOM/Html elements send events into the event architecture.
+</P>
+<P CLASS="western" STYLE="margin-bottom: 0in"><BR>
+</P>
+<P CLASS="western" STYLE="margin-bottom: 0in">When taking events
+directly from html attribute event handlers (i.e.,
+<FONT FACE="Courier, monospace">onclic​k='doSomething()'​</FONT>), use
+a static global event registry in order to avoid a circular
+document-object-mod​el-to-custom-JavaScr​ipt reference situation.
+(Some browsers may present listener-attaching methods that exhibit
+the same circular reference forming problem).</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in">Note that the event
 architecture requires that the event or events be received by the
-listening object in a method named &lsquo;receiveEv​ent&rsquo;.
-</P>
+listening object in a method named &lsquo;receiveEv​ent&rsquo;. This
+makes all asynchronous operations self-documenting in any given class
+file.</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in">Always name event
@@ -380,8 +389,8 @@
 class file header with the following JavaScriptDoc tags:</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
-<P CLASS="western" STYLE="margin-bottom: 0in">@listens-to-​event</P>
-<P CLASS="western" STYLE="margin-bottom: 0in">@emits-event</P>
+<P CLASS="western" STYLE="margin-bottom: 0in"><FONT FACE="Courier, monospace">@liste​ns-to-event</FONT​></P>
+<P CLASS="western" STYLE="margin-bottom: 0in"><FONT FACE="Courier, monospace">@emits​-event</FONT>​</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in">In the case of
@@ -390,11 +399,11 @@
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
-<P CLASS="western" STYLE="margin-bottom: 0in">@listens-to-event
+<P CLASS="western" STYLE="margin-bottom: 0in"><FONT FACE="Courier, monospace">@listens-to-event
 &lt;code&gt;​onresize&lt;/cod​e&gt; from the &lt;code&gt;​window&lt;/code​&gt;
-document object.</P>
-<P CLASS="western" STYLE="margin-bottom: 0in">@emits-event
-&lt;code&gt​;onresize&lt;/co​de&gt;.</P​>
+document object.</FONT></P>
+<P CLASS="western" STYLE="margin-bottom: 0in"><FONT FACE="Courier, monospace">@emits-event
+&lt;code&gt​;onresize&lt;/co​de&gt;.</FONT​></P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
@@ -1151,9 +1160,24 @@
 <P CLASS="western" STYLE="margin-left: 0.5in; margin-bottom: 0in"><FONT FACE="Courier New, monospace"><FONT SIZE=2>}</FONT​></FONT>​</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
+<P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in"><I>Nev​er</I>
+use the <FONT FACE="Courier, monospace">argume​nts</FONT> object as a
+vehicle for method parameters instead of named method parameters.
+Instead, always fully declare all parameters in the method signature.
+ (Use of <FONT FACE="Courier, monospace">argume​nts.length</FONT​> is
+fine).</P>
+<P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in"><BR>
+</P>
 <P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in">Create
 real private methods when possible by using JavaScript inner methods.
-These are function declarations nested inside other function
+ JavaScript inner methods entail some performance impact, but the
+true encapulation they provide (rare in JavaScript) is well worth
+some performance sacrifice.
+</P>
+<P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in"><BR>
+</P>
+<P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in">JavaScript
+inner methods are function declarations nested inside other function
 declarations. Follow this stylistic convention for inner methods:</P>
 <P CLASS="western" STYLE="margin-right: 0.07in; margin-bottom: 0in"><BR>
 </P>
@@ -1180,8 +1204,6 @@
 <P CLASS="western" STYLE="margin-left: 0.5in; margin-bottom: 0in"><FONT FACE="Courier New, monospace"><FONT SIZE=2>}</FONT​></FONT>​</P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
-<P CLASS="western" STYLE="margin-bottom: 0in"><BR>
-</P>
 <H3 CLASS="western"><A NAME="2.1.14.2.1.14 Static Definitions|outline"​></A>
 2.1.14 Static Definitions</H3>
 <P CLASS="western" STYLE="margin-bottom: 0in">Use JavaScript
@@ -1192,8 +1214,6 @@
 = 0;</FONT></P>
 <P CLASS="western" STYLE="margin-bottom: 0in"><BR>
 </P>
-<P CLASS="western" STYLE="margin-bottom: 0in"><BR>
-</P>
 <H3 CLASS="western">2.1.15 Data Types</H3>
 <H4 CLASS="western"><A NAME="2.1.15.1.2.1.15.1 Maintaining Type Correctness|outline"​></A>
 2.1.15.1 Maintaining Type Correctness</H4>

Modified: trunk/www/TreeLogic_​Software_Engineering​_Web_Coding_Standard​.sxw
Url: http://aspectes.tigr​is.org/source/browse​/aspectes/trunk/www/​TreeLogic_Software_E​ngineering_Web_Codin​g_Standard.sxw?view=​diff&rev=12&​p1=trunk/www/TreeLog​ic_Software_Engineer​ing_Web_Coding_Stand​ard.sxw&r1=11​&p2=trunk/www/TreeL​ogic_Software_Engine​ering_Web_Coding_Sta​ndard.sxw&r2=12
====================​====================​====================​==================
Binary files. No diff available.

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r12 - trunk/www cbalz Christopher M Balz 2006-01-21 11:07:11 PST
Messages per page: