Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6611877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:01:40+00:00 2026-05-25T20:01:40+00:00

Aspect Oriented Programming (AOP) seems like an interesting concept. At first I was pretty

  • 0

Aspect Oriented Programming (AOP) seems like an interesting concept. At first I was pretty enthusiastic about it, but as I read more and saw the use cases people were describing I grew disappointed.

A lot of sites I saw, plus a presentation from the developers of AspectC++, presented use cases that I found rather dubious.

They talked about how AOP can be used to do error handling (throwing exceptions), do bounds checking on parameters and return values, return safe null objects in case something goes wrong, security, etc. Are these just bad examples (and not actual use cases), or am I missing something?

How are you supposed to be aware of what’s happening when you call a function? Virtually anything can happen, depending on what aspects you decide to apply. Isn’t that going to mess up things really really badly? What about API documentation, how am I supposed to write that?

So far the only good use cases for AOP I’ve seen are things like logging or profiling — things that don’t influence the actual logic flow and serve only as debugging tools.

Is AOP useful for anything else other than debugging mechanisms?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:01:41+00:00Added an answer on May 25, 2026 at 8:01 pm

    AOP is most useful when you have concerns that aren’t relevant to the main concern of your application (called orthogonal concerns). It can be super handy when you have to add a concern to existing code (say security to something that was built for internal private use) or have to add functionality that for whatever reason just doesn’t fit into your domain model without really obscuring your business logic.

    I wouldn’t use it anywhere you have to wonder what is happening when you call a function. That seems like code smell to me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newcomer to the idea of aspect-oriented programming but I would like to
Can anyone post an example of Aspect-oriented programming (AOP) that is not logging? I've
Duplicate: What is aspect-oriented programming? Every time I here a podcast or read a
How to achieve Aspect-Oriented Programming in Clojure? Do we need AOP in Clojure? Let's
I was just curious about the subject. I have never used aspect oriented programming
Is there any major weakness for aspect-oriented programming? I like the idea of alleviating
What would be the best way to implement Aspect-oriented programming (AOP) in an Android
When using Aspect Oriented Programming with Policy injection, how do you deal with policy
What is the best tool for Java for aspect-oriented programming? The requirements for a
What are the possible and critical disadvantages of Aspect-Oriented Programming? For example: cryptic debugging

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.