Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor project structure to one single module #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
android10 wants to merge 12 commits into master
base: master
Choose a base branch
Loading
from core/refactor-project-structure

Conversation

Copy link
Owner

@android10 android10 commented Jan 31, 2016

Back in time, there were limitations for configuring test frameworks to work all together in the same module on an Android Application, specially if your test battery included Acceptance, Integration and Unit Test.

This PR aims to refactor project structure to sit on one application module avoiding maintainability and configuration overhead. Basically, the idea is to get rid of current presentation, domain and data module, and create an application module with a better package organization/structure.

This is a WORK IN PROGRESS and a good candidate for discussion. There is no final decision to merge it.

omerfarukyilmaz, arifnadeem7, gustavo-pedreros, and kiptoomm reacted with thumbs up emoji kiptoomm reacted with laugh emoji
Copy link

@android10 will this structure changes affect the time required for gradle to build the project?

Copy link

English below.

Hola Fernando, en mi opinión no veo conveniente mover las capas en un único módulo, ya que perderíamos la restricción que los módulos nos proporcionan, y por desgracia se podrían, por ejemplo, hacer referencias a elementos u objetos de la capa de presentación dentro de la capa de datos.
Por poner un ejemplo, no tiene sentido que un repositorio tenga una referencia a una constante o cualquier otra cosa que esté definida en un Activity ¿verdad? Pero si lo ponemos todo en un mismo módulo, y sobre todo hablando dentro de un equipo, algún desarrollador podría hacer este tipo de malas prácticas.

He tenido el mismo problema para compilar la batería de todos los tests en el servidor de integración, pero como solución temporal y para evitar tener que usar sólo un módulo podríamos, por ejemplo, sólo mover los tests al módulo principal, ¿que te parece por ahora?

————————

In my opinion, I don’t think it’s a good idea moving everything into a unique module, because we are going to miss the good restrictions the modules give us, so unfortunately someone could reference objects or any other kind of elements from the presentation layer into data layer.
For instance, it doesn't make sense that a repository can have a reference of a constant or whatever is defined in an Activity right? So, if we finally put everything in just one module, and especially relating to a working team, some developer could do this kind of wrong stuff.

The compiling tests issue you mention happened to me as well in the CI server, but to avoid merging everything in one module, I would like to suggest for now, to move just those tests from the other modules into the main module, What do you think?

trungie and ajay-dewari reacted with thumbs up emoji ehammo reacted with confused emoji

Copy link
Owner Author

@amatkivskiy @kuassivi really appreciate the input and I do understand the needs, so that is why I started a discussion here: #112

Feel free to join, we wanna take the best path here 🔥 😄

Copy link
Contributor

DmitriyZaitsev commented Feb 24, 2016
edited
Loading

Hello Fernando!

(削除) I believe, the division into modules makes it impossible to shoot yourself in the foot, and also makes it impossible to resist the temptation to use wrong dependencies between layers. Modularity helps us to have our code clean, restrictions save us from spaghetti code. (削除ここまで)

UPD 26 Sep 2016:
Having several modules isn't that convenient than having one single module.

  • Top-level architecture and package structure should describe the intent of the app instead of its components.
  • Current modules aren't completely indepent and isolated from each other. They're coupled, so it makes no sense to have them separately.
  • Application isn't a library, so I don't see a strong reason for modularity here.
  • Single module is easier to configure.
  • It's much simpler to create logical layer separation within concrete package.
  • Adding/removing/changing the feature will affect only one package instead of three modules.

@android10 android10 force-pushed the core/refactor-project-structure branch from bf59455 to 2096d04 Compare September 19, 2016 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /