Roman Bosák has published a nice post about rapid implementation of the Singleton design pattern using the Eclipse IDE refactoring tools. Some readers argued that it's much more efficient to use Eclipse IDE templates for implementing design patterns. So, you can see here both approaches, as under 2minutes screeencasts, and you can decide for yourself.
First screencast shows classical (by the GOF book) Singleton implementation using Eclipse IDE refactoring facility (01:10):
This screencast shows a thread-safe lazy-loaded Singleton variant implemented using Eclipse IDE templates (01:40):
For this tutorial we have used materials from:
and these books:
- Design Patterns: Elements of Reusable Object-Oriented Software
- Head First Design Patterns
- Holub on Patterns: Learning Design Patterns by Looking at Code
If you are interested in more Design Patterns screencasts, please leave a comment, or use our Poll.