Most Correct way to redirect page with Model-View-Presenter Pattern
What is the best way to call a Response.Redirect in the Model-View-Presenter pattern while adhering to correct tier separation? ...
What is the best way to call a Response.Redirect in the Model-View-Presenter pattern while adhering to correct tier separation? ...
In Model-View-Presenter what is the correct pattern to do a page that: a) contains a grid for browsing a list of items b) an alternate mode for editing single items maybe you are toggling between two asp:panels. Do you just make the presenter smart enough to do two types of presentations? Make 2 presenters? I'm new to this pattern ...
I'm trying to follow the MVP (specifically Passive-View) pattern in a java swing ui application. The basic design of the application reminds a wizard control. The screen is divided to two main parts: an active view. a static navigation bar, with navigation buttons. The user can use buttons to change the active view, but the bar is ...
With MVP, you normally bind the View (UI) with the Presenter in the Presenter. However with the latest version of GWT, especially with UIBinding, you can do the following in the View: @UiHandler("loginButton") void onAboutClicked(ClickEvent event) { // my login code } Which basically exchanges a lot of anonymous inner class code ...
Hi, I've just started to play around with MVP in asp.net. One thing I quite cant figure out is how do I pass information, i.e. an integer variable from one view(webform) to another. Let's I have a customerlistView which is mapped to a customerlist.aspx page. From it I select a customer and it's record id. Say I want to display the cust...
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...
I have a bunch of model objects. These objects end up being rendered as views (say forms) in a rich client app. I started to annotate the fields in the model objects (Java annotations) with things that let me render them as forms on the fly (e.g displayname, group, page, validvalues). I now realise that the view has crept into the mod...
When implementing MVP pattern in winforms I often find bloated view interfaces with too many properties, setters and getters. An easy example with be a view with 3 buttons and 7 textboxes, all having value, enabled and visible properties exposed from the view. Adding validation results for this, and you could easily end up with an interf...
This question may have been asked before, but I'm looking for a different answer than what I've seen. Our website is in ASP.NET and we use the model-view-presenter pattern to get business logic out of the markup codebehind. Is there an accepted pattern for web services for getting business logic out of the codebehind? It seems like pu...
Hey there, What is the best way to get a number of property values of a business object from the View to the Presenter in a WebFormsMvp page? Bearing in mind this issue with DataSources: http://bit.ly/dtQhw0 Here is what i propose: The scenario is, I have a business object called Quote which i would like to load form the database, e...
Hi, I was wondering if setting a default value for a SelectList is considered to be presentation logic or business logic? For example, if a requirement is that an Employee cannot be saved without a Location, but 99% of the time the location that would be selected is a particular item -- say Atlanta. Because of this, the location Selec...
Hi, I have an application that has a window similar to the one bellow . The requirement here is that when the user clicks the Save button everything has to get saved. The "Save" and "Reset" buttons are "common" to all tabs. Hence, when the "Personal Information" tab is selected and "Save" is clicked the program should also save chang...
So..I intend to use a Model View Presenter(the "passive" mode, in which the UI is pretty dumb and sends all the events to the Presenter, and the Presenter takes care of dealing with the Model) to glue my domain's business logic and the UI. My question is how should my Presenter look like. Is this what I want? public class TicTacToeGame...
Where should presenters be stored in an ASP.NET using the MVP pattern in a web app? Should it be stored in the.. .. ViewState .. Session .. or should it be static? .. or recreated with every postback? ...
Hi, I'm in front of a classic circular dependencies problem but the solution I've found (create a third assembly) does not seem to be ok with my view-presenter pattern. I need to reference my presenter in my view assembly I need to reference my interface(which are in the same assembly than the presenter) in my view assembly ok so I re...
Design philosophy question: Suppose I have a user control which draws a graph of the characteristics of a collection of objects. The control is placed on a form with a long-lived controller class that exposes the collection of objects to draw from. The form also contains a control which allows to switch between 'modes' or different p...
Job has many task, task has many notes How should such a form look like ? With partials so I can enter the whole job from /jobs/new , and add new tasks from /jobs/2/tasks/new with possibility to add notes from there, and of course the possibility to add new notes from /jobs/2/tasks/5/notes/new ? Is this a good place to use the presente...
I have a MVP (passive view) setup, and it is going quite well. I recently read Martin Fowlers description of this (http://martinfowler.com/eaaDev/PassiveScreen.html) and he writes "Another advantage that Passive View is a very explicit mechanism. There's very little reliance on Observer mechanisms or declarative mappings." In my MVP I h...
For example: class Tree has_many :apples end class Apple belongs_to :tree end class ApplePresenter presents :apple def name @apple.name.upcase end end class TreePresenter presents :tree def apples present_collection @tree.apples end end Using this, there's no need to duplicate the ApplePresenter methods a...