aspose file tools*
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
Author

Benefits of OO JavaScript

Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

Hi

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?

Thanks
Prabhu


Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />prabhu.venkatachalam@gmail.com
Stoyan Stefanov
author
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="http://www.thinkinginjavascript.com" target="_blank" rel="nofollow">my OOJS book</a>
 
Consider Paul's rocket mass heater.
 
subject: Benefits of OO JavaScript