Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Framework & Library

 
AMIT ARADHYE
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one pls clear out the difference between 'Framework' and 'Library' concepts as far as Java coding is concerned ?
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may not be the best definition, but it is the way I think of it. A framework is something that is built to be extended to add your own functionality. A library is something that is built to be used as it will little extension necessary.
 
AMIT ARADHYE
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please be more specific with ealborative reasoning?
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A library is usually a bunch of code that helps you do stuff. The java util classes are a library of helpful programs.
A framework is code that is used to constrain the way you write code. A framework forces you to write code in a particular way. Your code becomes part of the framework rather than using the framework. A framework is like the structure of a building. Your code attaches to the framework and becomes part of the building.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic