Skip to content

UML Package diagram for CleanArchitecture #207

Open
@ashraffouad

Description

@ashraffouad

@android10

Hi,
I came to the concept of Clean Architecture & it is really inspiring. I have read all your 4 articles including the last one for dynamic parameters, & I think you are doing gr8 work here & I really admire your sharing attitude with others.

In the path to understand the code especially I'm not Android guru (Just want to get my hand dirty in Android field) I have used draw.io to draw UML package diagram for the 3 layers as below. (I'm an old guy that is used to UML more in the design field).

If you liked the idea, I can draw several UML diagrams including (Class & sequence) & share it with you & if you can correct me & maybe u are generous enough to write a 5th post to describe the code assisted with diagram it will be great.

clean-architecture-layer

Again thanks for yr gr8 effort, and keep up the good work 👍 👍 👍

Activity

android10

android10 commented on Jan 14, 2017

@android10
Owner

Hello @ashraffouad thanks for the good words! I really appreciate that you guys find all this useful!

By the way, very interesting stuff and I definitely encourage you to keep it up with the diagrams. I cannot promise to write an article about it (many times due to the lack of time) but we can keep the discussion here and I'm sure about one thing: I will definitely share all this with the community.

Thanks for the contribution as well and keep up the good work too!

ashraffouad

ashraffouad commented on Jan 15, 2017

@ashraffouad
Author

No worries about article, I think we can figure out something if you really find such diagrams useful at the end of this discussion. As long you bare with me in answering questions it will be great.

Some thoughts about the project after this package diagram:

1- Presentation layer: "com.fernandocejas.android10.sample.presentation.navigation" package, I think its natural place will be as sub-package under "com.fernandocejas.android10.sample.presentation.view" as it is related to this layer more than separate. What do u think?

2- Presentation layer: "com.fernandocejas.android10.sample.presentation.mapper" it seems separate from "com.fernandocejas.android10.sample.presentation.model" although I think may be for consistency across the whole project to appear as sub-package similar to data layer mapper & its relation with entity "com.fernandocejas.android10.sample.data.entity.mapper". What do u think?

3-I'm trying to find my way in RxJava, but I didn't understand package "com.fernandocejas.android10.sample.data.executor" (Marked red in diagram) having a single class "JobExecutor" and used in the presentation layer ApplicationModule only, can u give me more information?

ashraffouad

ashraffouad commented on Feb 6, 2017

@ashraffouad
Author

@android10 Can you pelase check the above 3 questions mentioned above in comments

android10

android10 commented on Feb 6, 2017

@android10
Owner

@ashraffouad unfortunately I cannot reply every single question from the community due the lack of time. Everything related with this repo is in this section. People are great contributing and repllying questions, so I encourage you to dive deeper, there were super interesting questions.

Also that is why I wrote 2 articles:
http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/
http://fernandocejas.com/2015/07/18/architecting-android-the-evolution/

Will try to quickly reply now:

1 - I think it is a matters of taste. It made more sense to me to have it separately as a separation of concerns. Views contain only android views whereas navigation could also mean deep linking, external intents or urls, that are part of the application navigation.

2 - Good feedback. Although not very strong on this one. Would not mind changing it.

3 - It is not used in the "presentation layer", it turns out that dependency injection (for instance ApplicationModule) sits on this layer for simplicity.

rafipanoyan

rafipanoyan commented on Feb 28, 2018

@rafipanoyan

Hello,
Following a new issue I opened about that, this diagram made my observation more clear :
Isn't this architecture more a classic 3 tier architecture than a Clean Architecture ?

I followed this repository architecture for all my clean arch projects but now I'm wondering if it was really the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @android10@rafipanoyan@ashraffouad

        Issue actions

          UML Package diagram for CleanArchitecture · Issue #207 · android10/Android-CleanArchitecture