Questions tagged [aspect-oriented]
Refers to Aspect-oriented Programming. According to Wikipedia, in computing, aspect-oriented programming (AOP) is a programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns.
39 questions
1
vote
1
answer
108
views
How to represent CDI interceptors in class diagram?
I have the following classes:
public class MyCaller{
@Inject private MyService service;
private void callerMethod(int arg1, String arg2){
service.serviceMethod(arg1, arg2);
}
}...
1
vote
1
answer
370
views
Wrapping methods without Decorator Pattern or AOP
I have a Dao interface which doesn't have any methods defined.
Then I have multiple classes which implement this interface, like PetDao and HouseDao.
For some of the implementation classes, and some ...
4
votes
1
answer
915
views
Cross-cutting concerns and dependency injection
I've got a web application with an architecture somewhat like a front-controller MVC design. I get HTTP requests, route them, run them through a filter layer, dispatch them to my domain classes which ...
2
votes
2
answers
1k
views
Java: Is reflection bad for AOP situations?
Imagine the following situation:
1. Consume a 3rd party WSDL, out comes thousands of classes.
2. There's an opportunity to optimize performance by using a custom paralleled implementation.
3. Wsdl ...
-2
votes
1
answer
400
views
Role-based declarative security for C#
According to Domain Driven Design and Development In Practice:
Spring Security (a sub-project in Spring Portfolio) provides a
fine-grained access control in both presentation (URL based) and
...
2
votes
1
answer
96
views
Adding behaviors to models without interference
This is my situation:
Models can contain properties which can be models themselves. Each property can have custom behavior, this behavior must be selected through its name (for example: Versionable, ...
5
votes
3
answers
405
views
Patterns to allow for versatile data-flow hooks in Javascript
I have an application where I'd like to add ways for external modules/components to hook during the processes and data-flow and perform actions/modify data.
For the first requirement—performing ...
3
votes
0
answers
68
views
Cache updates after not related REST request completes
I am wondering about the following scenario - it's in the land of Spring/AOP and Ehcache.
Happens in REST Web Application - REST/Service/DAO layers - I have objects in cache (@Repository + @Cacheable)....
1
vote
1
answer
1k
views
(Spring) AOP Design of Transactions
In our application we have several transactions, where each step is extensively logged.
Pseudocode:
@Component
public class OurServiceImpl implements OurService {
...
@Transactional
public ...
4
votes
2
answers
2k
views
Member and Function Injection in C++ Across Multiple Classes
I have a problem in which a variety of classes in C++ will want some functionality that is neither a "has a" nor an "is a" relationship.
The problem is that there are some members with associated ...
1
vote
1
answer
72
views
Scoping behavioral variations to dynamic extents
While reading a paper in the context of Aspect Oriented Programming, I encountered following statement:
Aspects enable scoping variations in space (with a rich variety of
static pointcuts), in ...
7
votes
4
answers
9k
views
Programmatically extending Hibernate table/entity definitions in Spring, how?
I would like to know if there is a way —maybe with AOP— to extend table/entity definitions so that I can add functionality across the board that requires persistence.
Let me explain what I want to do ...
1
vote
1
answer
328
views
DDD: Alternative view of the Model?
I have a model class, let's say it's a Book. I need it to be displayed on the screen. I want to have an escaped version of it, so I do not need to escape fields manually.
What should I do? I can
add ...
0
votes
1
answer
6k
views
Ensure that a method of a class is called after every method call of the same class, how? [duplicate]
I have twenty small methods (m1, m2, m3, etc..) in a class quite different between each other, and after every method i would like to do some common actions, like increasing some counters and in the ...
3
votes
3
answers
2k
views
API - How to handle scope based functionality?
TLDR;
Where and possibly how should I implement scope based logic in the
example code?
I have got a ASP.NET Web Api.
The Api uses OData (on top off REST) for data endpoints and OAuth 2.0 ...