28

are there any good examples or tutorials on how best to structure an android applications anywhere?

am new to java and android and i've built winforms apps using passive and supervising controller variants of model view presenter and model view controller in asp.net but not really seen any examples or code on android that use these sorts of patterns.

how do people structure decent size android apps out there in the wild. are there any best practices or should i be sticking rigidly to official android documentation.

solrevdev
  • 8,863
  • 11
  • 41
  • 49

4 Answers4

18

Try with the following two examples. I've found them useful in understanding how MVP might apply to Android applications.

http://web.archive.org/web/20120524010643/http://chicagoandroid.com/forum/topics/mvp-android-perspective

http://web.archive.org/web/20130525044856/http://jamespeckham.com/Blog/10-11-21/MVP_on_Android.aspx

Taryn
  • 242,637
  • 56
  • 362
  • 405
superjos
  • 12,189
  • 6
  • 89
  • 134
  • 2
    @Mohit: The mentioned Google IO video is more about User Interaction/ User eXperience design patterns, than (Graphical) User Iterfaces design patterns to which MVP/ MVC belong. – superjos Feb 17 '11 at 00:25
  • @JDPeckham well, it's a good example that goes to the point, so ... :) – superjos Aug 04 '12 at 10:41
  • http://www.jamespeckham.com/blog/10-11-21/MVP_on_Android.aspx is Broken – Fred Ondieki Oct 31 '13 at 06:08
  • There must have been a major re-building of the blog. Maybe @JDPeckham can help – superjos Oct 31 '13 at 09:02
  • 2
    Wayback machine link for jamespeckham's dead link: http://web.archive.org/web/20120904080602/http://jamespeckham.com/blog/10-11-21/MVP_on_Android.aspx – tim.paetz Dec 01 '13 at 04:46
2

Also Mosby implements an MVP pattern plus other things, but it is modular enough so that you can use only the MVP part and forget about the rest.

There is also a nice blog post covering the motivations and choices of this library

Julian Suarez
  • 4,499
  • 4
  • 24
  • 40
1

Check out the Android Developers page. There you will find the answers to all of your questions. And MVC is already present in Android. Check out this question. The videos here can explain what you're looking for.

Community
  • 1
  • 1
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
0

I created an application to manage my expenses. It is built using MVP pattern. I have explained it in this post.

Ajit Singh
  • 2,436
  • 23
  • 27