File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Object-Oriented JavaScript? 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 "Object-Oriented JavaScript?" Watch "Object-Oriented JavaScript?" New topic
Author

Object-Oriented JavaScript?

Karl Woods
Greenhorn

Joined: Nov 16, 2005
Posts: 2
Stoyan,

I've been out of the JavaScript loop for several years. When did JavaScript become object-oriented?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

As far as I know, JavaScript has always been based on Objects. Whether that qualifies JavaScript as "object oriented" is a debate that has ranged far and wide among the pedantic. ("JavaScript doesn't have true inheritance", "JavaScript doesn't have polymorphism", blah, blah, blah...).

Personally, I could care less about that debate. You can call JavaScript "object-oriented", or you can call it "object-based", or you can call it "Fred".

All that matters to me is whether I can use it well as a tool to get my goals accomplished.


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

Joined: Jul 15, 2008
Posts: 21
Surely whether a language is object oriented or not matters in design. If a language has features that enable object oriented techniques there are different design considerations than otherwise.

Therefore, to extend the original question, have more OO features been added to javascript over the years to encourage its use in an OO way or is this largely unnecessary because of its other features?

Cheers,
Jim
Stoyan Stefanov
author
Ranch Hand

Joined: Jul 16, 2008
Posts: 61
@Bear - I couldn't have said it better myself

@jim - it's not that OO features have been added, it's that as of the past few years, we have been rediscovering the ones that exist already. ECMA standard, which is the standard developed after JS has been in the wild for quite a while, is itself almost 10 years old.


<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: Object-Oriented JavaScript?