Sunday, August 2, 2009

Does anyone consider JavaScript a good web-programming language to learn?What is difference from Java?

I am designing a web page that allows people to make virtual homemade computers and compare its performance and price with that of a pre-assembled store-bought computer they choose, then order the hardware/software they need to assemble the computer in one unassembled package. I wanted to create the web program for this using JavaScript, but I want to know the difference between that and Java, which one would be easier for other computers to interpret, which best fits the situation, and which is easier to learn.

Does anyone consider JavaScript a good web-programming language to learn?What is difference from Java?
JavaScript is definitely a good language to use (and therefore, to learn) for client-side web applications, and if one prefers, in server-side ASP. No offence to Java fans, JavaScript is more suitable for client-side applications because it is faster, and it is less likely that JavaScript is disabled by browsers than the Java applets. Java is a strongly typed C++ - like language whose most widely used application is client-side programming as applets (and as server-side in JSP). JavaScript is also C++ - like to some extent, but is not as strongly typed as Java or C++. JavaScript is a solution for writing event-handlers for form input components in DHTML which offers faster development and better integration with server-side applications such as PHP, ASP and ASP.NET.





I am not sure if client-side application is enough for what you intending to design. May be server-side applications such as PHP and ASP could do better (while you may still need to use JavaScript in some parts). As I know C# and PHP well, I would use either C# in ASP.Net or PHP for server-side, and not JavaScript as in ASP (or ASP.Net). But it would be your choice to use JavaScript. Good luck.
Reply:There are a lot of similarities between java and javascript because both the languages have been developed by "sun microsystems". Although as far as I think, java is more power full than javascript but java can't interact with internet browser as closely as javascript can. So, If you wanna develop it to work in browser than go for javascript otherwise go for java. I also would like to tell u that learning javascript is just a game if u already know java but initially, learning java is much harder than learning javascript.
Reply:Short answer: you'll want to use JavaScript to add dynamic client-side functionality to your web page (e.g. form validation). JavaScript is very well suited for this purpose. Java on the other hand would be a better choice for handling the server-side functionality (e.g. taking the input of a web-form and interacting with a DB). They are very different languages with different features and purposes which some of the other answers enumerate. You'd be best off investing the time to learn Java, after which learning JavaScript would be straight-forward.
Reply:Hi, Javascript is a client side scripting language created by netscape communication, it's interpreted by the web browser and it's used to create some interaction with the interet user.





You can do your program using javascript and it's simple, but you have to take in consideration several issues: Javascript as i said before is interpreted by your web browser and your program is at the mercy of browser users who may sometimes configure their browsers not to run Javascript!!





Java is an object oriented programming language created by sun microsystems. it's a compiled language and you need a compiler to run it. Sun have introduced Java applets to alow programmers to create small web interactive applications. but like javascript some browsers are configured not to run it.





so the best way to do your program is to use a server side scripting language. a server side scripting language reside on the server hosting your site so the browser has no control over your application: try to look for PHP, ASP, CFML...





once more, many people think that javascript and java are similar!! no they are not and they're not created by the same company.





hope this will help you





:)


No comments:

Post a Comment