Please turn on javascript in your browser to play chess.
Developers Forum

Developers Forum

  1. 01 Sep '04 15:11
    What's the difference?

    I know that Russ doesn't use Java, but he does use Javascript, the links to the external sites of the Clans, for example.

    O.
  2. Standard member Toe
    01 Sep '04 17:25
    see http://www.w3schools.com/js/js_intro.asp
    javascript is a series of executable commands (a bit like a DOS batch file, well sort of)
    Java is a full-on programming language creating executable objects (well, code that your java virtual machine compiles into executable code with its Just-In-Time (or JIT) compiler)
  3. Standard member thire
    Xebite
    01 Sep '04 19:27
    I'd say that JavaScript is one of the core parts of the site: all the chessboards and the moving of the pieces works not with php or html - it's JavaScript!! Russ did not work on these parts of the site since I joined RHP 20 months ago.
    th
  4. Standard member gregoftheweb
    The Great Gonzo
    10 Sep '04 19:33
    Describing javascript as a series of executable commands is about as far away from how I would describe it as you could get.

    Javascript is the primary way of programming against the browser client. It is the language you can use to make your web pages be more than a flat piece of content.

    Russ does an excellent job of implementing javascript on this site for the chessboard work and the drop down menus and I'm sure a lot of other things as well.

    It is a scripting language, and one that is interpretted at runtime by the browser, a lot of the code can be the same these days between IE6 and Mozilla, but there is still differences that you have to program towards. Again, Russ has done an excellent job at making RHP cross browser friendly.

    Now Java on the other hand is a full fledged programming language/platform. It is in use today in a wide variety of implementations ranging from Web Server Backend code in the form of JSP to Java Applets (though you don't see them very often anymore) on the browser, to stand alone applications.

    It requires the installation of a Java Virtual Machine (JVM). When you make a Java program and compile it, it compiles it to an iintermediate step called "bytecode". This is then interpretted on each machine by the local JVM and the code is run.

    This does two things, makes the code "write once, run anywhere" (almost) and also can be slower in some cases.

    I do the majority of my programming now in C# in ASP.Net. This is Microsofts system that implements a very similar architecture as Java. A Virtual Machine (.Net Framework), intermediate code(MSIL), similar structure.