From the course: Android App Development: Design Patterns for Mobile Architecture
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Common architectures - Android Tutorial
From the course: Android App Development: Design Patterns for Mobile Architecture
Common architectures
- [Instructor] Here we have the common architectural models. MVC is the default architecture for Android. The controller is just our activity. The controller uses that data to populate the view which is our layout or anything front-facing. Usually the controller ends up having all the view logic, view, business, database, networking, everything. This is probably the worst state to be in and is usually the starting point for most projects when they're approaching architecture. In MVP, we move all the business database, network logic, that is, all non-view logic into the presenter and hopefully other layers. The view now includes the activity and the controller portion has morphed into the presenter. With our great history of confusing naming, we have this presenter, and it doesn't really present anything. It would make more sense to call it the preparer because it gathers all the data needed for the view, and it also reacts to changes requested by the view. In MVVM, which is called the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.