ช่วยไขข้อข้องใจหน่อยครับ อ่านหลาย ๆ ที่แล้วยังสรุปไม่ได้

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand

mo.zeal Mon, 20/07/2009 - 18:38

Framework สามารถประกอบด้วย Library หลายๆ version รวมกันครับ

Mo.Zeal - cancerian-9 project

willwill Mon, 20/07/2009 - 19:21

เข้าใจว่า framework คือ "frame" (กรอบ) นั่นแหละครับ คือโปรแกรมเราจะต้องเขียนตามกรอบนั้นๆ (อาจจะฉีกกรอบมานิดหน่อยได้) เช่น web.py ผมจะ output ก็ต้อง return ค่าออกมา ไม่สามารถ print ออกไปตรงๆ เพื่อแสดงบนหน้าเว็บได้ครับ และการเขียนผมก็ต้องเขียน class มารองรับ, สร้าง url mapping และเรียกตัว web.py ให้ทำงานครับ ถ้าไม่เรียก มันก็ไม่เกิดอะไรเท่านั้นเอง ถ้าคลาสไม่มีเมธอดที่ต้องการ มันก็ error หรือไม่สร้าง mapping มันก็คืน 404 ครับ

ส่วน Library เป็นอะไรที่เราจะไปเรียกเมื่อจะใช้ แต่จะเขียนตัวโปรแกรมหลักอย่างไรก็ได้ เช่น urllib เราอาจจะจัด format code ยังไงก็ได้ ให้ output เป็น cli, gtk, qt ก็ได้ แต่พอจะดึง url ก็สามารถ import urllib เข้ามา แล้วใช้ urllib.urlopen ดึงมาได้ครับ

จริงๆ แล้ว framework หลายๆ ตัว อย่าง django มันเป็น loose coupling นะครับ คือดึงเป็นชิ้นๆ มาใช้ได้ อย่างผมเคยเอา temputa ที่ใช้ใน paste มาทำ template ครับ และบาง framework ก็เป็น library มากองๆ กัน อย่าง TurboGears, Pylons ซึ่งมันก็เอาที่มีอยู่ใน Python แล้วมาต่อกัน และพัฒนาต่อยอดขึ้นไปครับ

เอ ... แล้ว widget toolkit ต่างๆ นี่มันก็เข้าทำนองของ framework นี่ครับ?

zdk Mon, 20/07/2009 - 19:31

ตาม http://en.wikipedia.org/wiki/Software_framework
ที่ต่างกันอย่างชัดเจนคือเรื่อง flow of control -ถ้าเป็น framework ตัว framework จะเป็นคนจัดการ flow ทั้งหมดโดยเรียกไลบรารี่โค้ดและโค้ดของเราเข้าไปเป็นส่วนหนึ่งของ flow

Framework.call({Your code});

ตาม concept -> http://en.wikipedia.org/wiki/Hollywood_Principle

-แต่ถ้าเป็นไลบรารี่เราจะเป็นคนจัดการ flow เอง เรียกไลบรารี่เอง ตัดสินใจเอง

You.call({Library code});

Thaina Mon, 20/07/2009 - 20:51

เฟรมเวิร์คเป็นไลบรารี่ชนิดนึงครับ แต่เป็นไลบรารี่ที่กำหนดไว้ว่า เราต้องสร้างคลาสให้มีหน้าตาแบบที่มันต้องการ แล้วจะใช้งานมันได้แบบเต็มประสิทธิภาพ

อย่างใน C# มันจะบอกว่า จงใช้คำสั่ง Application.Run(new คลาส Form ที่เราสร้างไว้)

แล้วมันจะสั่งรัน Init() Show() ให้เรา เวลามีปุ่มโดนกด มันก็จะไปเรียก event ให้เรา ถ้าเรามีอะไรอยากทำกับปุ่มไหน ก็ไปเขียน Event เวลากดปุ่มปิดวินโดว์ มันก็จะมาดูว่าเราเขียนอะไรไว้มั้ย ถ้าเขียนไว้มันก็จะทำให้ อะไรแนวนี้

เคยยกมาไว้ใน blog ครับ ที่ http://www.thaicyberpoint.com/ford/blog/id/475/

Library vs. Framework (http://techembassy.blogspot.com/2006/05/library-vs-framework.html)

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 เราเป็นคนใช้ code ของมันเป็นหลัก ส่วน framework เราเป็นคนเขียน code ให้มันเอาไปใช้

library คือส่วนกลับของ framework ครับ

magicbank Tue, 21/07/2009 - 23:02

In reply to by Ford AntiTrust

โอว์ ตรงประเด็น และเข้าใจง่ายดีครับ

Framework เราต้องเขียน code ให้มันมาเรียกใช้เรา

Library เราต้องเรียกใช้ code ที่มันเขียนมาให้เราใช้