Week 4

Lecture dates: April 17th and 19th

During this week, we will get to know more about Model-View-Controller (MVC), an architectural pattern your future projects will be based on. Aside from MVC, there are also many more such as MVP and MVMM that you will learn more about.

Last week we learned about each layout in Android's user interfaces. This week we will go in depth into ListView, GridView, and also RecyclerView. These view groups are a little bit more difficult to implement than the rest, and so we'll focus on these to ensure you know how they work and can be used.

Model View Controller (MVC)

For a detailed list of how this Model-View-Controller architectural pattern works and its pros and cons, please read this article on Medium posted by Florina, an Android Developer Advocate who works at Google.

Essentially, the MVC pattern comprises of the following:

Types

Descriptions

Model

Represents the data layer. If you're looking to manage business logic and handle API calls, this is the place to do so.

View

Represents the user interface layer.

Controller

Represents the logic layer. It updates the model when necessary.

Other Architectural and Design Patterns

MVC might be one of the most popular design patterns out there, but there are also several notables one (like MVP and MVVM) that are worth looking up.

Ray Wenderlich wrote an article on common design patterns for Android with Kotlin that is extremely worth the time to read.

There is also an article that breaks down the differences between MVC, MVP, and MVVM at a deeper level. The article is published on Realm.io's blog, but I should mention that Realm Database is a very popular open source database tool that you can integrate with your Android and iOS applications.

Feel free to contact me or Ted if you're ever curious about how Realm works.

Tabs and TabHost

In any application, tabs are extremely useful because they allow the user to easily switch between different sections of your app.

Similar to what we showed you in class, this tutorial will walk you through how to implement tabs in your app.

Last updated