Add Class Support To JavaScript: Class.js
1
Aug
// php the_time('Y') ?>
JavaScript, by its nature, doesn't have support for "classes" like other scripting languages.
For any developer who frequently uses classes, Class.js can be a very functional resource to help you "think of the code" how you used to.
With under 1kb of code, it provides a basic class structure which can be easily extended with built-in methods like Extend() or Merge() and the plugin support.
- Tags:
Javascript
- Filed under: Extras, GPL License, Other Scripts/Apps.
- 4 Comments
















4 Responses for "Add Class Support To JavaScript: Class.js"
Mmmm… Just to make it clear, JS uses prototypal inheritance instead of “classical” inheritance but this does not mean that JS doesn’t have classes. IMHO it’s kind of stupid to use a script that adds a non-standard way to handle JS classes. It drives me mad that people try to make JS act like other OO languages rather than learning JS.
wow… this is… bad… no words… must shoot myself…
“For any developer who frequently uses classes, Class.js can be a very functional resource to help you “think of the code” how you used to.”
no… must laserbeamtf myself…………
In case anyone wonders why this code/blogpost is bad and needs to be flamed: Here is a walktrough:
http://gist.github.com/505213
So, in conclusion Class.js is an extremely bad implementation of an extremely bad idea.
For anyone interested in JS programming, I can recommend the Google Tech Talks videos on YouTube:
http://www.youtube.com/results?search_query=google+tech+talks+javascript