Library vs Framework



The key contrast between a library and a framework is "Reversal of Control". When you call a method from a library, you are in control. but with a framework, the control is modified: the method calls you.





Library:


A library is only an collection of class definitions. The purpose for is just code reuse, i.e. get the code that has just been composed by different coders. The classes and techniques typically characterize particular tasks in a domain specific area. For instance, there are a few libraries of maths which can let coders simply call the functions without redo the implementations of how algorithm works.


Framework:


In framework, all the control flow is already there, and there's a cluster of predefined white spots that you should fill out with your code. A structure is typically more mind boggling. It characterizes a skeleton where the application characterizes its own features to fill out the skeleton. Along these lines, your code will be called by the framework when appropriately. The advantage is that coders don't have to stress over if a design is great or not, but just about implementing domain specific functions.

Post a Comment

0 Comments