| I'll expand on this with my understanding. Library - a collection of useful things.
Framework - a collection of things, and a methodology, used to structure your application. In general, a lot of new, modern frameworks do 'call you' (Inversion of Control). Exmaple: Most PHP frameworks are setup so that you put all your models in one folder, your routes in another, etc. Then the framework itself accepts requests and determines which parts of your code to pass it through, and in what order. However, you can also have frameworks that don't do IoC. You setup the framework, tell it what to do, tell it how to do it. But you still structure your code around that specific framework's methodology (which is why it's hard to mix 'n' match). jQuery is an odd thing, because it's not really either of these. It provides lots of useful functions, but it also does so in a way that it replaces a lot of the 'core language features', and causes you to use it across most of your code. However, I'd still say it's a library (with a very nice syntax) - since it doesn't tell you 'this is how you structure your application'. You can use jQuery how ever you like, and it imposes almost no constraints. Therefore it's not a framework. |