Cross-cutting concerns are functions of a program which affect other functions. Since they cannot be completely modularized in both the design and implementation, the resulting code will either be scattered throughout different modules that generate necessary data or tied to specific modules that perform dependent operations. Logging changes to the a database is an example of a cross-cutting concern since it involves checking and updating multiple tables.
Questions tagged [cross-cutting-concerns]
65 questions
2
votes
1 answer
Angular opt out of Interceptor behavior
In my angular app, I'm looking for a way to handle all server response errors (with a popup box showing an error message) but allow a controller to opt out of this behavior and do it's own error handling if needed when calling a $resource.
I was…

Planky
- 3,185
- 3
- 29
- 39
2
votes
1 answer
Refactoring: Cross Cutting Concerns workaround
Is there a workaround for implementing cross cutting concerns without going into aspects and point cuts et al.?
We're in Spring MVC, and working on a business app where it's not feasible to go into AspectJ or Spring's aspect handling due to various…

MadAboutSpring
- 21
- 1
2
votes
2 answers
Dependency Injection + Ambient Context + Service Locator
Recently I was reading a lot of stuff about application design patterns: about DI, SL anti-pattern, AOP and much more. The reason for this - I want to come to a design compromise: loosely coupled, clean and easy to work with. DI seems ALMOST like a…

Dmitry Golubets
- 570
- 5
- 13
1
vote
0 answers
Is the configuration in the log4j2.xml file overrided by using the programmatic configuration?
I want to override some configuration programmatically for the default in my common library that should be automatically loaded by other spring boot application loading it.
How should I approach it.
What I have tried is
@Plugin(name =…

Saurabh kumar Gupta
- 11
- 2
1
vote
1 answer
Logging the AOP-way and custom messages
I am trying to implement logging capabilites into my application using Autofac's IInterceptor interface provided by Autofac.Extras.DynamicProxy. This is what I got so far.
A service which actions should get logged:
[Intercept("log-calls")]
public…

Matthias Güntert
- 4,013
- 6
- 41
- 89
1
vote
2 answers
AOP Separating Cross-cutting Concerns
I'm trying to start taking advantage of Aspect-Oriented programming for repetitive tasks. I'm not sure how to go about separating concerns. I'm using C# and for AOP I'm using Castle.DynamicProxy (using Autofac's InterceptedBy feature), but I'm…

Jay Sullivan
- 17,332
- 11
- 62
- 86
1
vote
1 answer
NServiceBus Event For Subscriber From Multiple Sources
if i want to describe a event in nservicebus i would create an interface that gets published from a service and is consumed by one or more subscribers.
let's call the event "systemerror". this event is published every time when a point in the code…

Stephan Schinkel
- 5,270
- 1
- 25
- 42
1
vote
0 answers
Creating a React and React Native component in a single npm package
Is it possible to create a component, living in a single npm package, that would work in both React and React Native?
I have created two variations of a component (View vs div and so on), one for the web and one for react native. I could easily use…

Johan O
- 402
- 5
- 7
1
vote
2 answers
Implement a cross cutting validator for very different methods using c#
I have a small framework with Client/Server Architecture I use this Tools in my Business Layer:
DI = SimpleInjector
DynamicProxy For Interception = Castle.Core
now i need to validate some validations! for example look at this method:
public void…

mohammadreza
- 158
- 12
1
vote
1 answer
Meteor with mantra. Cross cutting concerns
I'm developing application in meteor with mantra. This is a routes.jsx of users module. I want to be able to use requireLogin and redirectUsers in other modules' actions and routes. Or in general how do I deal with cross cutting concerns without…

Dulguun Otgon
- 1,925
- 1
- 19
- 38
1
vote
0 answers
REST API: admin routes, /entity/admin or /admin/entity?
Implementing a RESTful API, and have setup a file structure like so:
|-- api
`-- entity
|-- models.d.ts
|-- models.ts
`-- routes.ts
Admin/sudo routes could go in api/admin/entity_name.ts or api/entity/admin.ts.
Former is…

A T
- 13,008
- 21
- 97
- 158
1
vote
1 answer
Namespace Organization - AOP Validators
I have started using aspects for parameter validation in our development framework. It works nicely, and I enjoy not littering the first half of a public method with validation code.
What I am wondering is if anyone has any recommendations with…

Joseph Ferris
- 12,576
- 3
- 46
- 72
1
vote
0 answers
Aggregating and presenting user related messages to end user in Java
I am developing a Rest API using Apache CXF and currently I am working on finding a way to aggregate client related messages in order to send them back to the client when it is necessary.
For example, lets say that a client invokes one of my…

NikosDim
- 1,398
- 2
- 21
- 40
1
vote
1 answer
Database Controller API with AOP Try Catch
I am in the process of creating an api for database operations where I have to wrap every function call in the api with a try catch. I am basically trying to get the same functionality as decorators in python.
I read a bunch of articles and this one…

Tony
- 133
- 2
- 11
1
vote
2 answers
How can we create a callcontext for async .net methods?
In a synchronous environment, it is easy to create a scoped context which allows you to attach out-of-band context to your current thread. Examples of this are the current TransactionScope or thread-static logging context.
using (new MyContext(5))
…

Jochen
- 95
- 9