mvp

How is coordination of child views best handled in MVP?

I am attempting to use MVP in WinForms and am confused on how to best handle coordination among child views. For example, I have a parent view that has two child views. Events on one child view need to cause an action to be taken by the second child view. Should the parent view control this directly? It seems like I am bypassing the M...

MVP - How many presenters

What is common practice, one presenter for View view and one for Edit view, or should it be all in one presenter. ...

How to Implement MVP in Console Application ?

I have following code in Program.cs in console application class Program : IView { private static ViewPresenter _presenter; static void Main(string[] args) { _presenter = new ViewPresenter(this); } } but I cant pass this to presenter, as Main method is static. Now how could I make this work ? ...

Sharing the model in MVP Winforms App

I'm working on building up an MVP application (C# Winforms). My initial version is at http://stackoverflow.com/questions/1422343/ ... Now I'm increasing the complexity. I've broken out the code to handle two separate text fields into two view/presenter pairs. It's a trivial example, but it's to work out the details of multiple presenters...

GWT MVP with a table

When working with MVP in GWT how would you work with a table? For example if you had a table of users does your view look like this? public interface MyDisplay{ HasValue<User> users(); } or would it be more like this? public interface MyDisplay{ HasValue<TableRow> rows(); } MVP makes a ton of sense until you start dealing with...

wpf databinding testing

I'm in the process of learning WPF, where one of the strong suits is supposed to be data binding. When I do a win forms app, because I don't trust data binding much, I use what Fowler would call an assembler and just do it by hand, which makes it easy to test also. I've read Jeremy Miller's blog enough to see he has issues with data bin...

In Presenter First, why is SubscribeSomeEvent method on an interface preferred to plain old events?

I recently found out about Presenter First and read their whitepapers and blogs, etc. In most of the examples I found, the events are not declared directly on the interface but rather as a method for it. For example, public interface IPuzzleView { void SubscribeMoveRequest(PointDelegate listener); // vs event PointDelegate...

How would you use the MVC pattern with Winforms when it comes to using ListViews?

My old way of handling WinForms application was throwing all the logic into the form itself. I'm trying to start utilizing MVC/MVP practices with my WinForms applications. Can someone show me an example of how I would use MVC/MVP in conjunction with say, a ListView? I use to use the Tag property of the ListView itself to store the obj...

WPF Commands - Doing it with no code-behind

I'm building a simple data entry app in WPF form using the MVVM pattern. Each form has a presenter object that exposes all the data etc. I'd like to use WPF Commands for enabling and disabling Edit/Save/Delete buttons and menu options. My problem is that this approach seems to require me to add lots of code to the code-behind. I'm tryin...

How would you work with "MDI-ness" in an application that wants to use the MVP pattern?

The situation: MainForm (assigned to the MainPresenter) is up and running. The user click a ShowFoo button - an event is passed to the MainPresenter which in turn creates new FooPresenter and the FooView. How should I proceed now ? Where should the presenter be created and where should the view be created and most importantly, where shou...

Better way to handle screen scrape object

In my applications I always end up implementing a Model-View-Presenter pattern and usually end up scrapping my View object from the screen with a get property. For example Person IBasicRegistration.Person { get { if (ViewState["View.Person"] == null) ViewState["View.Person"] = new Person(); var Person = (Person) ViewState["Vi...

MVP - User Controls - Hiding the IView interface from consumers?

Hello, I would like to use Model View Presenter pattern for a library containing user controls which will be used in other projects. According to MVP I have to implement an IView-interface on a user control and pass it on to a Presenter-class. In my case the consumers don't need access to the IView-contract. But because the IView-inte...

WPF C# MVC/MVP pattern and user control code-behind

I am developing a large-ish application in WPF/WCF/NHibernate/etc. and have implemented the MVP pattern (although this question is still relevant to MVC) as the core architecture. It feels quite natural to extend and add functionality as well as to come back and make changes on certain bits and pieces, as far as the core architecture is...

MVP and presenter granularity

We've been using the MVP pattern and Winforms with a fair amount of success. However, a question always pops-up about MVP: What is a good granularity for presenters? What I mean by that is: With Winforms, a fine-granularity usually works quite well for user controls. That way, it's easy to reuse user controls and use them as building b...

Popularity of MVP for SharePoint WebParts

Is it a popular techinque to use the Model View Presenter (MVP) design pattern when creating Web Parts for SharePoint? It seems (to me) that this pattern is applied more often in the custom application space. So, if you have any thoughts on this, please share... [Edit] Perhaps the more important question is, if MVP is less popular in ...

MVP ASP.net framework

Can someone provide basic sample / link for MVP Framework. Need to design a website => is much more of Admin type site. SQL Server as database backend. ...

UML diagrams from ASP.net Application design specs.

I work in a mid size company as a intermediate developer and work on developing web projects. I got a situtation where i need to develop UML out of the design specs and this will be the main technical specification (High level though and will get futher changed in process of acutal development). Can someone provide guidlines on how to ...

C# inheritance with views and presenters

I am working with MVP in ASP.NET and wanted see if there is an easier/cleaner way to do this. I have a presenter with a view. It turns out I can reuse some of the view properties and presenter methods in other views/presenters in the same application area. Lets say I have a Bar, which is logically a Foo. The base presenter, FooPresen...

Model-View-Presenter in ASP.NET with ListView and Repeater

I've been exploring the MVP pattern with ASP.NET but I have had trouble keeping all of the presentation logic in the presenter when using a databound control on the page. This following scenario and classes are just for example and the real case I'm working with is more complex. Any ideas or direction would be greatly appreciated. S...

How not to create presenter object in view?

I'm currently trying out some MVP patterns sample and I have been told not create concrete Presenter objects in the View. Is there any way to have Presenter objects created dynamically ? public partial class View: Window, IView { private Presenter _presenter; public View() { InitializeComponent(); _presente...