Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6950499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:06:00+00:00 2026-05-27T14:06:00+00:00

I got an android project I’m beginning to work on, and I want its

  • 0

I got an android project I’m beginning to work on, and I want its structure to be as robust as possible.

I’m coming from a WPF MVVM background and I’ve been reading a little about android applications architecture, but I just couldn’t find a straight clear answer about which architecture I should use.

Some people suggested using MVVM – http://vladnevzorov.com/2011/04/30/android-application-architecture-part-ii-architectural-styles-and-patterns/

and others suggested using MVC, but didn’t specify how exactly it should be implemented.

As I said I’m coming from a WPF-MVVM background, and therefore I know it heavily relies on bindings which as far as I understand, are not supported by default in Android.

It seems like there is a 3rd party solution – http://code.google.com/p/android-binding/
But I don’t know if I’d like to rely on that. What if its development would stop and it will not be supported by future APIs and etc..

Basically what I’m looking for is a thorough tutorial that will teach me the best practices for building the application’s structure. Folders and classes structure and etc. I just couldn’t find any thorough tutorial, and I would have expected that Google would supply such a tutorial for its developers. I just don’t think that this kind of documentation handles the technical aspect good enough – http://developer.android.com/guide/topics/fundamentals.html

I hope I’ve been clear enough and that I’m not asking for too much, I just want to be sure about my application’s structure, before my code will turn into a spaghetti monster.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:06:01+00:00Added an answer on May 27, 2026 at 2:06 pm

    First of all, Android doesn’t force you to use any architecture. Not only that but it also makes it somewhat difficult to try to follow to any. This will require you to be a smart developer in order to avoid creating a spaghetti codebase 🙂

    You can try to fit in any pattern you know and you like. I find that the best approach will in some way get into your guts as you develop more and more applications (sorry about that but as always, you’ll have to make lots of mistakes until you start doing it right).

    About the patterns you know, let me do something wrong: I’ll mix three different patterns so you get the feeling of what does what in android. I believe the Presenter/ModelView should be somewhere in the Fragment or Activity. Adapters might sometimes do this job as they take care of inputs in lists. Probably Activities should work like Controllers too. Models should be regular java files whereas the View should lay in layout resources and some custom components you might have to implement.


    I can give you some tips. This is a community wiki answer so hopefully other people might include other suggestions.

    File Organization

    I think there are mainly two sensible possibilities:

    • organize everything by type – create a folder for all activities, another folder for all adapters, another folder for all fragments, etc
    • organize everything by domain (maybe not the best word). This would mean everything related to “ViewPost” would be inside the same folder – the activity, the fragment, the adapters, etc. Everything related to “ViewPost” would be in another folder. Same for “EditPost”, etc. I guess activities would mandate the folders you’d create and then there would be a few more generic ones for base classes for example.

    Personally, I have only been involved in projects using the first approach but I really would like to try the later as I believe it could make things more organized. I see no advantage in having a folder with 30 unrelated files but that’s what I get with the first approach.

    Naming

    • When creating layouts and styles, always name (or identify them) using a prefix for the activity (/fragment) where they are used.

    So, all strings, styles, ids used in the context of “ViewPost” should start be “@id/view_post_heading” (for a textview for example), “@style/view_post_heading_style”, “@string/view_post_greeting”.

    This will optimize autocomplete, organization, avoid name colision, etc.

    Base Classes

    I think you’ll want to use base classes for pretty much everything you do: Adapters, Activities, Fragments, Services, etc. These might be useful at least for debugging purposes so you know which events are happening in all your activity.

    General

    • I never use anonymous classes – these are ugly and will drive your attention away when you are trying to read the code
    • Sometimes I prefer to use inner classes (compared to create a dedicated class) – if a class is not going to be used anywhere else (and it’s small) I think this is very handy.
    • Think about your logging system from the beginning – you can use android’s logging system but make a good use of it!
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a single Android project which I need to build many .apk's from.
I've got a simple android project, its building the APK OK however I can't
I've got an android project that I started from an old standard Java project,
I've got an Android app which has a periodic background Service. I want this
I've got an Android project I'm working on that, ultimately, will require me to
I would like to include sencha touch in my android project. Does anyone got
I've got a Android AppEngine Connected Project I'm trying to build using GWT2.4 RequestFactory
I imported ApiDemos from android-sdk folder using File/New/Project/Android Project/Create Project Existing Samples. When I
When compiling my Android JNI project, I got this error: make: Circular /obj/local/armeabi/libstlport_static.a <-
I got a project where i need to use my Android phone as a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.