Android-cleanarchitecture: How to deal with complicated view?

Created on 22 Aug 2016  路  1Comment  路  Source: android10/Android-CleanArchitecture

one view can only hold single presenter, single usecase can only do single thing . But when the view or the business logic is too complicated ,its presenter must hold many usecase. when the logic between multiple usecase is very complicated , the code of presenter must be hard to maintain.
i want to reuse multiple usecase in multiple views without single presenter.
so , what should i do? Create combined usecase in domainlayer ( maybe not do single thing ) or use multiple useCase in presenter still?
And i wonder where the result data of single usecase should be place(the data used by other usecase later, or the status data) , the presenter?

discussion question

Most helpful comment

According to _Entity-Control-Boundary Pattern_, you may create use cases (or control objects, as originally named by Jacobson) that consume other use cases.

image011

Too many use cases in a single presenter could lead to you a Good Anti-Pattern, but is up too you decide when you presenter is becoming a demigod.

Object calisthenics advocates your entities should not exceed 50 lines, but since Java is a garrulous language, 150 lines would be a good catch.

>All comments

According to _Entity-Control-Boundary Pattern_, you may create use cases (or control objects, as originally named by Jacobson) that consume other use cases.

image011

Too many use cases in a single presenter could lead to you a Good Anti-Pattern, but is up too you decide when you presenter is becoming a demigod.

Object calisthenics advocates your entities should not exceed 50 lines, but since Java is a garrulous language, 150 lines would be a good catch.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Joy-Whale picture Joy-Whale  路  5Comments

Cook1 picture Cook1  路  4Comments

ashraffouad picture ashraffouad  路  5Comments

rshah picture rshah  路  6Comments

Neoklosch picture Neoklosch  路  6Comments