File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes library vs framework Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "library vs framework" Watch "library vs framework" New topic
Author

library vs framework

bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
can someone tell me what is the main difference between them?

I googled and think that framework is many libraries. But people are using them interchangeably. i need some confirmation here.

thanks!
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Not a lot of difference. Really a library would mean where lots of classes are kept, available for use, and a framework is a lot of classes available for related purposes.
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thank you for your reply. what are the "related purpose" ? you mean a lot of classes working towards a specific goal/purpose
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Yes. Look at the Collections Framework
bryan lim
Ranch Hand

Joined: Dec 26, 2008
Posts: 140
thank you so much.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
You're welcome
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 928

correct me if wrong

i believe that a library is collection of reusable elements
eg: swing, awt

a framework is an approach we take (/borrow/use/incorporate)
eg: AJAX is a framework, spring is a framework


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: library vs framework