Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes Benefits of OO 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
Reply locked New topic

Benefits of OO JavaScript

Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502


I have a questions

1. what is benefit of OO javascript than normal procedure based javascript? Is it something with enhanced functions or just OO based?


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />
Stoyan Stefanov
Ranch Hand

Joined: Jul 16, 2008
Posts: 61
well, one simple thing you can do to improve the procedural style is two put all your usual functions behind a namespace (example in this post) to help keep the global namespace clean and avoid naming collisions.

Other than that the benefits of OO in general apply to JS as well.

<a href="" target="_blank" rel="nofollow">my OOJS book</a>
I agree. Here's the link:
subject: Benefits of OO JavaScript
It's not a secret anymore!