Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Aspect Oriented Programming for Beginners

Aspect Oriented Programming for Beginners

Scheduled Pinned Locked Moved ASP.NET
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Brendan Vogt
    wrote on last edited by
    #1

    Hi, Has any one used AOP yet? What's the use of doing it this way? Any helpful articles with some decent tutorials/explanations for beginners? Regards, Brendan

    R 1 Reply Last reply
    0
    • B Brendan Vogt

      Hi, Has any one used AOP yet? What's the use of doing it this way? Any helpful articles with some decent tutorials/explanations for beginners? Regards, Brendan

      R Offline
      R Offline
      Roger Alsing 0
      wrote on last edited by
      #2

      >> What's the use of doing it this way? By using AOP you can model cross cutting concerns and apply these to the rest of your model. Think about how how inheritence works for OOP. Inheritance in OOP makes it possible to reuse code from a baseclass to a subclass. In a similair way you can reuse code via AOP. Lets say you need logging in all your business methods. Then you can apply the same logic onto all of them via AOP. So you can think of it as inheritence at method level, you let a method inherit logic. These magic fragments of code are called an "interceptor" or an "advice" The most naive and obvious usages of AOP is logging and security. But there are lots of other usecases. Personally I used AOP (using my own framework NAspect) to apply things like data binding support and dirty tracking onto ordinairy classes. One common argument against AOP is that it makes it hard to see what happens. e.g. you can not see that the logging code will execute when you look at the code. This is true, and could be a problem. This is ofcourse a very simplified view on AOP, but I hope it gives some idea on what it can do.

      My Blog

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups