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
0 answers

communicating between fragments through activity

I have two fragments FGames and FGamesDetail. which display the list of Games and when clicked should populate the FGamesDetail fragment. I am using MVP pattern. I am trying to implement MultiPane layout for tablet to have list and detail view next…
BRDroid
  • 3,920
  • 8
  • 65
  • 143
0
votes
1 answer

Java Mosby Fragments

How can I access MvpFragment from MvpActivity. Fragment, with current code - class Fragment1: MvpFragment(){ override fun createPresenter(): Presenter { return Presenter(getActivity().getApplicationContext()) } …
0
votes
1 answer

Is it possible to set a type that doesn't invoke the render() method in React-Native? mobx state tree

I'm in the process of familiarizing myself with React right now. I chose mobx-state-tree for state management. Since I used the MVP pattern in my Android projects, I would apply the same principle to mobx-state-tree. How I currently implemented, it…
sperling
  • 56
  • 7
0
votes
1 answer

MVP Architecture Dilema about android classes

I have read about MVP and i saw many different implementations of it , so this is the 3 ground rules i follow that relevant to my question. 1 . The View will receive orders from the presenter only about Ui like showImage and will notify the…
Jesus Dimrix
  • 4,378
  • 4
  • 28
  • 62
0
votes
3 answers

Will having an object of MainActivity in another class cause a memory leak?

I know that having static references in the MainActivity class will cause a memory leak but I have to access an object in MainActivity. I have a MainActivity object in a RecyclerView ViewHolder class and I get the existing instance of MainActivity…
J.D
  • 51
  • 7
0
votes
1 answer

RxJava2 on MVP. an when to use it

I'm just learning RxJava on android and I'm implementing MVP pattern on my app. I'm using RxJava on my rest API from model and model to a presenter, From presenter, I'm wondering if I should also implement RxJava from presenter to…
John
  • 3
  • 6
0
votes
2 answers

MVP checkbox implemetation in C#?

my task is to make an e.g. of MVP implementation. I want to have a CheckBox in my View (form) - its role is to switch visible true / false of some fields on form. Do I need to put some some code to Presenter, to keep my project as MVP? Right now I…
dantuch
  • 9,123
  • 6
  • 45
  • 68
0
votes
0 answers

Why using Scopes and Singleton annotations in Dagger2 with kotlin causes error while compiling?

The App is working fine unless i add @MainScope or @Singleton annotation before some "provides" method, then i am getting gradle build error Error:Execution failed for task ':app:kaptDebugKotlin'. Internal compiler error. See log for more…
KubenQPL
  • 113
  • 2
  • 11
0
votes
1 answer

How do I pass SQLite Cursor from MVP Model to View without breaking Presenter?

I have an app implementation using the MVP design, and I want to use a SQLlite database to source data data to the UI View. I don't want/need to use a ContentProvider as the data is only required by my app alone. I know that the View should be…
Simon Hutton
  • 1,677
  • 3
  • 22
  • 35
0
votes
1 answer

Saving State Dynamic UserControls...Help!

I have page with a LinkButton on it that when clicked, I'd like to add a Usercontrol to the page. I need to be able to add/remove as many controls as the user would like. The Usercontrol consists of three dropdownlists. The first dropdownlist has…
Cognitronic
  • 1,426
  • 2
  • 16
  • 29
0
votes
1 answer

How can I remove the Activity context in a Presenter when it is required?

According to this post and some other blog posts, It is bad to have Activity Context in a presenter in an MVP android app. What if one of the method in the presenter requires an Activity context, how can I remove the Activity context in the…
s-hunter
  • 24,172
  • 16
  • 88
  • 130
0
votes
1 answer

How to avoid conditionals for a login?

I'm reading everywhere that if/switch statements are best avoided in most circumstances with OOP. My problem is how to avoid a switch statement when coding a login. I have an MVP structure and a client when logging in will be redirected to the…
Chi
  • 105
  • 3
  • 13
0
votes
1 answer

How is data binding different from using an interface?

With MVVM, the ViewModel replaces the Presenter in driving the View. The differece is that the ViewModel drives the view with DataBinding, while the Presenter drives the view with an interface. The quote is taken from this site. I'm having…
ScottyBlades
  • 12,189
  • 5
  • 77
  • 85
0
votes
3 answers

Where Does JQuery/Client-Side Programming Fit Into MVP and DDD

I'm working on an a pretty big project right now and am trying to implement an MVP architecture. I'm starting to run across a instances where I think JQuery or Javascript might be better suited than server-side code. I'm looking for feedback on…
Cognitronic
  • 1,426
  • 2
  • 16
  • 29
0
votes
1 answer

MVP and multiple behaviours

I've been trying to make a simple notepad app (my first app), using MVP and dagger. I've understood most of the stuff but I'm a little bit lost if I have multiple behaviors. I'll explain. My project hierarchy goes like this : Click here…
1 2 3
99
100