Where are examples of using the Abstract Factory pattern?


63
views
0
9 months ago by

The Abstract Factory is a base class for implementing factories that generate standard business objects. Please supply links to documentation and examples of such classes, where they are used, what items they create and what special notes apply in each case.

modified 9 months ago by Graham Trott   • written 9 months ago by Graham Trott  

1 Answer


0
9 months ago by

CancelFlights

CancelHotels

CancelTrainTickets

The 3 above each create a BookingItem and implement a Helper interface to provide initialisation code specific to the travel type.

BookRailTrip

The above uses multiple BookingItem, ProductItem and SfsTrainBookingDto factories.

 

See also the document Using the Factory design pattern in service tests. There's also The Factory Pattern, a short slide stack presentation.

modified 9 months ago by Graham Trott   • written 9 months ago by Graham Trott  
Please log in to add an answer/comment or follow this question.