横切变得很明确,易于推理和修改。
Crosscutting becomes explicit, easy to reason about and change.
横切是面向方面编程的专有名词。
Crosscutting is a term specific to aspect-oriented programming.
所有这些都是所谓横切关注点的例子。
那么它们是否也适用于横切关注点呢?
Are they also appropriate for dealing with crosscutting concerns?
方面可以并且通常用普通对象实现横切行为。
Aspects can and often do implement their crosscutting behavior using ordinary objects.
不需要横切领域对象。
因此,怎样才能实现一个横切关注点,例如日志?
So how do we implement a cross-cutting concern such as logging?
现在,我将展示以横切方式提供注释的基本语法。
For now, I'll show you the basic syntax to supply annotation in a crosscutting manner.
横切数个类的行为给集成测试带来了一个特定问题。
Behavior that crosscuts a number of classes poses a particular problem for integration tests.
AOP是在应用程序开发中管理横切关注点的关键。
AOP is key to managing crosscutting concerns in application development.
避免将所有代码与横切关注点类的特殊实例联系起来。
Avoided tying all code to particular instances of cross-cutting concern classes.
注意在撰写本文时,只有AJDT提供横切比较工具。
Note that as of this writing, only AJDT provides a crosscutting comparison tool.
请参阅参考资料来了解关于动态横切的更多内容。
通过划分Aspect代码,横切关系变得容易处理。
By compartmentalizing aspect code, crosscutting concerns become easy to deal with.
用注解捕获应用中特定的横切关注点是一种很简单的方式。
Annotations are an easy way to capture certain crosscutting concerns in the applications.
一旦项目中有了一个或多个横切图文件,就可以进行比较了。
Once you have one or more crosscutting map files in your project, you can perform a comparison.
在本文中,我将介绍测试用方面实现的横切行为的一组技术。
In this article, I introduce a catalog of techniques for testing crosscutting behavior implemented with aspects.
在本文剩下的篇幅中,我将重点讲解静态横切的技术和应用。
For the remainder of the article I will focus on the technique and application of static crosscutting.
此外,静态横切可以把扩展和实现附加到对象的基本结构中。
Moreover, static crosscutting lets you affix extensions and implementations to the fundamental structure of an object.
概念上,这种结构可以以横切的方式在程序元素上附加注释。
Conceptually, such a construct allows you to attach annotations to program elements in a crosscutting manner.
在横切的世界里,横切有两种类型:动态横切和静态横切。
Within the world of crosscutting, there are two types: dynamic crosscutting and static crosscutting.
我在本文中展示的这个例子只横切一个类,但是原理是一样的。
The one I present in this article only crosscuts one class, but the principles are the same. Listing 1 contains one implementation of the Highlighter aspect.
专门化的题目组和关系表指定横切在主题层次结构上的相关关系。
Specialized topic groups and relationship tables specify related-to relationships that cut across the subject hierarchy.
首先是横切规范,它要回答的是关注点影响的是程序的哪些部分。
First, there is the crosscutting specification, where you should ask yourself what parts of the program the concern affects.
抓取策略是个业务层的横切关注点,它会随着业务的变化而变化。
Fetching strategy is a business level cross cutting concern and it changes based on the business use case.
基于签名的切入点不能捕获实现某种横切功能所需要的连接点。
Signature-based pointcuts cannot capture the join points needed to implement certain crosscutting concerns.
EJB 3.0支持拦截器,这使您能够拦截用于横切技术的代码。
EJB 3.0 supports interceptors, which enable you to intercept code for cross cutting techniques.
不过,在试图对其他横切功能使用同样的方法时,它变得不可伸缩。
When you try to apply the same approach to other crosscutting functionality, however, it simply does not scale.
一个横切关注点,在用传统OO方法实现时,会分解成很多类和方法。
A crosscutting concern, when implemented in a traditional OO approach, cuts across many classes and methods.
AOP模块化了横切关注点,因此我要在代码中寻找横切关注点。
AOP modularizes crosscutting concerns, so I should look for crosscutting concerns in my code.
应用推荐