mvp

NHibernate, ISession per presenter, multiple presenters open

狂风中的少年 提交于 2020-01-04 07:58:30
问题 How would you solve the following situation: the app is MVP based (WinForms) and at the same time I can have multiple presenters showing. Each presenter has a session attached, and open during the lifetime of the presenter. If I load an entity in one presenter and pass it through to another to show it, and if that entity has some collection to it, I get "Illegal attempt to associate a collection with two open sessions". Now, am I doing something wrong with my architecture? I don't see a

Control modification in presentation layer

痞子三分冷 提交于 2020-01-04 05:48:05
问题 I am using GridView and the data binding occurs in Presenter layer but the cell 1 for example has to be modified and converted to a HyperLink control then I have to call the RowDataBound event in Presenter layer and do the modification inside that event.Is this a OK with MVP? 回答1: I would typically do the data binding and event handling at the View level. By doing it in the Presenter, you are creating a dependency between the Presenter and the View that you want to avoid. I'm not sure how you

Model View Presenter - Passive View - Who loads the Model?

帅比萌擦擦* 提交于 2020-01-04 01:55:13
问题 I'm curious in using the MVP Pattern to improve testability. I have experience with MVC but MVP seems different. I'm having an application that operates on a 'project' file which is in fact an compressed archive of several files and folders. This project should be my model. Where will I put the code that loads the model? I'm also thinking about another abstraction layer: Some kind of BackEndConnection. It will be able to read a project file. It can be an FileBackEndConnection or an

Google Analytics with the MVP design pattern [closed]

安稳与你 提交于 2020-01-03 09:03:16
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . Which is better, putting google analytics code in the presenter or keeping them in the activity? 回答1: I think it should be put in presenter because View shouldn't know nothing about sending GAnalytics. View should be passive as much as it can be, meaning it should only have

Google Analytics with the MVP design pattern [closed]

点点圈 提交于 2020-01-03 09:03:10
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . Which is better, putting google analytics code in the presenter or keeping them in the activity? 回答1: I think it should be put in presenter because View shouldn't know nothing about sending GAnalytics. View should be passive as much as it can be, meaning it should only have

Mvp View knows Model

人盡茶涼 提交于 2020-01-02 07:23:06
问题 I'm trying to use MVP and I notice that my View must know Model that should not happen in MVP I presume. here is example: public partial class TestForm : Form, ITestView { public void LoadList(IEnumerable<AppSignature> data) { testPresenterBindingSource.DataSource = data; } } public interface ITestView { event EventHandler<EventArgs> Load; void LoadList(IEnumerable<AppSignature> data); } public class TestPresenter { private ITestView view; public TestPresenter(ITestView view) { this.view =

Question on the MVP within GWT. (General Overview)

我与影子孤独终老i 提交于 2020-01-02 04:26:30
问题 Could any of you guys give a good explanation of the MVP pattern with regards to use in a GWT application. any example i have viewed, i found it hard to understand the concept of implementing the pattern. Questions such as what is it? what does it achieve, how is it implemented and how can it be extended for future modifications? 回答1: http://code.google.com/webtoolkit/articles/mvp-architecture.html and http://code.google.com/webtoolkit/articles/mvp-architecture-2.html 回答2: The primary goal of

MVP pattern - Passive View and exposing complex types through IView (Asp.Net, Web Forms)

寵の児 提交于 2020-01-01 14:25:15
问题 I've recently switch to MVP pattern with a Passive View approach. I feel it very comfortable to work with when the view interface exposes only basic clr types, such as string mapped to TextBoxes, IDictionary mapped to DropDownLists, IEnumerable mapped to some grids, repeaters. However, this last approach works only when from those grid I care only about one collumn. How can I map grid's multirow content inside IView ? For now, two solutions comes to my mind, both not brilliant: Create a DTO

MVP pattern - Passive View and exposing complex types through IView (Asp.Net, Web Forms)

旧巷老猫 提交于 2020-01-01 14:24:15
问题 I've recently switch to MVP pattern with a Passive View approach. I feel it very comfortable to work with when the view interface exposes only basic clr types, such as string mapped to TextBoxes, IDictionary mapped to DropDownLists, IEnumerable mapped to some grids, repeaters. However, this last approach works only when from those grid I care only about one collumn. How can I map grid's multirow content inside IView ? For now, two solutions comes to my mind, both not brilliant: Create a DTO

Failed to create an instance of Service via deferred binding

不想你离开。 提交于 2020-01-01 04:19:40
问题 I have been trying to build a GWT / Google App Engine web app using the mvp4g framework. I keep getting an error about Failing to create an instance of my Service via deferred binding . My Acebankroll.gwt.xml file looks like: <?xml version="1.0" encoding="UTF-8"?> <module rename-to='acebankroll'> <inherits name='com.google.gwt.user.User'/> <inherits name="com.google.gwt.i18n.I18N"/> <inherits name='com.google.gwt.user.theme.standard.Standard'/> <inherits name='com.mvp4g.Mvp4gModule'/> <entry