I just read Factory Method. I understand that it provides a way to delegate the instantiation to sub-classes. But I couldn\'t understand the possible uses in a real-world sc
From API I'm developing right now:
WebGalleryFactory factory = WebGalleryFactory.newInstance (WebGalleryType.PICASA);
WebAlbum album = factory.createAlbum (title, description);
In this example I use Factory Method to create Abstract Factory of a certain type (PICASA in the example).
These two patterns are often used together.