@truefusion
Hi!
I know I haven't convinced you yet, so I'll make another attempt in this post.
truefusion, on May 30 2009, 03:50 AM, said:
You have just answered your own question. They are not grouped together because they are of the same family; they are grouped together because they all start with the letters "Java."
What I tried to mention in my original post is that we shouldn't be grouping the languages simply due to the name. Let me form an analogy here... C++ and C# aren't usually grouped together. The C++ libraries are very different from the .NET base class libraries. C++ code is compiled into machine code while C# code is compiled into Microsoft Intermediate Language (MSIL).
The following are the differences I can state between Java and java script:
1. Syntax
We cannot use the Java syntax when writing Javascript. The similarity between Java and Javascript is the same as the similarity between C++ and PHP - they both end statements with semicolons and have squiggly brackets to indicate blocks. Among others, the easiest to notice is the use of the "function" keyword when declaring a Javascript function instead of the return type in Java. We don't have to declare variables in Javascript as we do in Java.
2. Compilation model
Java is a (partly) compiled language. The Java compiler turns the Java source code into byte code. Javascript, on the other hand, is interpreted.
3. Strict-typing vs Weak-typing
We don't declare the datatype of the variables in Javascript. The same variable can hold a reference to a number, a string containing a number, or an object.
In Java, we define the data type of variables upon declaration.
truefusion, on May 30 2009, 03:50 AM, said:
Actually, AJAX is part of JavaScript, not the other way around. Regardless, a better approach would be to make a forum called "Client-side Languages" and use that for (X)(HT)ML, CSS, JavaScript and what-have-you, not to fully give JavaScript its own forum. But that would require some forum maintenance, that is, looking through the Java* forum for all JavaScript related topics and moving them to the new forum: something i see as a bit unnecessary due to the fact that JavaScript is part of the Java* forum because it starts with "Java."
I agree with you when you say AJAX is a part of Javascript. AJAX stands for "Asynchronous Javascript and XML". AJAX only deals with the asynchronous calls to the server for additional functionality - simply performing client-side validation or improving the aesthetics of the web page with Javascript-effects isn't AJAX but it is Javscript. Since we're anyway covering a part of Javascript, we might as well discuss Javascript in its entirety.
I agree with you on the "Client-side languages" concept, though I would suggest keeping (X)HTML and CSS separate from Javascript as they are primarily related to the display/formatting of the content, while Javascript adds additional 'programmable' functionality.
I agree with you on the forum maintenance issue. It is a pain. But an alternative is to archive the current "Java*" section (stop new posts/replies) and create separate sections for Javascript and for Java-based technologies. If necessary, with some volunteering, we could move the messages from the archives to the new sections.
Regards