Skip to main content
7 events
when toggle format what by license comment
May 3, 2021 at 15:18 comment added Navjot Singh Yeah I get your point....your answer was on point...
May 3, 2021 at 15:17 comment added Flater @NavjotSingh: Different responsibility, different class, different question. Note that I'm not trying to be unhelpful, but it would help for you to separate your concerns more, because stacking multiple things into the same class is going to both overly complicate any answer you're going to get, make communication much harder, and becomes harder to maintain in the future. Factories only care about the creation of their product, and that is where their job description ends.
May 3, 2021 at 15:15 vote accept Navjot Singh
May 3, 2021 at 15:13 comment added Navjot Singh There are some post processing operations like linking Products with Catalogs. Once we have scraped all products (i.e. the ProductCollection) and all catalogs (i.e. CatalogCollection), I need to link products with catalogs based on the properties of objects. There can be other such post processing operations as well like linking Products with News. Should I create one class each for these post processing operations? I don't want to bloat the ProductScraper class with all kinds of post processing operations.
May 3, 2021 at 15:05 comment added Navjot Singh thankyou for a detailed answer and I am pretty convinced. My current implementation is exactly same as your suggested simple implementation. I wanted to change the implementation to use special Collection classes for some reasons which I will specify in comments.
May 3, 2021 at 15:01 history edited Flater CC BY-SA 4.0
added 208 characters in body
May 3, 2021 at 14:55 history answered Flater CC BY-SA 4.0