Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC pattern on Android

Is it possible to implement the model–view–controller pattern in Java for Android?

Or is it already implemented through Activities? Or is there a better way to implement the MVC pattern for Android?

like image 502
Mohit Deshpande Avatar asked May 27 '10 21:05

Mohit Deshpande


People also ask

Is MVC used in Android?

Most Android developers use a common architecture called MVC, or Model-View-Controller. This pattern is classic, and you will find it in the majority of development projects. It's not the only software pattern, but it's the one we'll study in this course and apply to our TopQuiz application.

What is MVC architecture in Android?

Android Architecture Pattern – MVC stands for Model-View-Controller. While developing big application Architecture Patterns are the right solutions. Model — the data layer, responsible for managing the business logic and handling network or database API. View — the UI layer — a visualisation of the data from the Model.

Is Android MVVM or MVC?

MVC (Model — View — Controller) and MVVM (Model — View — ViewModel) are the two most popular android architectures among developers.

What is controller in MVC in Android?

What is MVC – Model View Controller? An MVC Pattern – stands for MODEL VIEW CONTROLLER, It is a Software Design Pattern, usually used in developing user interfaces. MVC Architecture pattern is a way how the information or data is been presented to the user & how the user interacts/deals with the data view.


1 Answers

In Android you don't have MVC, but you have the following:

  • You define your user interface in various XML files by resolution, hardware, etc.
  • You define your resources in various XML files by locale, etc.
  • You extend clases like ListActivity, TabActivity and make use of the XML file by inflaters.
  • You can create as many classes as you wish for your business logic.
  • A lot of Utils have been already written for you - DatabaseUtils, Html.
like image 148
Pentium10 Avatar answered Sep 27 '22 22:09

Pentium10