Aug 8, 2017 · 1 min read
Hi this is really a very good example in swift where abstract factory pattern is well presented. Big thank you for this.
However, I am having slight confusion here:-
- I assume JobContactProtocol is an abstract factory and all ios,web QA, etc are the different factoryies which creates different products. I am making this point because in Swift we can’t create abstract class ( unless you create some method with fatalerror) so we usually go by using protocol.
- In our case products are different template which is generated by sendRequestResumeEmail()->String which is nothing but smilar to createProduct()->Product
- Now, I am really confused with JobContacterFactory which you say is actual factory which returns different factory based on conrete product type. If this is the case then I am wrong at making point (1) where I say “JobContactProtocol is an abstract factory” .
Anything on it will be much appreciated. Thanks in advance.
