Proposed solution:1. Have a gateway / adapter (I am confused if they are same) for each service.
2. Have a separate domain model for each service.
3. Keep a single return type for search query to simplify the client side work.
Problems / Issues:1. Each API has a different query parameters and return type for the same service.
2. The external APIs may change frequently.
3. Howto handle the case when any API (service) is down?
4. Howto scale i.e. add a new service easily without much changes in the code base.
--
The only way to go fast is to go well.
---
You received this message because you are subscribed to the Google Groups "Clean Code Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clean-code-discu...@googlegroups.com.
To post to this group, send email to clean-code...@googlegroups.com.
Visit this group at http://groups.google.com/group/clean-code-discussion.
Suppose there are a number of food service providers each having its own rate card. Now the issue case is that to get the best deal the user has to go and search individual websites hence I am providing a single interface which allows user to search some food item and get all the results from different providers. Now in future I want to start my own food service and include the results of that too. So, is the single SearchQuery model sufficient in this case. I doubt that. WDYT?
Hi Dave, since every service may have different results but I want this to be transparent to the client. Hence I want to return a uniform result structure for every query for any service.
--