# android-architecture


10/25/2019, 10:00 AM
Hello to all. I have a question regarding external services and domain layer. I am developing an application where I am using Google Places SDK and the Autocompletetion Fragment where the user can call the API to get a Place. The Place contains among other properties an
. I am also storing a Place Entity with Room in SQLite. After that a user of the App can select a Place from a list and display some details about it. To do that I call Google Places API again to fetch Places Detail with the
of the Place selected. I have build the app around the clean architecture approach but I did not find yet a way to handle external ( Google Place) IDs. I don't want to put them in my domain model but I cannot figure out a way to skip that. How do you handle such cases?

Eduard Boloș

10/25/2019, 4:30 PM
As I see it, from a DDD perspective, Google Places belongs to another bounded context, and in this case it’s completely valid to use their ID as a Value Object, nothing to worry about.
as a reference, here is a snippet, describing a very similar use-case as yours, from Implementing Domain-Driven Design, a book which I totally recommend if you are trying to implement a true Clean Architecture


10/25/2019, 5:01 PM
Ok thanks I will check it out
The problem is I can't figure out how to add that to my UseCases etc without coupling them to Google Places specific IDs

Naveenkumar R

12/05/2019, 11:03 AM
@Eduard Boloș I have a doubt here, If I have created an interface for repository in domain module (Pure java module). But my methods return LiveDataT Then what can I do? Can you please suggest me to figure out domain modeling.