mvp

GWT MVP updating Activity state on Place change

て烟熏妆下的殇ゞ 提交于 2020-01-01 03:17:09
问题 What is the best practise to update Activity state on Place change? Imagine you have an activity with view that displays list of categories and list of items in the category. If different category is selected then app goes to new place with category ID. I want then to only refresh items and not to create new activity that also re-reads category list. My current approach is like this: public class AppActivityMapper implements ActivityMapper { private ItemListActivity itemListActivity; ...

Discuss on MVC implementation on iPhone

有些话、适合烂在心里 提交于 2019-12-31 17:45:31
问题 Im a using the MVC pattern for a while on different frameworks such as (swing, android, gwt ...) Now, I'm learning the iPhone framework and I am quite surprised about MVC implementation. The questions I am asking are about the view and controller interaction. First of all, that's the way I conceive the MVC pattern : The view and the controller communicate each other through an interface (one for the view and an other one for the controller) In my conception of the MVC pattern, the controller

MVP to MVVM Android

99封情书 提交于 2019-12-30 10:27:50
问题 One guy from here told me that MVVM is better than MVP he told me many pros and many conts, but I'd like to know if my MVP is well done or if you know any other way maybe to convert to MVVM. It's a Sign in with Google MVP. I won't put all of the code but I'll put the folders and little explanation : -Model User (Simple user pojo class) -Presenter I have an object of my IGoogleLoginView where I call the methods, but here I have the logic createGoogleClient() , signIn() , onActivityResult() ,

how Implement usercontrol in winforms mvp pattern?

ぃ、小莉子 提交于 2019-12-30 05:03:27
问题 I want to Implement MVP pattern. I have a user control that has some Textboxes and when I put it in form I call a method from usercontrol and fill textboxes. But in mvp pattern I don't know how I can access to usercontrol1.fill() . Do you have an example that could help me? 回答1: Here is an example implementation of the pattern. The Presenter only knows about the interface having a show method. The Presenter calls it, but the only the form (aka View) implements how the form should be displayed

Composition vs Inheritance in MVP

主宰稳场 提交于 2019-12-30 00:59:10
问题 I'm using MVP pattern to develop a large scale application. While working in the development I have come up with the question whether if composition or inheritance should be used. For example: Let's assume that I have a form called Foo with fields A and B . In other part of the application I have a form Bar that has the same fields A and B but an additional field C . Currently, the code is written with the inheritance approach in where the view the form Bar inherits from form Foo . The

About presenter pattern in rails. is a better way to do it?

丶灬走出姿态 提交于 2019-12-29 11:40:13
问题 I have in my model: def presenter @presenter ||= ProfilePresenter.new(self) @presenter end The ProfilePresenter is a class that has methods like, get_link(), get_img_url(size), get_sex(), get_relationship_status() and other methods that have not to do with the model, not even with the controller but is used multiple times in the view. So now i use them by doing this: Profile.presenter.get_link # or Profile.presenter.get_img_url('thumb') # returns the path of the image. is not used to make a

Model-View-Presenter passive view: bootstraping - who displays the view initially?

左心房为你撑大大i 提交于 2019-12-29 00:37:20
问题 In the Passive View Model View Presenter pattern, who has the responsibility for displaying the view? I have found related answers for other MVP versions, but they don't seem applicable to the passive view version. I have a concrete example using Java Swing. It's pretty simple, but basically we have a SwingCustomersView which internally builds a JPanel with a table (list of customers) and a label displaying the currently selected customers age. When a customer is selected in the table, the

MVP and UserControls and invocation

做~自己de王妃 提交于 2019-12-28 10:13:07
问题 I'm having some fun trying to get my head around some MVP stuf, as it pertains to User Controls. I'm using .NET WinForms (or something close to it) and Supervising Controller pattern (well, I think I am :). The User Control is itself part of an MVP application (its the View and has an associated Presenter etc). The Presenter is always started first, and it starts the Model(s) and then View(s). The View builds its UI, part of which will be to NEW the UC, which is the View. Now the (form)

What is difference between MVC, MVP & MVVM design pattern in terms of coding c#

北慕城南 提交于 2019-12-28 03:15:38
问题 If we search Google using the phrase "What is difference between MVC, MVP & MVVM design pattern" then we may get few URL's which discuss the difference between MVC MVP & MVVM design pattern theoretically like: MVP Use in situations where binding via a datacontext is not possible. Windows Forms is a perfect example of this. In order to separate the view from the model, a presenter is needed. Since the view cannot directly bind to the presenter, information must be passed to the view via an

Have a module dependent Injection for State in PRISM WPF application

此生再无相见时 提交于 2019-12-25 16:00:40
问题 hi we have a PRISM WPF MVP application, we would like to have a state to share data between the views in the same module. Since PRISM by default doesnt have a state, was wondering if there is any way i could implement this. Presently i have injected a State with Dictionary as back-store, but the problem is its Global i.e available across the modules. i would really like to scope this injection being module specific. I believe unity allows registering different classes to the same interface