mvp

How do you communicate between presenter and view in MVP scheme?

六眼飞鱼酱① 提交于 2019-12-25 05:12:00
问题 Basically there is two options as I know. The first is view expose notifications events which a presenter should be subscribed to. When user clicks on some button on the view, view just triggers some event, notifies that something is changed. The second is just use an observer pattern and let the presenter interfere some contract. Let it be an interface with methods like events I told you above. An presenter-observer should be attached to the view. As Jeremy Miller in his legendary "Build

How do you communicate between presenter and view in MVP scheme?

眉间皱痕 提交于 2019-12-25 05:11:39
问题 Basically there is two options as I know. The first is view expose notifications events which a presenter should be subscribed to. When user clicks on some button on the view, view just triggers some event, notifies that something is changed. The second is just use an observer pattern and let the presenter interfere some contract. Let it be an interface with methods like events I told you above. An presenter-observer should be attached to the view. As Jeremy Miller in his legendary "Build

Model-View-Presenter with Google Web Toolkit (GWT)

不打扰是莪最后的温柔 提交于 2019-12-24 10:56:03
问题 I am thinking about developing a new application using web toolkit. I decided that the best option is going to be to use the Model-View-Presenter Design Pattern. After doing plenty of research, I found two different ways of implementing the skeleton code. (I am still trying to learn MVP and how to best utilize the disjunction between the model and the view) Here are the two links discussing GWT MVP https://developers.google.com/web-toolkit/doc/latest/DevGuideMvpActivitiesAndPlaces https:/

How to handle a session timeout exception (with MVP Places and Activities)?

廉价感情. 提交于 2019-12-24 09:55:54
问题 how do you handle a time out request in a GWT app ? Here is a snipped of my web.xml file : <session-config> <session-timeout>30</session-timeout> </session-config> My GWT project is based on MVP Activities and Places. Whenever the user waits more than 30mn, i want to display a popup and redirect the user to the login page. Here is what i do for all RPC services : public void onFailure(Throwable caught) { ... if (caught instanceof InvocationException) { { Window.alert("Time out de session.

Android MVP Dependency Rules

旧街凉风 提交于 2019-12-24 07:44:59
问题 I've read and tested much about MVP patterns in Android, but I'm here to ask your opinion about what could be the best practice if I want to respect both the "Dependency Rule" and the MVP pattern. How it is explained into many articles (see this link: http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/), our application must be divided into layers and only an outer layer can instantiate and use an inner layer. The inner layer receive all parameters (Variables, contexts,

Why declare a New Type within a VBA Class Module?

只谈情不闲聊 提交于 2019-12-24 05:11:07
问题 I want to follow the MVP Userform architecture described in this excellent answer by Mathieu Guindon. However, I don't understand why in the FilterModel Class Module, and also the FilterForm Userform module, new Types are created within the Class whose elements are then redeclared as Properties of the Class. Why is this necessary? Why not just declare SelectedFilter as a property of type string? Am I missing something? 回答1: Most properties need a backing field. Typically it would look like

Use a ListProperty or custom tuple property in App Engine?

血红的双手。 提交于 2019-12-24 04:06:28
问题 I'm developing an application with Google App Engine and stumbled across the following scenario, which can perhaps be described as "MVP-lite". When modeling many-to-many relationships, the standard property to use is the ListProperty. Most likely, your list is comprised of the foreign keys of another model. However, in most practical applications, you'll usually want at least one more detail when you get a list of keys - the object's name - so you can construct a nice hyperlink to that object

Presentation Model vs Passive View

匆匆过客 提交于 2019-12-23 18:29:51
问题 i am wondering about the difference between the two mentioned patterns. when you consider, that you need synchronization code in the presentation model pattern and that code is in the presentation model itself, then i think the patterns are quite similar. Both delegate events to the presentation model / presenter. presentation model and presenter command the domain model and do also observe the domain model. on occuring changes, they both sync with the view (since the synchronisation code in

How do I follow MVP architecture with 3rd party SDKs?

雨燕双飞 提交于 2019-12-23 09:33:54
问题 I've seen a lot of projects that show how to implement login in MVP, but can't find anything related to Google/Facebook login. What should we do in the case when login flow is strongly bound to Android components life cycle? I see the main benefit of MVP in that we build an abstraction above Context , but this abstraction will appear too complex when we need to follow, for example, Facebook login flow: you need to register FacebookCallback with CallbackManager , call logInWithReadPermissions(

The Model in MVP - Events

扶醉桌前 提交于 2019-12-23 04:39:13
问题 I have a layered architecture as follows; Presentation Service Business Data If I implement MVP for the presentation my understanding is that the Service Layer represents the 'M' i.e. model, is my understanding correct? If so from my interpretation of MVP the model can raise events which my presenters would subscribe to. Does this mean that my service layer would raise events? UPDATED This question has been viewed a number of times but has not attracted any comments or answers, if there is