# Library vs Framework


Hôm trước có hỏi ở trên [Twitter](http://twitter.com/donamkhanh) (mặc dù cái list của mình chả có mấy người :">):

> web framework or library framework :( Ai cho em lời khuyên :(

Hôm nay nhận được reply của [anh Định](http://pcdinh.googlepages.com/home):

> Phân biệt nhé: library là you call me, framework là I call you ;)

Do trình độ mình có hạn nên đọc hơi mơ hồ :">  Search thêm 1 chút thì nó là thế này:

> A library is about reusable functionalities, but a framework is about reusable behaviors. **A library is something you call/inherit from your code, but framework is something that calls your code or provide services for your code.** A library is a collection of components and classes, where framwork is how abstract classes and components interact with each others.

Cái đoạn bôi đậm chính là cái anh Định nói đến :-x Rất cám ơn anh

