Bman900 Posted June 25, 2009 Share Posted June 25, 2009 Which is a better language? I just got a book on Java and it seems cool but then I discovered that there was JavaScript. I work with PHP a lot and want to embed some java (as I thought of course) but realized I might need javascript instead. Is it worth learning java or should I just go to javascript? Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/ Share on other sites More sharing options...
rhodesa Posted June 25, 2009 Share Posted June 25, 2009 they are completely different languages and have completely different uses: http://en.wikipedia.org/wiki/Java_(programming_language) http://en.wikipedia.org/wiki/Javascript Java is a server side code (like PHP). If you are looking to add some "Web 2.0" to your webpages, you are looking for JavaScript Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/#findComment-863172 Share on other sites More sharing options...
The Little Guy Posted June 25, 2009 Share Posted June 25, 2009 Java is a server side code Isn't Java more like Flash, and Java ServerPages more like PHP? Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/#findComment-863178 Share on other sites More sharing options...
RussellReal Posted June 25, 2009 Share Posted June 25, 2009 Java can be either used as an Applet or a Program, Applets are ofcourse, embeddable applications, much like flash. To my knowledge, they're both the same, code wise, except, when you embed it, it is no longer running on the server's side, it is running on the client's side.. Yes, JavaScript is what you're interested in learning though. Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/#findComment-863196 Share on other sites More sharing options...
Axeia Posted June 27, 2009 Share Posted June 27, 2009 Java can be used in a browser via an applet, similiar to Flash. Java can also be used to 'create' a page via JSP, similar to PHP. However an applet doesn't work by default in Vista (or at least it didn't for me and some others) as some settings needs to be changed, not to mention java itself will have to be installed. So far web related purposes that leaves a rather small target group. Javascript comes with any major browser and can be used to enrich the browsing experience, it shouldn't be relied on for vital things like navigation however. Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/#findComment-864638 Share on other sites More sharing options...
corbin Posted June 27, 2009 Share Posted June 27, 2009 However an applet doesn't work by default in Vista (or at least it didn't for me and some others) as some settings needs to be changed, not to mention java itself will have to be installed. So far web related purposes that leaves a rather small target group. I've never had to change any settings to get an applet to work.... (Not running Vista right now, but I did for 2 years.) Also, you have to install it your self with all Windows operating systems, afaik. According to Google Analytics, 91.86% of people who have vied that site have Java. (Google Analytics relies on JavaScript though, so maybe people without JavaScript are less likely to have Java.) Quote Link to comment https://forums.phpfreaks.com/topic/163586-java-or-javascript/#findComment-864705 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.