# Clean Architecture Tutorial for Android: Getting Started | raywenderlich.com

**URL:** <https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272>\
**Category:** 🎓 Courses & Articles\
**Created:** [August 5, 2019, 4:10pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272 "2019-08-05T16:10:05Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![ikust](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ikust/32/107453_2.png) [@ikust](https://forums.kodeco.com/u/ikust)\
**Post date:** [January 9, 2020, 4:08pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/21 "2020-01-09T16:08:06Z")

</div>

Hi!

Yes, it is ok to pass more different repositories to a single use case.

---

<div class="post-metadata">

**Author:** ![whatmadnessisthis](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/whatmadnessisthis/32/81494_2.png) [@whatmadnessisthis](https://forums.kodeco.com/u/whatmadnessisthis)\
**Post date:** [January 22, 2020, 10:14pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/22 "2020-01-22T22:14:00Z")

</div>

Thanks for the article. It might take a couple of more reads and then a practice myself. My one bit of feedback would be is that I’d have preferred it to have been done in MVP. I feel the article strayed off into MVVM territory too much in the latter half, which I know a little about, but this was quite complex MVVM, so the article stopped being about Clean and about MVVM instead.

---

<div class="post-metadata">

**Author:** ![karles](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/karles/32/81494_2.png) [@karles](https://forums.kodeco.com/u/karles)\
**Post date:** [February 11, 2020, 8:44pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/23 "2020-02-11T20:44:45Z")

</div>

It is a good tutorial for clean arch but i would highly recommend having the extra work to properly implement it with koin otherwise this is only partly complete.

---

<div class="post-metadata">

**Author:** ![rizkialfir19](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rizkialfir19/32/89239_2.png) [@rizkialfir19](https://forums.kodeco.com/u/rizkialfir19)\
**Post date:** [March 24, 2020, 8:38am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/24 "2020-03-24T08:38:49Z")

</div>

Can i see your JSON Response to compare it with mine?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [April 6, 2020, 6:04am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/25 "2020-04-06T06:04:20Z")

</div>

@ikust Can you please help with this when you get a chance? Thank you - much appreciated! :]

---

<div class="post-metadata">

**Author:** ![ikust](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ikust/32/107453_2.png) [@ikust](https://forums.kodeco.com/u/ikust)\
**Post date:** [April 6, 2020, 9:22am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/26 "2020-04-06T09:22:31Z")

</div>

Hi,

sorry for such a late response.

Which JSON Response are you referring to? There are no network request made from the example project so I’m not sure.

---

<div class="post-metadata">

**Author:** ![sagarsuri](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sagarsuri/32/91485_2.png) [@sagarsuri](https://forums.kodeco.com/u/sagarsuri)\
**Post date:** [April 21, 2020, 3:13am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/27 "2020-04-21T03:13:12Z")

</div>

Hey @ikust

Can we inject usecase inside another usecase?  
Where does filtering, sorting belong in the layer?  
If two usecases are almost doing the same thing but dealing with different domain models, different data source, should they be in one usecase?

---

<div class="post-metadata">

**Author:** ![abhimanyu14](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/abhimanyu14/32/101551_2.png) [@abhimanyu14](https://forums.kodeco.com/u/abhimanyu14)\
**Post date:** [April 25, 2020, 8:24pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/28 "2020-04-25T20:24:38Z")

</div>

@ikust

I am using Firebase Firestore which supports Observable get requests. Could you suggest how to implement it in clean?  
Currently, my repository implementation class has LiveData (from AndroidX) & QuerySnapshot(from Firebase) as the function return type. Which mean framework related imports would enter into domain layer.  
Could you explain how this can be done properly.

---

<div class="post-metadata">

**Author:** ![ikust](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ikust/32/107453_2.png) [@ikust](https://forums.kodeco.com/u/ikust)\
**Post date:** [April 27, 2020, 3:18pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/29 "2020-04-27T15:18:24Z")

</div>

Hi @sagarsuri ,

> Can we inject usecase inside another usecase?

the important thing is that Use Case doesn’t depend on anything from framework or presentation layers.  
So, if you have a case where injecting another use case makes sense that’s fine.

> Where does filtering, sorting belong in the layer?

I think a good guideline is to place business rules and logic in the domain layer. If there is logic that is only specific to a certain Use Case and is not a part of business rules (for example sorting or filtering of data to display them a certain way in some Use Case) I think it can go in the Use Case layer.

> If two usecases are almost doing the same thing but dealing with different domain models, different data source, should they be in one usecase?

I think it depends on the Use Cases. Ideally, a single Use Case should represent, a Use Case in the app.  
I’ll try to explain my point of view on the example app from the tutorial:  
Adding a bookmark in the example app is one Use Case.  
Adding a Document to your library is another Use Case. But I wouldn’t try to fit those two use cases into one just because they both do the same operation on different domain models (add them to collection).

---

<div class="post-metadata">

**Author:** ![sagarsuri](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/sagarsuri/32/91485_2.png) [@sagarsuri](https://forums.kodeco.com/u/sagarsuri)\
**Post date:** [May 16, 2020, 11:12am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/30 "2020-05-16T11:12:15Z")

</div>

Hey @ikust

I see all the Usecase classes are concrete classes. As per design principles, we should program for interfaces right? What is your opinion on this?

---

<div class="post-metadata">

**Author:** ![ikust](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ikust/32/107453_2.png) [@ikust](https://forums.kodeco.com/u/ikust)\
**Post date:** [May 19, 2020, 1:56pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/31 "2020-05-19T13:56:16Z")

</div>

Hi @sagarsuri,

I think it’s ok to have Use Cases as concrete classes and it isn’t against SOLID principles. At the moment I can’t think of a situation where you would profit from having separate interfaces and implementations of Use Cases.

---

<div class="post-metadata">

**Author:** ![jamshedalamq](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jamshedalamq/32/81494_2.png) [@jamshedalamq](https://forums.kodeco.com/u/jamshedalamq)\
**Post date:** [June 24, 2020, 5:01am UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/32 "2020-06-24T05:01:40Z")

</div>

I’ve read so many articles and watched so many videos about knowing what is clean architecture and how to implement clean architecture and layers usage. But i couldn’t get the concept. After reading your articles i’ve understood whole concept and i decided to give you a comment. Thanks for your greatly explained article…

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 5, 2020, 1:45pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/33 "2020-07-05T13:45:55Z")

</div>

@jamshedalamq Really glad you like it! Cheers! :]

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 5, 2020, 1:46pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/34 "2020-07-05T13:46:12Z")

</div>

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [July 5, 2020, 1:46pm UTC](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272/35 "2020-07-05T13:46:21Z")

</div>



[Previous page](https://forums.kodeco.com/t/clean-architecture-tutorial-for-android-getting-started-raywenderlich-com/78272.md?page=1)
