Hmm.. You know, I found one of definitions - just replace "Backbone.js" with "framework" in the following sentence I got form backbone's site :) >"Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions..."
This is my favorite definition (not sure where I got it from):
- A library is called by your code. - A framework calls your code.
Of course, within a framework you will sometimes call parts of a framework. This means that a framework is a library, but a library is not necessarily a framework.
Frameworks kinda force developers to think and do stuff as framework creators would. It is a bad thing since it limits creators creativity, but its a good thing because it makes him extra productive.
I am starting not to like rails because it imposes way to many things, and it makes it hard when you don't want to play by the rules :)
I think you are answering #1 and #2 by asking #3. "If I use a framework as a library" - aha! you know what Is what.
ReplyDeleteAnd I think that Backbone and Rails are frameworks, as they impose developer their way to handle things.
ReplyDeleteI think that Backbone doesn't call itself a framework? Does it make it a non-framework? ;)
ReplyDeleteHmm.. You know, I found one of definitions - just replace "Backbone.js" with "framework" in the following sentence I got form backbone's site :)
ReplyDelete>"Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions..."
This is my favorite definition (not sure where I got it from):
ReplyDelete- A library is called by your code.
- A framework calls your code.
Of course, within a framework you will sometimes call parts of a framework. This means that a framework is a library, but a library is not necessarily a framework.
This comment has been removed by the author.
ReplyDeleteyou use a library to do some work (to authenticate, to call a service, to parse, etc...)
ReplyDeleteyou use a framework to structure your app.
Frameworks kinda force developers to think and do stuff as framework creators would. It is a bad thing since it limits creators creativity, but its a good thing because it makes him extra productive.
ReplyDeleteI am starting not to like rails because it imposes way to many things, and it makes it hard when you don't want to play by the rules :)
I framework is a library with a bad API.
ReplyDelete@Tartley so true :)
ReplyDeleteIn my humble opinion, a framework is a library + a set of conventions
ReplyDeleteIn the case of a framework, your code is called by it. In the case of a library, your code call it. Rails is a framework, and provides libraries too.
ReplyDelete