Library vs. Framework

จาก Library vs. Framework

A framework is more than a library, and actually maybe has nothing to do with a library.

Here is an interesting article on Martin Fowler’s blog about Inversion of control, but in the article, Martin discuss the difference between the library and the framework, as well he refers to another article about frameworks.

I can summarize the points in both articles in the following:

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.

I can explain the framework by this definition: Framework is an abstract design that embodies how the application works, and it has "hooks" where you can "inject" your module, or component.

เป็นบทสรุปที่ดีมาก ๆ ครับ ไม่ขอแปลแล้วกัน ตรงตัวมาก ๆ มองเห็นภาพชัดเลยสำหรับข้อแตกต่างของ Library กับ Framework ครับผม

2 thoughts on “Library vs. Framework”

  1. อืมมม เป็นบทสรุปที่ดีจริงๆ หลายคนรวมถึงเราเมื่อสี่ห้าเดือนก่อน ก็ไม่รู้จักหรอก เจ้า framework อ่ะ
    เอาเป็นว่าจะรอภาษาไทยนะครับ

  2. ชอบข้อนี้ครับ

    library นี่เราเขียน code เพื่อใช้มัน ส่วน framework เราเขียน code เพื่อให้มันใช้

Comments are closed.