mvp

MVC/MVP/MVVM frameworks for Java GUI applications

∥☆過路亽.° 提交于 2019-11-30 02:31:16
Can anybody recommend a (preferably open-source) framework for decoupling GUI from model in Java desktop applications? Fundamentally decoupling a GUI model from your core java code is best done with a databinding library. Which is to say you have your pojo business code, you have the GUI component code, and you don't fancy writing a load of logic to sync them up all the time whilst updating the view and implementing the business logic. So don't. Find a mature databinding framework for the GUI widgets you are using and learn that; have it keep the screen controls in sync with your pojo code.

What is the difference between controller in MVC pattern and presenter in MVP pattern?

杀马特。学长 韩版系。学妹 提交于 2019-11-30 02:06:32
What is the difference between controller in MVC pattern and presenter in MVP pattern? Can you provide links for understanding the Merits and usage scenario for both of them? In MVP the Presenter assumes the functionality of the "middle-man" (played by the Application Controller in MVC). Additionally, the View is responsible for handling the UI events (like mouseDown, keyDown, etc), which used to be the Controller's job. Eventually, the Model becomes strictly a Domain Model. Says Wikipedia . Here is a more detailed explanation on the differences between the two . See also Martin Fowler's

MVP Communication between presenters?

[亡魂溺海] 提交于 2019-11-30 01:49:03
I have a question about how to handle communication between presenters when using MVP. Say I have two MVP-triads. One is a list of products (Triad A) and the other is some general information about the currently selected product (Triad B). How do I tell Presenter B that that it needs to update because the selected product has changed by A? I can of course think of ways to do this, but I was wondering if there is a general convention for how to handle this. Thanks in advance for any ideas! The pattern itself doesn't really prescribe how to handle this. My own preference is a message/event hub

ASP.NET MVP Injecting Service Dependency

我的梦境 提交于 2019-11-29 22:12:08
问题 I have an ASP.NET page that implements my view and creates the presenter in the page constuctor. Phil Haack's post providing was used as the starting point, and I'll just the examples from the post to illustrate the question. public partial class _Default : System.Web.UI.Page, IPostEditView { PostEditController controller; public _Default() { this.controller = new PostEditController(this, new BlogDataService()); } } What is the best approach to inject the instance of the BlogDataService? The

What's your recommendation for architecting GWT applications? MVC, MVP or custom messaging solution?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 21:07:48
I just started a new GWT project for a client and I'm interested in hearing people's experience with various GWT MVC architectures. On a recent project, I used both GXT MVC , as well as a custom messaging solution (based on Appcelerator's MQ ). GXT MVC worked OK, but it seemed like overkill for GWT and was hard to make work with browser history. I've heard of PureMVC and GWTiger , but never used them. Our custom MQ solution worked pretty well, but made it difficult to test components with JUnit. In addition, I've heard that Google Wave (a GWT application) is written using a Model-View

MVP and multiple User Controls

我的未来我决定 提交于 2019-11-29 21:04:11
I’m trying to use the MVP pattern and I’m running into a design problem. I’m developing an application that will have several UserControls. The UserControls themselves have nothing to do with one another and only represent a subset of the actual model. From what I’ve read, people tend to say you should use one Presenter per View. This seems to make sense, but if I have 30 UserControls, do I really want 30 Presenters? On the flip side, if I have 1 Presenter and 1 View that represent the entire “application” view, then I’ll have bloated View and Presenter interfaces. Then each View would have to

Critique my simple MVP Winforms app [closed]

三世轮回 提交于 2019-11-29 20:42:09
I'm trying to wrap my mind around the MVP pattern used in a C#/Winforms app. So I created a simple "notepad" like application to try to work out all the details. My goal is to create something that does the classic windows behaviors of open, save, new as well as reflecting the name of the saved file in the title bar. Also, when there are unsaved changes, the title bar should include an *. So I created a view & a presenter that manage the application's persistence state. One improvement I've considered is breaking out the text handling code so the view/presenter is truly a single-purpose entity

MVP pattern with Javascript framework?

会有一股神秘感。 提交于 2019-11-29 20:22:17
Has anyone been able to implement the MVP model with any javascript frameworks? I'm having trouble figuring out how to have the presenter -> view inversion from server code to javascript. I have some ideas, but kind of hackish and would like to see what others are doing. Neovibrant The main goal with MVP is decoupling of different aspects in the code. Normally, in JavaScript, there are 3 major such aspects: Event Handling DOM manipulation Server communication (AJAX calls) For each of these concerns, there's a corresponding term from MVP: EventHandling = Presenter DOM Manipulation = View AJAX

in MVC/MVP/MVPC where do you put your business logic?

落爺英雄遲暮 提交于 2019-11-29 19:54:06
in the MVC/MVP/MVPC design pattern where do you put your business logic? No, I do not mean the ASP.NET MVC Framework (aka "Tag Soup"). Some people say you should put it in the "Controller" in MVC/MVPC or "Presenter". But, others think it should be part of the Model. What do you think and why? This is how I see it: The controller is for application logic; logic which is specific to how your application wants to interact with the domain of knowledge it pertains to. The model is for logic that is independent of the application. i.e. logic that is valid in all possible applications of the domain

C# WinForms Model-View-Presenter (Passive View)

天大地大妈咪最大 提交于 2019-11-29 19:46:18
I'm developing a WinForms application in C#. I have limited experience in GUI programming, and I am having to learn a great deal on the fly. That being said, here's what I am building. See the general GUI look at the following link: GUI http://img227.imageshack.us/img227/1084/program0.jpg Now, I have done a lot of the work already, but in the very bad Autonomous design pattern. I did not know the project would ever reach a certain size, and, as such, it is time to do some major refactoring. I have been studying a great deal about GUI design patterns, and the pattern I am wishing to implement