mvp

Does Presenter in Model-View-Presenter create views?

China☆狼群 提交于 2019-11-27 00:10:06
问题 How are Views created in MVP? Does the Presenter always create them (in addition to View in case of subviews)? Or is it a separate third-party component or App or something that creates them? Let's also add that I'm probably going to do this on Dojo Toolkit/ExtJS (JavaScript that is). So, I have these code lines: var v = new MyApp.view.User(); var p = new MyApp.presenter.User(); where should both lines go exactly? Does the presenter instantiate the view, or vice-versa? And what instantiates

Shared Element Transitions Between Views (not Activities or Fragments)

心已入冬 提交于 2019-11-26 23:53:47
问题 Let's say I'm using a view-based approach to develop an Android application like for example described in the following article: http://corner.squareup.com/2014/10/advocating-against-android-fragments.html So now I have two full screen views. One is visible and contains a grid of images. The other is hidden and is a detail view of the to-be-clicked image. Without transitions on clicking an image in the grid the grid view will be hidden and the detail view will be shown. Now what if I want to

Does the presenter having knowledge of the Activity / Context a bad idea in the MVP pattern?

柔情痞子 提交于 2019-11-26 23:53:02
问题 I've been playing around with the MVP pattern for a few weeks now and I've come to the point where I need context to start a service and access Shared Preferences . I've read that the purpose of MVP is to decouple the view from the logic and having context within a Presenter may defeat that purpose (correct me if I'm wrong on this). Currently, I have a LoginActivity that looks something like this: LoginActivity.java public class LoginActivity extends Activity implements ILoginView { private

android model view presenter/controller examples [closed]

拜拜、爱过 提交于 2019-11-26 19:15:00
问题 are there any good examples or tutorials on how best to structure an android applications anywhere? am new to java and android and i've built winforms apps using passive and supervising controller variants of model view presenter and model view controller in asp.net but not really seen any examples or code on android that use these sorts of patterns. how do people structure decent size android apps out there in the wild. are there any best practices or should i be sticking rigidly to official

Model-View-Presenter in WinForms

时间秒杀一切 提交于 2019-11-26 16:52:35
I am trying to implement the MVP method for the first time, using WinForms. I am trying to understand the function of each layer. In my program I have a GUI button that when clicked upon opens a openfiledialog window. So using MVP, the GUI handles the button click event and then calls presenter.openfile(); Within presenter.openfile(), should that then delegate the opening of that file to the model layer, or as there is no data or logic to process, should it simply act on the request and open the openfiledialog window? Update: I have decided to offer a bounty as I feel I need further assistance

Event Bubbling and MVP: ASP.NET

百般思念 提交于 2019-11-26 16:41:43
I am trying to learn MVP It is using web forms in ASP.NET. I have two user controls CurrentTimeView.ascx and MonthViewControl.ascx. The CurrentTimeView displayes time. There is a textbox to add days in the same control. The newly got date is called “resultant date”. When the button is clicked for add days, an event is raised “myBtnAddDaysClickedEvent“. On the MonthViewControl, there is a label that shows the month of the “resultant date”. At present I am setting a sample value for the variable “monthValueToPass” (since I don’t know how to do it properly). How do I set the value for

What to use? MVC, MVP or MVVM or…?

本秂侑毒 提交于 2019-11-26 15:15:38
问题 I will start a Java project to develop a desktop application. What to use as presentation layer pattern (MVC, MVP,MVVM or....)? ...if it is possible, with some working small example... :-) 回答1: Actually, the ultimate post you're looking for is this answer this answer from Karsten Lentzsch (of JGoodies fame) in the Swing Frameworks and Best Practices Swing Frameworks and Best Practices thread. Hello, I've been writing Swing apps for several years that many people find elegant. And I teach

Event Bubbling and MVP: ASP.NET

早过忘川 提交于 2019-11-26 06:02:29
问题 I am trying to learn MVP It is using web forms in ASP.NET. I have two user controls CurrentTimeView.ascx and MonthViewControl.ascx. The CurrentTimeView displayes time. There is a textbox to add days in the same control. The newly got date is called “resultant date”. When the button is clicked for add days, an event is raised “myBtnAddDaysClickedEvent“. On the MonthViewControl, there is a label that shows the month of the “resultant date”. At present I am setting a sample value for the

Model-View-Presenter in WinForms

孤街醉人 提交于 2019-11-26 04:57:35
问题 I am trying to implement the MVP method for the first time, using WinForms. I am trying to understand the function of each layer. In my program I have a GUI button that when clicked upon opens a openfiledialog window. So using MVP, the GUI handles the button click event and then calls presenter.openfile(); Within presenter.openfile(), should that then delegate the opening of that file to the model layer, or as there is no data or logic to process, should it simply act on the request and open

What are MVP and MVC and what is the difference?

怎甘沉沦 提交于 2019-11-26 03:13:20
问题 When looking beyond the RAD (drag-drop and configure) way of building user interfaces that many tools encourage you are likely to come across three design patterns called Model-View-Controller, Model-View-Presenter and Model-View-ViewModel. My question has three parts to it: What issues do these patterns address? How are they similar? How are they different? 回答1: Model-View-Presenter In MVP , the Presenter contains the UI business logic for the View. All invocations from the View delegate