The Library vs Frameworks Debate is Over

by coatta 4/27/2014 11:38:00 AM
And nobody won. Its just that there isn't much of a difference any longer. One of the significant factors that differentiated a library from a framework was control flow. You called a library, it did something for you, and then gave you back a result. A framework, on the other hand, would call into your code when the framework decided it was necessary. And all the mechanism that was making that decision about when to call your code was 'hidden', making it harder to reason about your application as a whole. So there were a lot of arguments about whether frameworks were evil, etc. Fast forward to today. Javascript has become incredibly popular. One of the most interesting architectural aspects of Javascript is that it is single-threaded with the result that a great many interactions occur in the form of callbacks. So, now we have, for example, JQuery which calls itself a 'library', but many of its functions take callbacks as parameters. This means that your code is called at some point in the future over which you have no control. And that sounds oddly like what happens in a 'framework'. My conclusion: frameworks are dead, long live libraries (with callbacks).


<<  June 2017  >>

View posts in large calendar


My opinions are my own, but you can borrow them if you like.

© Copyright 2017

Sign in