Questions tagged [mvp]

Model View Presenter (MVP) is a derivative of the model-view-controller software pattern, used mostly for building user interfaces.

Model-view-presenter (MVP) is a derivative of the model-view-controller software pattern, used mostly for building user interfaces.

In MVP, the presenter assumes the functionality of the "middle-man" (played by the application controller in MVC). Additionally, the view is responsible for handling the UI events (like mouse down, key down, etc.), which used to be the controller's job. Eventually, the model becomes strictly a domain model.

Source: Wikipedia article Model–view–presenter

1962 questions
0
votes
1 answer

how to test presenter class using mockito in model-view-presenter architecture android

I want to create a test for presenter class using mockito tried few ways but getting error mention below. I am following these links here and here and my presenter class public class SignInPresenterImpl extends BasePresenterImpl implements…
Rahul
  • 3,293
  • 2
  • 31
  • 43
0
votes
1 answer

Implement Load More in RecyclerView with PairList using MVP pattern

I'm looking for best practices. I want to implement load more [progressbar] after every 10 items (Using RecyclerView). In past, I did this by simply creating Loader class item and just added into the specific position in my List. Well, this time,…
0
votes
1 answer

Best practices for start() and stop() in Android MVP?

I have some questions regarding the Presenter’s start(), stop() method. What would you normally put into these methods to prevent memory leaks or any potential problem. For example, I have an Activity that host a VideoView. The videoPath passed to…
vxh.viet
  • 388
  • 5
  • 21
0
votes
1 answer

Pass an object in android mvp?

recently I been reading about the mvp pattern on Internet and to be honest, it has been a little bit confusing. I'm trying to re-write an app using the mvp pattern but I reached a point using AsyncTask where I can't figure out how to pass the Object…
Paula Daniela
  • 115
  • 2
  • 10
0
votes
1 answer

Right way for package declaration in android for MVP architecture?

I have added di out of mvp because I am thinking that "di as global which I will use in model/presenter/view packages."
Tushar Pandey
  • 4,557
  • 4
  • 33
  • 50
0
votes
1 answer

getting started with an asp.net webforms UI for c# application which uses nHibernate

Hi I've been building the backend of my application (using nHibernate for data access). So far i've had some simple web-services for manipulating my data, but now I'm required to develop a web UI on for my application (using web forms). I've been…
J. Ed
  • 6,692
  • 4
  • 39
  • 55
0
votes
1 answer

Use multiple presenters for the same Activity

I'm trying to use MVP in my new project. I have a Single Activity and multiple presenters that can be associated with it. Presenter1 - Load Activity Data Presenter2 - Load User data - that can be used in multiple Activities (So this presenter will…
Bhavna
  • 836
  • 2
  • 6
  • 19
0
votes
4 answers

MVP Implementation in Android

I am looking into MVP architecture Implementation in android. I found too many ways(mention end of the question) to implement it in the android studio, but Still, I am confused. Can someone help me to find the right answer of below questions. What…
Ankit Saini
  • 374
  • 5
  • 15
0
votes
1 answer

Android Architecture Questions

I've been reading about architecture to android projects. And I found some stuff, but I guess I misunderstood some concepts or not even understood at all. One of my questions is about handling api objects, if I have a local database, Should I use…
guisantogui
  • 4,017
  • 9
  • 49
  • 93
0
votes
1 answer

MVP: Continue async http request or cancel?

In my phone when minimize aplicatoin then the Android destroy activity. In Developer options I turn "Don't keep activities". I try to implement MVP. I have a activity with button. Steps: User click button As result activity call method from…
Alex
  • 705
  • 1
  • 9
  • 18
0
votes
1 answer

Injecting Context in MVP Presenter Android

I am using MVP Architecture along with Dagger2. I want to get Context in my Presenter using constructor injection. My Activity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); …
Uday Khatry
  • 449
  • 1
  • 8
  • 23
0
votes
1 answer

Wait for pending operations to finish without blocking UI thread

I have a MVP like application, all expensive operations are using Async calls and display an Ajax like gif that indicates the user that something is happening without blocking the main thread. Example: Data entry form, user clicks Save, an async…
Sebastian Piu
  • 7,838
  • 1
  • 32
  • 50
0
votes
1 answer

How to do a right unit test for the Presenter in MVP

I'm using the MVP pattern. And faced with a problem of covering the Presenter with unit testing. Behavior: View(Form) has two buttons on it - Ok and Apply. If Ok button is pressed then the Data must be validated and in a case of success the Data…
dream2work
  • 1,377
  • 2
  • 10
  • 18
0
votes
2 answers

MVP pattern for retriving model

i'm developing an android app using MVP pattern. I'd like to have different presenters, and each one implements getItems, that call a getAll static method of the associated model. I thought to use generics, ended up like this: public class…
stefano capra
  • 159
  • 5
  • 13
0
votes
2 answers

Android MVP: Best Practice

I am working on a sample Android app and i am trying to implement a presenter class since i follow MVP pattern. My presenter implementation is below public class WeatherForecastPresenter extends AsyncTask { private…
Tartar
  • 5,149
  • 16
  • 63
  • 104
1 2 3
99
100