Possible Duplicate:
How do I create an abstract base class in JavaScript?
Is it possible to use OOP practices in javascript and create classes and extend abstract classes?
Possible Duplicate:
How do I create an abstract base class in JavaScript?
Is it possible to use OOP practices in javascript and create classes and extend abstract classes?
Is it possible to use OOP practices in javascript
Yes.
and create classes
No, JavaScript doesn't have classes. It is pretty easy to implement them, though, if your design needs them. However, in most cases, if you need classes in JavaScript, you're probably doing something wrong and should rethink your design (or your choice of language, but that is part of the design).
and extend abstract classes?
Since there are no classes: no. But again, you can build them yourself, if you need them. And also again, if you find you need them, you are probably doing something wrong.
By the way: what do classes have to do with OOP practices? Hint: it's OOP, not COP!
Is it possible to use OOP practices in javascript
In JavaScript you can inherit from objects.
var Base = {
...
};
var Extension = Object.create(Base, {
...
});
create classes
There is no notion of class. There is only a notion of prototypical inheritance and a prototype relationship.
extend abstract classes?
Depends, define abstract