DEV Community

Discussion on: Library VS Framework - What is the difference?

 
sarafian profile image
Alex Sarafian

There used to be frameworks (meaning I needed to write code) where the implementation with e.g. a class inheritance was kind of empty. Yet another blurry line. Any kind of code always controls the flow and I can't relate to this distinction.

If you ask me from my Dev years experience, I like your distinction because it kind of matches my practical understanding. I would consider a library something simple though potentially difficult, something were I don't 'care" about what happened inside and hence I need to log around it. I use the term log not at logging but at control and verification. At the moment I become too much involved with what happened then I'm out of a library concept. Maybe in other words, if I inject my code flow in the flow of what I consume then its not a library any longer. But then what about aggregator functions etc?

Again I'm not offering an official explanation but my personal interpretation. Nowadays I can't really place on either side with respect to some libraries, frameworks and components. With the exception of some clear libraries, everything else has become to mixed. At this moment I consider libraries stuff like a powershell module or aws toolkit etc. The code invocation does something compete for which I only care about the success very similar to an API call. I only need to control the flow some the 3rd party invocation.