View • Attachments (0) • Info
A pattern that is normally discouraged. Remember that a pattern is a consistently reused sequence of steps within programming. Most patterns when discovered are strategically are formulated into a repeatable set of steps. Some patterns are considered anti-patterns because they are discouraged. Usually antipatterns go against some convention, style or programming guidelines, or are just improper usage of normal programming practices.
A point where an aspect and main program meet. You could also call it an injection point for an aspect.
A set of joint points.
A programming paradigm where the normal flow control is inverted. This is sometimes referred to as the Hollywood Principle, "Don't call us. We'll call you." Two good examples are Event-Driven Programming and the Observer Pattern.
Software for normal flow looks like:
... System.out.println("What is your name?"); String name = Scanner.getNextString(); System.out.println("Thank you " + name); ...
Using IOC, this now looks like:
StringBuffer nameBuffer = new StringBuffer(); ... public void init() { SingletonFactory.getInstance().initializeInputReader("What is your name? ", nameBuffer); // Initialize inverted flow "Don't call us" } ... public void run() { wait(); // Wait for the event "We'll call you" System.out.println("Thank you " + nameBuffer); } ...
It's a lot more complicated, but the advantage is the logic is decoupled from the model. As you can see, the nameBuffer is initialized, while the event handler takes care of the logic of modifying it.
Pattern mostly used in Event-Driven Programming where an object notifies interested parties asynchronously that its state has changed.
A consistently reused sequence of steps within programming. Most patterns when discovered are strategically are formulated into a repeatable set of steps. If you find yourself repetitively following a methodology or paradigm, you can probably refactor that into your own pattern to make your code more consistent.
Like a bean except beans can contain logic of some kind. POJO's have absolutely no logic whatsoever. This is useful with the Data Mapper and Domain Model patterns.
Sometimes called a surrogate. A proxy pattern is an object structural type of pattern that is used to defer method/procedure calls until the call is made. This is particularly useful for AOP around advice where new functionality is needed to be given before and after a method is called. The way this works is:
1. Intermediary object is created that extends the original object class. (ie., ObjectProxy would extend Object.)
2. The proxy takes the original object and delegates to it.
See the following diagram.

|
Browse Space |
Explore Confluence |
Your Account |
Add Content |