惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
aimingoo的专栏
aimingoo的专栏
I
InfoQ
B
Blog
WordPress大学
WordPress大学
Jina AI
Jina AI
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
G
Google Developers Blog
C
Check Point Blog
月光博客
月光博客
L
LangChain Blog
GbyAI
GbyAI

博客园 - CrazyCoder

Ubuntu 7.10安装mplayer出现failed to load: drvc.so错误的解决办法 QueryString中的加号不见了 Google Docs Presentation is live now! 你是哪种类型的程序员? 在团队中建立领导能力 国内Ruby On Rails最新动态 learning MVC handling popup window in Watir Top 6 List of Programming Top 10 Lists Reflector 5 Released LINQ/C# Learning Guide - via TheServerSide ProgrammingBooks.org first work day of 2007, first work day in new company 2006年的最后一天,以及2007,我最Google的期望 一些安装VS2005 SP1的技巧 下一版VS.NET的一些新功能 [读书笔记]软件开发中,人和过程的关系 Windows Vista SDK released ideaWins,微软推出了免费的Office Accounting 2007 Express
framework vs. library
CrazyCoder · 2007-08-09 · via 博客园 - CrazyCoder

记得一直对这个问题没有一个很清晰的答案,今天看到Martin Fowler的一段文字,觉得很有道理,记录一下。

Inversion of Control is a key part of what makes a framework different to a library. A library is essentially a set of functions that you can call, these days usually organized into classes. Each call does some work and returns control to the client.

A framework embodies some abstract design, with more behavior built in. In order to use it you need to insert your behavior into various places in the framework either by subclassing or by plugging in your own classes. The framework's code then calls your code at these points.

摘自:http://martinfowler.com/bliki/InversionOfControl.html