Design Patterns Revisited: Taking Advantage of Dynamic Reflective Languages by Stuart Halloway
SmartFactory - one factory for all factories. Allows developers to handle failures rather depending on various factories. Unfortunately, you will have to do Casts. Stuart things that Generics should've never been added and instead we should just have no casts. Instead, the compiler should inject the cast implicitly.
Document d = SmartFactory.getInstance();
Java might be a lot more powerful if we could return a different type from constructors - like Class Clusters in Objective-C. You can get a lot of dynamic features in Java using AspectJ. Java Developers have a lot of responsibility when they start using aspects.
Stuarts talk was 3 hours and I only attended the first half. He's a very good speaker and I enjoyed listening to him more a lot. The basic gist of his talk seemed to be that Java should be more dynamic, and using AspectJ, it can be. I thought he was going to recommend we switch languages - so I was surprised to here him recommend AOP. The last example he gave was how to interrupt a FileInputStream so you could test the condition in a unit test. I can see how this could be quite useful for causing network or database failures and seeing how your application behaves.