Manage software dependencies with IoC and AOP Stefano Leli 14° Workshop DotNetMarche Friday 16 th  April 2010 @sleli [emai...
<ul><li>Software Dependencies </li></ul><ul><li>Service Locator </li></ul><ul><li>Inversion of Control </li></ul><ul><li>D...
<ul><li>What is a Dependency? </li></ul>
Dependencies public RequestService() { ClassB b = new ClassB() b.DoService(); } dependent +DoService() ClassA +RequestServ...
Layer Dependencies <ul><li>High-level modules should not depend on low-level modules. Both should depend on abstractions <...
Why dependencies are evil? <ul><li>Tight coupling of software components </li></ul><ul><ul><li>hard to change because ever...
<ul><li>Scenario </li></ul>
Copier Example Copier + PerformCopy() Keyboard + ReadFromKB(c : char ) Video + WriteToVideo ()  : char
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>Keyboard _reader; </li></ul><ul><li>Video _writer; </li></ul><u...
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>Keyboard _reader; </li></ul><ul><li>Video _writer; </li></ul><u...
<ul><li>Program to an interface, not an implementation </li></ul>
Copier Example <<create>> <<create>> Concrete class should depend on abstraction Robert Martin IWriter IReader Copier + Pe...
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader  _reader; </li></ul><ul><li>IWriter  _writer; </li></ul...
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader  _reader; </li></ul><ul><li>IWriter  _writer; </li></ul...
<ul><li>Towards  </li></ul><ul><li>Decoupling </li></ul>
<<create>> Using a Factory <<create>> Copier + Copier(r : IReader, w : IWriter) + PerformCopy() IWriter IReader Keyboard +...
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><...
<ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><...
Service Locator << create >> <<create>> Copier + PerformCopy() ServiceLocator +Lookup() : Object +RegisterService(o : Obje...
Service Locator << create >> <<create>> Copier + PerformCopy() ServiceLocator +Lookup() : Object +RegisterService(o : Obje...
Service Locator class ServiceLocator { /* Singleton instance */ private static ServiceLocator _instance;  public static vo...
Service Locator <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _wri...
<ul><li>Pro </li></ul><ul><ul><li>Help to avoid coupling </li></ul></ul><ul><ul><li>Centralize dependencies resolution </l...
<ul><li>I nversion  </li></ul><ul><li>o f  </li></ul><ul><li>C ontrol </li></ul>
<ul><li>Inversion of Control , or  IoC , is an abstract principle describing an aspect of some software architecture desig...
<ul><li>Technique for supplying an external dependency to a software component. </li></ul><ul><li>Implemented by a Contain...
IoC Container Copier + Copier(r : IReader, w : IWriter) + PerformCopy() IWriter IReader Keyboard + Read(c : char ) Video +...
<< create >> <<create>> IoC Container <<create>> Copier + Copier(r : IReader, w : IWriter) + PerformCopy() XML Config IWri...
DI: Constructor Injection <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IW...
DI: Setter Injection <ul><li>class Copier </li></ul><ul><li>{  </li></ul><ul><li>private IReader _reader; </li></ul><ul><l...
DI: Interface Injection <ul><li>class Copier </li></ul><ul><li>{  </li></ul><ul><li>private IReader _reader; </li></ul><ul...
<ul><li>Pro </li></ul><ul><ul><li>High Decoupling level </li></ul></ul><ul><ul><li>Completely transparent to the Domain Mo...
<ul><li>A spect </li></ul><ul><li>O riented  </li></ul><ul><li>P rogramming </li></ul>
<ul><li>AOP is a programming paradigm </li></ul><ul><li>AOP is a new way of thinking about software design </li></ul><ul><...
Separation of Concern Searching Booking Payment
Separation of Concern <ul><li>Reduce software complexity </li></ul><ul><li>Limit the impact of change </li></ul><ul><li>Fa...
Crosscutting Concern <ul><li>Crosscutting concerns are functionalities that span multiple modules </li></ul><ul><ul><li>Se...
Crosscutting Concern Booking Payment Searching Security Logging AOP Booking Security Logging Payment Security Logging Sear...
How it works… Object_B Object_A Object Oriented Flow
How it works… Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object ...
How it works… <ul><li>Aspect </li></ul><ul><ul><li>Equivalent to class in OOP </li></ul></ul><ul><ul><li>Used to describe ...
How it works… <ul><li>Join Point </li></ul><ul><ul><li>Well-defined point during the execution of a program (e.g. method i...
How it works… <ul><li>Advice </li></ul><ul><ul><li>action taken by an aspect at a particular join point </li></ul></ul>Asp...
How it works… <ul><li>Pointcut </li></ul><ul><ul><li>Predicate that matches join points </li></ul></ul><ul><ul><li>Advice ...
How it works… <ul><li>Target Object </li></ul><ul><ul><li>Also called Advised Object </li></ul></ul><ul><ul><li>Object bei...
<ul><li>Weaving </li></ul><ul><ul><li>Run-Time Weaving </li></ul></ul><ul><ul><li>Compile-Time Weaving </li></ul></ul>…  b...
References <ul><li>Martin Fowler </li></ul><ul><ul><li>Inversion of Control Containers and the Dependency Injection patter...
Questions?
Slide and Materials <ul><li>www.dotnetmarche.org </li></ul>Grazie!
Upcoming SlideShare
Loading in …5
×

Manage software dependencies with ioc and aop

1,371 views

Published on

Manage software dependencies with io c and aop

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,371
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Manage software dependencies with ioc and aop

  1. 1. Manage software dependencies with IoC and AOP Stefano Leli 14° Workshop DotNetMarche Friday 16 th April 2010 @sleli [email_address]
  2. 2. <ul><li>Software Dependencies </li></ul><ul><li>Service Locator </li></ul><ul><li>Inversion of Control </li></ul><ul><li>Dependency Injection </li></ul><ul><li>Aspect Oriented Programming </li></ul>Agenda
  3. 3. <ul><li>What is a Dependency? </li></ul>
  4. 4. Dependencies public RequestService() { ClassB b = new ClassB() b.DoService(); } dependent +DoService() ClassA +RequestService() ClassB
  5. 5. Layer Dependencies <ul><li>High-level modules should not depend on low-level modules. Both should depend on abstractions </li></ul><ul><li>Robert C. Martin </li></ul>Presentation Layer Business Layer Data Access Layer Depends on DB Depends on Depends on
  6. 6. Why dependencies are evil? <ul><li>Tight coupling of software components </li></ul><ul><ul><li>hard to change because every change affects too many other parts of the system (Rigidity) </li></ul></ul><ul><ul><li>When you make a change, unexpected parts of the system break. (Fragility) </li></ul></ul><ul><ul><li>hard to reuse in another application. (Immobility) </li></ul></ul><ul><li>Software becomes hard to maintain </li></ul><ul><li>Difficult to isolate when testing </li></ul>
  7. 7. <ul><li>Scenario </li></ul>
  8. 8. Copier Example Copier + PerformCopy() Keyboard + ReadFromKB(c : char ) Video + WriteToVideo () : char
  9. 9. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>Keyboard _reader; </li></ul><ul><li>Video _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_reader = new Keyboard(); </li></ul><ul><li>_writer = new Video(); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.ReadFromKeyboard() ) != ' ') </li></ul><ul><li>_writer.WriteToVideo(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Copier Example class Keyboard { public int ReadFromKeyboard() { return Console.ReadKey(true).KeyChar; } } class Video { public void WriteToVideo(int chr) { Console.Write((char)chr); } }
  10. 10. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>Keyboard _reader; </li></ul><ul><li>Video _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_ reader = new Keyboard(); </li></ul><ul><li>_writer = new Video(); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.ReadFromKeyboard() ) != ' ') </li></ul><ul><li>_writer.WriteToVideo(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Copier Example class Keyboard { public int ReadFromKeyboard() { return Console.ReadKey(true).KeyChar; } } class Video { public void WriteToVideo(int chr) { Console.Write((char)chr); } } Problem
  11. 11. <ul><li>Program to an interface, not an implementation </li></ul>
  12. 12. Copier Example <<create>> <<create>> Concrete class should depend on abstraction Robert Martin IWriter IReader Copier + PerformCopy() Keyboard + Read(c : char ) Video + Write () : char
  13. 13. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_reader = new Keyboard(); </li></ul><ul><li>_writer = new Video(); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Copier Example class Keyboard : IReader { public int Read () { return Console.ReadKey(true).KeyChar; } } class Video : IWriter { public void Write (int chr) { Console.Write((char)chr); } }
  14. 14. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_reader = new Keyboard(); </li></ul><ul><li>_writer = new Video(); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Copier Example class Keyboard : IReader { public int Read () { return Console.ReadKey(true).KeyChar; } } class Video : IWriter { public void Write (int chr) { Console.Write((char)chr); } } Problem Dependencies resolution is still here!!!
  15. 15. <ul><li>Towards </li></ul><ul><li>Decoupling </li></ul>
  16. 16. <<create>> Using a Factory <<create>> Copier + Copier(r : IReader, w : IWriter) + PerformCopy() IWriter IReader Keyboard + Read(c : char ) Video + Write () : char ReaderFactory + GetInstance() : IReader WriterFactory + GetInstance() : IWriter
  17. 17. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_ reader = ReaderFactory. GetInstance (); </li></ul><ul><li>_writer = WriterFactory. GetInstance (); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Using a Factory class ReaderFactory { public static IReader GetInstance() { return new Keyboard(); } } class WriterFactory { public static IWriter GetInstance() { return new Video(); } }
  18. 18. <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_reader = ReaderFactory. GetInstance (); </li></ul><ul><li>_writer = WriterFactory. GetInstance (); </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>Using a Factory class ReaderFactory { public static IReader GetInstance() { return new Keyboard(); } } class WriterFactory { public static IWriter GetInstance() { return new Video(); } } We have just moved the problem!!! Problem
  19. 19. Service Locator << create >> <<create>> Copier + PerformCopy() ServiceLocator +Lookup() : Object +RegisterService(o : Object) _instance : ServiceLocator … IWriter IReader Keyboard + Read(c : char ) Video + Write () : char
  20. 20. Service Locator << create >> <<create>> Copier + PerformCopy() ServiceLocator +Lookup() : Object +RegisterService(o : Object) _instance : ServiceLocator … IWriter IReader Keyboard + Read(c : char ) Video + Write () : char
  21. 21. Service Locator class ServiceLocator { /* Singleton instance */ private static ServiceLocator _instance; public static void Load(ServiceLocator arg) { _instance = arg; } /* Storing and Retrieve services */ private Dictionary<string, Object> _services = new Dictionary<string, Object>(); public Object RegisterService(String key) { return _instance._services[key]; } public static void Lookup(String key, Object service) { _services.Add(key, service); } }
  22. 22. Service Locator <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier() </li></ul><ul><li>{ </li></ul><ul><li>_reader = (IReader)ServiceLocator.Lookup(&quot;reader&quot;); </li></ul><ul><li>_writer = (IWriter)ServiceLocator.Lookup(&quot;writer&quot;); ; </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>/* Configure Service Locator method */ private void configureLocator() { ServiceLocator locator = new ServiceLocator(); locator.LoadService(&quot;reader&quot;, new Keyboard()); locator.LoadService(&quot;writer&quot;, new Video()); ServiceLocator.Load(locator); }
  23. 23. <ul><li>Pro </li></ul><ul><ul><li>Help to avoid coupling </li></ul></ul><ul><ul><li>Centralize dependencies resolution </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Introduce dependencies with the locator </li></ul></ul><ul><ul><li>Difficult to test </li></ul></ul>Service Locator
  24. 24. <ul><li>I nversion </li></ul><ul><li>o f </li></ul><ul><li>C ontrol </li></ul>
  25. 25. <ul><li>Inversion of Control , or IoC , is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to traditional programming. </li></ul><ul><li>Hollywood Principle </li></ul><ul><ul><li>“ don't call us, we'll call you.” </li></ul></ul><ul><li>There are many implementations of IoC, Dependency Injections is one of there. </li></ul>What is IoC?
  26. 26. <ul><li>Technique for supplying an external dependency to a software component. </li></ul><ul><li>Implemented by a Container (IoC) </li></ul><ul><ul><li>Creates and assembles component/objects and manages their lifecycle </li></ul></ul><ul><ul><li>Generally configured by coding or external file </li></ul></ul><ul><li>Three forms of injection </li></ul><ul><ul><li>Constructor Injection </li></ul></ul><ul><ul><li>Setter Injection </li></ul></ul><ul><ul><li>Interface Injection </li></ul></ul>What is Dependency Injection?
  27. 27. IoC Container Copier + Copier(r : IReader, w : IWriter) + PerformCopy() IWriter IReader Keyboard + Read(c : char ) Video + Write () : char
  28. 28. << create >> <<create>> IoC Container <<create>> Copier + Copier(r : IReader, w : IWriter) + PerformCopy() XML Config IWriter IReader Keyboard + Read(c : char ) Video + Write () : char IoCContainer …
  29. 29. DI: Constructor Injection <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>IReader _reader; </li></ul><ul><li>IWriter _writer; </li></ul><ul><li>public Copier( IReader reader, IWriter writer ) </li></ul><ul><li>{ </li></ul><ul><li>_reader = reader; </li></ul><ul><li>_writer = writer; </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ( (chr = _reader.Read() ) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>To prefer in case of Mandatory Dependencies
  30. 30. DI: Setter Injection <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>private IReader _reader; </li></ul><ul><li>public IReader Reader </li></ul><ul><li>{ </li></ul><ul><li>set{_reader = value;} </li></ul><ul><li>} </li></ul><ul><li>private IWriter _writer ; </li></ul><ul><li>public IWriter Writer </li></ul><ul><li>{ </li></ul><ul><li>set{_writer = value;} </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ((chr = _reader.Read()) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>To prefer in case of Optional Dependencies
  31. 31. DI: Interface Injection <ul><li>class Copier </li></ul><ul><li>{ </li></ul><ul><li>private IReader _reader; </li></ul><ul><li>public void InjectReader(IReader reader) </li></ul><ul><li>{ </li></ul><ul><li>_reader = reader; </li></ul><ul><li>} </li></ul><ul><li>private IWriter _writer; </li></ul><ul><li>public void InjectWriter(IWriter writer) </li></ul><ul><li>{ </li></ul><ul><li>_writer = writer; </li></ul><ul><li>} </li></ul><ul><li>public void PerformCopy() </li></ul><ul><li>{ </li></ul><ul><li>int chr; </li></ul><ul><li>while ((chr = _reader.Read()) != ' ') </li></ul><ul><li>_writer.Write(chr); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>interface IReaderInject { void injectReader(IReader reader); } interface IWriterInject { void injectWriter(IWriter reader); } Quite Never Used
  32. 32. <ul><li>Pro </li></ul><ul><ul><li>High Decoupling level </li></ul></ul><ul><ul><li>Completely transparent to the Domain Model </li></ul></ul><ul><ul><li>High Configurable </li></ul></ul><ul><ul><li>Integrated with lots of framework </li></ul></ul><ul><li>Cons </li></ul><ul><ul><li>Difficult to understand by newbie </li></ul></ul><ul><ul><li>Complex to debug </li></ul></ul>DI: Consideration
  33. 33. <ul><li>A spect </li></ul><ul><li>O riented </li></ul><ul><li>P rogramming </li></ul>
  34. 34. <ul><li>AOP is a programming paradigm </li></ul><ul><li>AOP is a new way of thinking about software design </li></ul><ul><li>Enhance OOP in separating concerns to improve modularization </li></ul><ul><li>OOP modularizes concerns </li></ul><ul><li>AOP addresses cross-cutting concerns </li></ul>What is AOP?
  35. 35. Separation of Concern Searching Booking Payment
  36. 36. Separation of Concern <ul><li>Reduce software complexity </li></ul><ul><li>Limit the impact of change </li></ul><ul><li>Facilitate reuse </li></ul><ul><li>Simplify components integration </li></ul>Booking Payment Searching OOP Searching Booking Payment
  37. 37. Crosscutting Concern <ul><li>Crosscutting concerns are functionalities that span multiple modules </li></ul><ul><ul><li>Security </li></ul></ul><ul><ul><li>Logging </li></ul></ul><ul><ul><li>Transaction Management </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><li>Hard to model with traditional OOP approach </li></ul><ul><ul><li>Code Scattering </li></ul></ul><ul><ul><li>Code Tangling </li></ul></ul>Booking Security Logging Payment Security Logging Searching Security Logging OOP Crosscutting Concerns Searching Booking Payment
  38. 38. Crosscutting Concern Booking Payment Searching Security Logging AOP Booking Security Logging Payment Security Logging Searching Security Logging OOP Crosscutting Concerns Searching Booking Payment
  39. 39. How it works… Object_B Object_A Object Oriented Flow
  40. 40. How it works… Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  41. 41. How it works… <ul><li>Aspect </li></ul><ul><ul><li>Equivalent to class in OOP </li></ul></ul><ul><ul><li>Used to describe a Crosscutting Concern </li></ul></ul>Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  42. 42. How it works… <ul><li>Join Point </li></ul><ul><ul><li>Well-defined point during the execution of a program (e.g. method invocation, attribute access, exception handling,…) </li></ul></ul>Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  43. 43. How it works… <ul><li>Advice </li></ul><ul><ul><li>action taken by an aspect at a particular join point </li></ul></ul>Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  44. 44. How it works… <ul><li>Pointcut </li></ul><ul><ul><li>Predicate that matches join points </li></ul></ul><ul><ul><li>Advice is associated with a pointcut expression and runs at any join point matched by the pointcut </li></ul></ul>Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  45. 45. How it works… <ul><li>Target Object </li></ul><ul><ul><li>Also called Advised Object </li></ul></ul><ul><ul><li>Object being advised by one or more aspects </li></ul></ul>Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation
  46. 46. <ul><li>Weaving </li></ul><ul><ul><li>Run-Time Weaving </li></ul></ul><ul><ul><li>Compile-Time Weaving </li></ul></ul>… behind the scenes Aspect Object_B Object_A advice Object Oriented Flow Aspect Oriented Flow pointcut = method_B Target Object = Object_B jointpoint = method invocation Weaving
  47. 47. References <ul><li>Martin Fowler </li></ul><ul><ul><li>Inversion of Control Containers and the Dependency Injection pattern </li></ul></ul><ul><li>Robert C. Martin </li></ul><ul><ul><li>The Dependency Inversion Principle </li></ul></ul><ul><li>AOP Alliance </li></ul>
  48. 48. Questions?
  49. 49. Slide and Materials <ul><li>www.dotnetmarche.org </li></ul>Grazie!

×