Question

It seems to me that jQuery doesn't seem to be written as an OOP framework, it seems too short, and not verbose enough for that. Am I right in thinking this and if it isn't written as OOP, then what methodology/paradigm are they using?

Was it helpful?

Solution

They use the functional programming paradigm.

It's tiny, it's straightforward, and it's fast.

OTHER TIPS

I would suspect the methodology to be: make it as small and as fast as possible.

jQuery behaves like a monad. Monads are usually used in functional programming langauges such as Haskell, but are not limited to them. See http://importantshock.wordpress.com/2009/01/18/jquery-is-a-monad/

I'm reluctant to say jQuery uses the functional programming paradigm because it is very stateful, which functional programs try to avoid.

No, jquery isn't written to be a oo framework. It is all about abstracting the dom and ajax. Here is a great article about the differences between jquery and mootools: http://jqueryvsmootools.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top