Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problems with javascript

 
vijaya saradhi
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as a javascript programmer I face a lot of problems with coding.First thing I found is its highly unstructured.Meaning like java it has no full object oriented structure.


and also the source code is made available in the browser.So that we must use some code obfuscation techniques.

in what way does this new javaFX so called client scripting language addresses these issues.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64829
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you come to JavaScript expecting class-based OO, then yeah, you'll have problems. JavaScript is a functional language with prototype-based inheritance. It's actually quite an elegant language once you learn it -- but you do need to take the time to learn it.

P.S. The JavaScript 2 proposal adds classes.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64829
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, be sure not to confuse the abomination that is the browser DOM with JavaScript the Language.
 
James Weaver
author
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaFX Script is a declarative scripting language that is fully object-oriented and statically typed. Please take a look at the following blog post to see an example of all of these qualities:
Roll the Dice - A Compiled JavaFX Script Example
 
James Weaver
author
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijaya,

Regarding your code obfuscation question, JavaFX Script is a compiled language, so it is distributed as .class files and is as obfuscated as Java. This reminds me, by the way, of the old saying: "Eschew obfuscation!" :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic