mvp

Model-View-Presenter lifecycle management in a plug-in based GUI

When a GUI is composed of several subcomponents that I treat as individual Views with their own Presenter and Models, is there a pattern for gluing them together? Some subcomponents are persistently on the screen while others would get swapped in and out. What would be a good factory pattern for instantiating the respective MVP triad f...

How to MVP with nested/composite presenters?

Hi, How does one build an application (Gtk/Winforms) with MVP pattern with nested presenters? I cannot manage to get it right. Lets say I have a main window (application shell) with a treeview (navigator presenter) and a panel (profile presenter), and want each of those 3 to be separate MVP-components? public class ApplicationShellPre...

MVP: Presenter-Model communication

Hey there, I have a design question about the communication between the model and the presenter in the MVP design pattern -- or more accurately its derived form the passive view. Let's assume the following simple GUI as an example: I have a window where my view is a list and there is the possibility to open a file dialog to select a fi...

Combining generic MVP pattern with abstract factory pattern

Is there some way to solve my code below? I'm kinda stuck. How can I use a factory to create generic presenters, is it even possible without a non generic base class? public abstract class Presenter<T> {} public SomePresenter : Presenter<ISomeVew> {} public SomeOtherPresenter : Presenter<ISomeOtherView> {} public class Factory() { ...

Using NUnit to test that an IEnumerable was sorted correctly (uses nested sort)

I'm using MVP with ASP.NET Web Forms. Being a good TDDer, I want to test all the important behaviors in my Presenter, including the default sort it applies to the result set retrieved from the service layer. The Presenter will be applying a nested sort via LINQ to Objects of the style: public IEnumerable<ViewModel> MyModel{ get ...

Model View Presenter - How to add a reference to assembly Controller/Model

I'm new and learning on how to use MVP - Model View Presenter. In basic terms MVP was derived from MVC patterns. I have a project solutions named Model, Controller, Presenter and UI. Model, Controller and Presenter are reference to each other as the MVC pattern and UI will reference the Controller. How can I display the data to UI which...

Filtering animals using wpf radiobuttons

I am playing with a sample WPF application that is tiered in a Model-View-Presenter manner. The Model is a collection of Animals which is displayed in a view via binding to properties in a presenter class. The XAML has an items control that displays all the animals in a model. The model class has a boolean attribute called 'IsMammal'. ...

MVP, generics and DRY

Hi, I have a problem with my MVP structure that is built upon generic presenters, views etc. and I feel I'm violating DRY and I dont know how to get around it. Example. public class Presenter<TView, TModel> where TView : IView where TModel : Model {} So far everything is fine, but I want to have it like this public class Presen...

Validation on domain entities along with MVP

Hi, How do you apply validation in an MVP/domain environment ? Let me clearify with an example: Domain entity: class Customer { string Name; etc. } MVP-model class CustomerModel { string Name; etc. } I want to apply validation on my domain entities but the MVP model has it's own model/class apart from the domain entity...

Differences between MVC and MVP Patterns

Possible Duplicate: What are MVP and MVC and what is the difference? Can somebody explain me the difference between two design patterns for a web application in .net. I am very clear on MVC Pattern and whenever i think of MVP i always feel its is same as MVC. Please clearly explain the difference between a controller and prese...

GWT MVP Example

Does anyone know a good production scale open source project written with GWT and the MVP pattern. I am flip flopping on a few approaches to design and wanted to see if I could find a project that tackled similar issues. ...

Creating dynamic view in GWT using MVP Arch.

I am starting new project using GWT but in this project view will be dynamic. I will read all metadata from XML configuration files and create view according to this metadata. I want to use MVP architecture with GWT but I need to know how I can use MVP for dynamic view, because all samples I see have static contents. Do you have any sugg...

what should be the role of Controller in gwt applications implementing MVP pattern ?

I am new to GWT and getting back to programming after long gap...my question is about MVP implementation in GWT, I have gone through the following post and they were quite helpfull, but i still have some doubts http://stackoverflow.com/questions/2056/what-are-mvp-and-mvc-and-what-is-the-difference http://stackoverflow.com/questions/123...

Reusing Monotouch code in Monodroid app

Hi, I'm currently implementing a Monotouch application that will eventually be ported to Monodroid. The application is just a client to an OData Web service. Nothing too fancy or performance critical. The challenge is to reuse as much code as possible. I'm aware that the UI APIs for Monotouch and Monodroid are quite different, but I'm...

Use of a separate class to connect to a service when using MVP for a form

Consider a case of a form that is getting its data from a service and is implemented using the MVP pattern. Do I need to isolate the service access in a separate class or it can be kept in the Model class itself. In my particular case, the model class only acts as a pass through to the data access class that eventually calls the service....

Do we need to unit test the GUI when using proper abstraction?

With a good design pattern like MVP, MVC, etc we aim to move all logic out of the GUI. That leaves us with a light weight GUI which ideally just need to "bind" its buttons and fields to properties in some business logic layer. This is a great approach as this layer will be free from GUI stuff, and we can easily write unit tests for it. ...

Does anyone exist who has used JBoss Errai in their projects?

I am searching GWT Design to setup project. I could use MVP(GWTP) or JBoss Errai. I haven't decided yet. Is there anyone who experienced in one of these? You can give advantages and disadvantages of these frameworks. ...

Any good source code to learn MVP from?

Hi guys, i know MVC is the future but for some of us still stuck in the good old webform land, i'm trying to learn how to do TDD and introduce better testing for our current application... basically the asp.net 2.0 c# web app is quite complicated with some logic in sproc, some in the javascript via json data processing, some in user co...

gwt - mvp design

Hi, I'm new to gwt and I'm making an app with header, left-side navigation bar, a menu on top and a panel where I going to show the content. The content panel will have a lot of custom widgets, and the user will can move them, so I'm using gwt-dnd library. How should I desing the UI? Should I put menu, navigation bar and content in ...

Does anyone have an insight into ASP.NET WebFormsMVP?

Recently I ran into this open source project ASP.NET WebformsMVP. It seems like an alternative to asp.net mvc and also a quick way to introduce testability into an existing webforms applications. (without having to go through the pain of rewriting a bunch of code to make it work for asp.net mvc) Of couse community support and open-sour...