ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the difference between factory and abstract factory pattern?

user-image
تم إضافة السؤال من قبل Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution
تاريخ النشر: 2013/10/25
Daanish Rumani
من قبل Daanish Rumani , Product Manager , Publicis Sapient

The Factory pattern is applicable for a single class whereas AbstractFactory is for a set of classes. AbstractFactory uses the Factory pattern for each class in addition to defining a few other things.

ahmad mohammed
من قبل ahmad mohammed , JAVA team lead , edu-tek

With the Factory pattern, you produce implementations (Apple, Banana, Cherry, etc.) of a particular interface -- say, IFruit.

With the Abstract Factory pattern, you produce implementations of a particular Factory interface -- e.g.,IFruitFactory. Each of those knows how to create different kinds of fruit.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟