The moose likes Struts and the fly likes Difference between Framework & Library Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Difference between Framework & Library" Watch "Difference between Framework & Library" New topic

Difference between Framework & Library


Joined: Dec 13, 2000
Posts: 15
Can any one pls clear out the difference between 'Framework' and 'Library' concepts as far as Java coding is concerned ?
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
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.

Matthew Phillips

Joined: Dec 13, 2000
Posts: 15
Can you please be more specific with ealborative reasoning?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
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.

Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Consider Paul's rocket mass heater.
subject: Difference between Framework & Library
Similar Threads
What is a framework
Why is Java Collection Framework called a "Framework" ?
defination and difference
API vs Framework
Framework and library difference?