abstract-factory

Is the StaticFactory<T> in codecampserver a well known pattern?

CodeCampServer source code contains a generic StaticFactory. I'm surmising that this is a key piece of the mechanism for how the framework plays well with Dependency Injection. Subclasses of which use it's DefaultUnconfiguredState to provide static access to, well, a Default Unconfigured State for themselves which the dependency resolu...

Why do we need Abstract factory design pattern ???

Most of the definition says: An abstract factory provides an interface for creating families of related objects without specifying their concrete classes What is the use of Abstract Factory Pattern as we can achieve the task via creating object of concrete class itself. Why do we have a factory method that creates object of ...

Is the StaticFactory in codecampserver a well known pattern?

UPDATE: this is a duplicate of Is the StaticFactory in codecampserver a well known pattern? ...

abstract factory implementation

Hi, I've implemented an abstract factory like this public abstract class AbstractFactory { private static final Map FACTORIES = new HashMap(); AbstractFactory(FactoryType type) { FACTORIES.put(type, this); } public abstract A getA(); public abstract B getB(); public static AbstractCatalogFact...

Class design according to IoC and Abstract Factory pattern

Hi, Which is the correct way of providing values to a abstract factory method? Eg. interface IFactory { ISomething Create(int runTimeValue); } class Factory : IFactory { public ISomething Create(int runTimeValue) { return new Something(repository, runTimeValue); } } In the example the repository is injected via the cons...

Combining generic MVP pattern with abstract factory pattern

Is there some way to solve my code below? I'm kinda stuck. How can I use a factory to create generic presenters, is it even possible without a non generic base class? public abstract class Presenter<T> {} public SomePresenter : Presenter<ISomeVew> {} public SomeOtherPresenter : Presenter<ISomeOtherView> {} public class Factory() { ...