cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] JavascriptForJavaProgrammers Wed Aug 27 10:00:03 2003
Date Wed, 27 Aug 2003 08:00:03 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=JavascriptForJavaProgrammers , version: 9 on
Wed Aug 27 07:40:10 2003 by AntonioGallardo

- In order to reduce the barrier to entry of the Cocoon flow layer for Java programmers that
haven't done much with JavaScript I thought I'd give an overview of some of the similarities
and differences between JavaScript (specifically Rhino - [http://www.mozilla.org/rhino]) and
Java.
?                                                                                        
                                                                                         
                                                            ^^^^

+ In order to reduce the barrier to entry of the Cocoon flow layer for Java programmers that
haven't done much with JavaScript I thought I'd give an overview of some of the similarities
and differences between JavaScript (specifically [Rhino|http://www.mozilla.org/rhino]) and
Java.
?                                                                                        
                                                                                         
                                                       +     ^

- I also encourage you to play around with the Cocoon Flow debugger ([http://xml.apache.org/cocoon/howto/howto-flow-debugger.html]),
as it contains an interactive environment where you can type in JavaScript code and see the
results.
?                                                                  ^^^                   
                                        -

+ I also encourage you to play around with the [Cocoon Flow debugger|http://xml.apache.org/cocoon/howto/howto-flow-debugger.html],
as it contains an interactive environment where you can type in JavaScript code and see the
results.
?                                              +                    ^

- These objects and functions are comprehensively documented in many places on the web so
I won't describe them further here (e.g. [http://www.devguru.com/Technologies/ecmascript/quickref/javascript_intro.html]).
+ These objects and functions are comprehensively documented in many places on the web so
I won't describe them further here. Please see [Quick Reference|http://www.devguru.com/Technologies/ecmascript/quickref/javascript_intro.html]
or [Netscape Core JavaScript Reference 1.5|http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/contents.html].
+ !!Type of Variables
- JavaScript has two types of variables: global variables and local variables. Local variables
are only visible in the function in which they are declared. However, they are also visible
to other functions defined in the same scope. Inside a function definition local variables
are identified by the "var" keyword:
?                                                                                        
                                                                                         
                                                                                         
                              ^   ^

+ JavaScript has two types of variables: global variables and local variables. Local variables
are only visible in the function in which they are declared. However, they are also visible
to other functions defined in the same scope. Inside a function definition local variables
are identified by the __var__ keyword:
?                                                                                        
                                                                                         
                                                                                         
                              ^^   ^^

- You should *always* use the var keyword to declare variables.
+ You should *always* use the __var__ keyword to declare variables.
?                             ++   ++

+ !!Statements
- JavaScript statement syntax and control structures are pretty much the same as Java: if,
for, switch, while, do,  etc.
?                                                                                        
                         -

+ JavaScript statement syntax and control structures are pretty much the same as Java: if,
for, switch, while, do, etc.
+ !!Using Java Objects
+ 
+ !!Continuations



Mime
View raw message