cafebabe1991
cafebabe1991

Reputation: 5186

Architecture guidance for an android application

I am working on some application that has different type of users namely a mechanic and a customer. Now I have two solutions

1 To make separate applications for both

Pro: Modular application,manageable and lesser size .

Con: Code redundancy like login pages for both apps.

2 To make a single application for both.

Pro: One application caters so overhead saved.

Con: Lot of thinking and flexible arch. In place is needed.

I am kinda confused ,if someone can guide me with this.It'll be great. Some sort of examples and links would be superb. Diagrams would also do.

Upvotes: 0

Views: 83

Answers (1)

matiash
matiash

Reputation: 55370

I guess the most reasonable option would be to have:

  1. A Library Project with the common parts (anything you want to reuse, basically), and
  2. Two Application Projects for the distinct applications.

That way you can reuse the common parts (no duplication) and still keep the specific parts separate.

See Managing Projects in the Android documentation, this precise scenario is listed as one of the main use cases for library projects:

If you are developing multiple related applications that use some of the same components, you move the redundant components out of their respective application projects and create a single, reuseable set of the same components in a library project.

Upvotes: 1

Related Questions