question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Project structure refactoring

See original GitHub issue

Current project structure is not module wise and hence not easily maintainable. For example if someone wants to make some changes in the events showing page then he will need to search for related files in all of the directories. If our project structure is module wise such that all the related files will be contained in a module. For example app/events is a module somewhat like below -

events
  | EventsActivity.java
  | EventsContract.java
  | EventsPresenter.java

EventsContract will contain the interfaces required View.java, Presenter.java.

data should be separate module. which will consist one interface and one class implementing it. (For now)

This would make code readability better. reference - https://github.com/googlesamples/android-architecture/tree/todo-mvp

@niranjan94 @iamareebjamal @Ronak-59 What are your views ?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
iamareebjamalcommented, May 20, 2017

First we should look at implementing the MVP pattern, then we need to discuss how fresh the data must be for the organizer and how it must be refreshed if we use SQlite

It’s another issue of its own

1reaction
iamareebjamalcommented, May 20, 2017

This is an opinionated format and structure of that app is very simple for that use case

Imagine when interfaces will contain many methods, the contract class will increase in size and there will be unnecessary coupling

And google is not generally known to follow even their conventions right. Look at the broken AsyncTask API they try to push down our throat and even new architecture components which force you to write an MVVM implementation.

We should have as less coupling as possible.

Read more comments on GitHub >

github_iconTop Results From Across the Web

project structure - Is it simply Cleaning or Refactoring?
The refactorings Fowler describes are logical cleanups, where, for example, functions with more than one responsibility are reworked and divided ...
Read more >
Refactoring is a Development Technique, Not a Project
“Refactoring is a controlled technique for improving the design of an existing code base. Its essence is applying a series of small behavior-preserving ......
Read more >
What is Refactoring (Code Refactoring)? - TechTarget
Refactoring is the process of restructuring code, while not changing its original functionality. The goal of refactoring is to improve internal code by ......
Read more >
Code refactoring - Wikipedia
In computer programming and software design, code refactoring is the process of restructuring existing computer code—changing the factoring—without changing ...
Read more >
Refactoring and Design Patterns
Refactoring is a systematic process of improving code without creating new functionality. Refactoring transforms a mess into clean code and simple design.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found