aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes  Beginning Object-Oriented JavaScript  - future Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark " Beginning Object-Oriented JavaScript  - future" Watch " Beginning Object-Oriented JavaScript  - future" New topic
Author

Beginning Object-Oriented JavaScript - future

Tomasz Prus
Ranch Hand

Joined: May 20, 2008
Posts: 73
Is it possible that JS will be replaced with something in near future or there are some drawings to improve it? I ask because developers often complain of JS and try avoid it.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

Every few months, some technology comes along that claims to be the "JavaScript killer". Never happens.

The triumvirate of (X)HTML/CSS/JavaScript will be with us for a long time.

P.S. People who claim to dislike JavaScript invariably are those that do not understand it. It's actually quite a powerful and interesting language -- especially when you embrace it as a functional language.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jim cato
Greenhorn

Joined: Jul 15, 2008
Posts: 21
I would say that I don't fully understand javascript, but I do like the language and use it whenever necessary.

However, the reasons that I dislike it are it's difficulty to use, such as limited development tools and differences in browser implementations. It is fiddly and awkward.

Can you suggest a way around these issues that may ease my headache and encourage me to get a better understanding of the language?

cheers,
Jim
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30506
    
150

Originally posted by jim cato:
differences in browser implementations. It is fiddly and awkward.

Are you using a library to insulate you from these differences?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jim cato
Greenhorn

Joined: Jul 15, 2008
Posts: 21
No! Perhaps this is where I am going wrong. What library do you recommend? How will this help?

cheers,
Jim
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

I highly recommend jQuery -- in my opinion, it's the least intrusive of the libraries, yet very powerful.

All of the libraries, to varying extents, allow you to program to single browser-agnostic API and they handle the browser differences under the covers.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61187
    
  66

For example, here's the code to load a <div> with the results from an Ajax request (passed a single query parameter from an <input> element) in raw JavaScript:


And here's the equivalent code in jQuery:


And that is a fair comparison. In fact, the jQuery code does some error checking that the raw code example does not do.

I know which code I prefer to use.
[ August 26, 2008: Message edited by: Bear Bibeault ]
Stoyan Stefanov
author
Ranch Hand

Joined: Jul 16, 2008
Posts: 61
Things happen very quickly on the web and lots of stuff can happen in one or two years. But at the same time, many things stay the same. For example, we still code around IE6 quirks (even IE5.5) and IE6 is a 7 years old browser!

Also there are pages created in the previous century which will likely stay unchanged "forever". Browser vendors cannot afford major backward compatibility breakage, so it's very likely that JS will live at least as long as the web as we know it does. JS is also used on the server, and on the desktop (windows scripting host, firefox extensions, etc)

there are different developments on the future JS front. Most recently, an attempt to make JS more like Java seems to have failed in favor of less radical approach. Some history of the JS future here


<a href="http://www.thinkinginjavascript.com" target="_blank" rel="nofollow">my OOJS book</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Beginning Object-Oriented JavaScript - future