分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

面向切面编程(Aspect-oriented programming--AOP)

发布时间:2023-09-06 01:28责任编辑:彭小芳关键词:暂无标签

FROM: https://en.wikipedia.org/wiki/Aspect-oriented_programming

In computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. 

 It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a "pointcut" specification, such as "log all function calls when the function‘s name begins with ‘set‘". 

 This allows behaviors that are not central to the business logic (such as logging) to be added to a program without cluttering the code, core to the functionality. 

在计算机中,面向方面的编程(AOP)是一种编程范式,旨在通过允许将交叉关注点分离来增加模块性。

它实现的方法是通过在现有代码(建议)中添加额外行为而不修改代码本身,接着通过“切入点”规范分别指定哪些代码被修改,例如“当函数的名字以‘set‘开始时记录所有函数调用”。

这允许将不是业务逻辑核心的行为(如日志记录)添加到程序中,而不会混淆代码和核心功能。

AOP includes programming methods and tools that support the modularization of concerns at the level of the source code,

Aspect-oriented programming entails breaking down program logic into distinct parts (so-called concerns, cohesive areas of functionality). 

AOP包括编程方法和工具,这些东西支持关注点(concern)在源代码层的模块化 

面向方面的编程需要将程序逻辑分解成不同的部分(也就是所谓的关注点--功能性的内聚区域)

面向切面编程(Aspect-oriented programming--AOP)

原文地址:http://www.cnblogs.com/wgapple/p/7966107.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved