什么是软件框架

最近在看SSH框架(Spring/Structs/Hibernate),什么是框架?为什么要用框架?框架应该怎么用?(What/Why/How)

From WIKI

In computer programming, a software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software. A software framework is a universal, reusable software platform to develop applications, products and solutions. Software frameworks include support programs, compilers, code libraries, tool sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or solution.

 

Frameworks contain key distinguishing features that separate them from normal libraries:

 

  •     inversion of control(控制反转): In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.[1]. 
  •     default behavior(默认行为): A framework has a default behavior. This default behavior must be some useful behavior and not a series of no-ops.
  •     extensibility(扩展性): A framework can be extended by the user usually by selective overriding or specialized by user code to provide specific functionality.
  •     non-modifiable framework code(框架代码不可修改): The framework code, in general, is not supposed to be modified, excepting extensibility. Users can extend the framework, but should not modify its code.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值