JavaScriptECMAScript数据Function函数式编程面向切面编程(AOP)本页总览面向切面编程(AOP)介绍 面向切面编程也叫函数劫持 面向切面编程思想 将与业务模块无关却为业务模块所共同调用的逻辑封装起来,便于减少系统重复代码,降低模块间的耦合度,有利于未来的可操作性和可维护性。 面向切面编程表现 就是两个函数,在Function的原型上加上before与after,在函数执行之前或者之后执行,相当于无侵入把一个函数插入到另一个函数的前面或者后面。 实现