One important characteristic of a framework

本文探讨了软件框架的重要特性之一:控制倒转。通过解释框架如何调用用户定义的方法,而非传统应用程序中的用户代码调用框架的方式,文章强调了框架作为应用活动协调者的作用。此外,还介绍了用户如何通过提供特定方法来定制通用算法以适应特定应用场景。
One important characteristic of a framework is that the methods defined by the user to tailor the framework will often be called from within the framework itself, rather than from the user‘s application code. The framework often plays the role of the main program in coordinating and sequencing application activity. This inversion of control gives frameworks the power to serve as extensible skeletons. The methods supplied by the user tailor the generic algorithms defined in the framework for a particular application.

--Ralph Johnson and Brian Foote
 
框架的一个重要特性就是框架会去调用符合这个框架的方法,而不是用户自己的程序,框架通常在主程序中扮演的是定位和引导程序的活动的角色,倒转控制给了框架充当扩展骨架的能力。用户可以根据特定的应用程序来裁剪框架中的通用算法。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值