mvp

Which is better in GWT?

*爱你&永不变心* 提交于 2019-12-13 14:11:00
问题 which is better in GWT interface, using the normal MVP with javacode, or UiBinder?? from performance, editing, simplicity aspects. 回答1: This is what Google says: Besides being a more natural and concise way to build your UI than doing it through code, UiBinder can also make your app more efficient. Browsers are better at building DOM structures by cramming big strings of HTML into innerHTML attributes than by a bunch of API calls. UiBinder naturally takes advantage of this, and the result is

MVP Pattern in GWT: How to initialize Model/View and handle server requests in the Presenter?

旧巷老猫 提交于 2019-12-13 06:05:24
问题 This question isn't necessarily GWT bounded but on the other hand this comes right from my attempt to use it correctly. I am using the MVP pattern ( as recommended ) in GWT but I am not sure how to deal with the model and the view as well as I am not quite sure how to create requests to the server. In particular I would like to know Where do I initialize MyView ? Does the presenter do that by itself in the constructor or does it receive a valid reference as parameter to the constructor? The

How to “count” user inputs from a Controller

旧城冷巷雨未停 提交于 2019-12-13 02:38:28
问题 I have a @shows Controller where every user can create a Show ( Singular ). On the Show Creation View ( shows/new ) i want to display a counter of how many shows there are already. i tried: def count @shows.all.count end # in my Shows Controller and then called <%= @count %> on my view. But i guess this isn't the right way. I tried calling it directly on my View: <%= @shows.count %> but neither this worked. Can someone help me out ? 回答1: @show_count = Show.count will do your job. In your view

Is there any good open source ASP.NET application using MVP pattern

寵の児 提交于 2019-12-12 23:08:40
问题 I'm trying to upgrade my existing web forms application to upcoming framework and rewriting couple of workflow as per the new business requirements. I want to introduce TDD based development in this project but after some investigation found that ASP.NET MVC will not help me as my web existing application is using lots of Infragistics UltraWebGrid controls for grouping, paging, column moving etc and there is no good alternative grids in ASP.NET MVC world. I also need to support blackberry in

C# MVP What is the model?

好久不见. 提交于 2019-12-12 18:42:44
问题 I started using MVP for the first time on my last project and I'm absolutely confused with it now. What I was taught regarding MVP is that: The Model in MVP really exists just to provide exactly what the view needs and only what it needs. So the models that my view would be getting, are unlikely to be representing classes/objects with actual logic on them. They are in fact, a lot more likely to be just data transfer objects with everything set-up perfectly so that the view has to do nothing

WinForms: Implementation question for having my UI run independently of my BLL layer?

房东的猫 提交于 2019-12-12 17:50:58
问题 I am trying to do a Windows Forms application in an MVP style and - not having done much with threading before - am getting all confused. My UI is a set of very simple forms. Each of the forms implements an interface and contains a reference to a mediator class which lives in the Business Logic Layer and vice versa. So as simplified diagram looks like this: CheckInForm : ICheckIn <-------> CheckInMediator : ICheckInMediator ---------------------------------------------------------------------

How do I best implement dependency injection when many similar but distinct classes need many similar but distinct dependencies?

倖福魔咒の 提交于 2019-12-12 16:05:40
问题 I'm developing a Windows application in Visual Studio .NET 4.0 where I'm using the MVP pattern and I'm trying to learn and apply dependency injection principles throughout the application. But I'm having trouble understanding how to best handle a particular situation. And I apologize in advance for the long explanation, but I don't know if I could be specific enough otherwise. The application is a general purpose record-keeping app for many different types of records, some of which are

MVC pattern. The relationship between Model, View and Controller

大兔子大兔子 提交于 2019-12-12 10:48:54
问题 The relationship between Model, View and Controller make me confused. This topic shows an arrow form View to Controller, an arrow from Controller to Model and an arrow from Model to View: http://www.codeproject.com/Tips/31292/MVC-v-s-MVP-How-Common-and-How-Different However, this topic shows a dual-arrow between Model and View; a dual-arrow between View and Controller ; and an arrow from Controller to Model: http://www.codeproject.com/Articles/288928/Differences-between-MVC-and-MVP-for

MVP - Presenter and the Service Layer - Where to declare Service Layer

旧城冷巷雨未停 提交于 2019-12-12 09:55:09
问题 I'm reading through Architecting Microsoft .Net Solutions for the Enterprise and I try to figure a couple of things out concerning the Presenter and the Service Layer. First off, my Presenter needs to call methods that reside in the Service Layer, like initialize(), save() etc. But where do I place a reference to the service layer? Should it be at class level in the Presenter, or should I define a new service in the presenter methods itself? Second - this isn't really clear in the book either

i have a problem implementing the mvp pattern in c# and asp.net

家住魔仙堡 提交于 2019-12-12 06:28:52
问题 i've created a forum system in MVP pattern but i'm not sure if i implemented it in a right way. so here is what i ended up with: i've created a database which has three tables: forums, threads, posts added a new typed dataset to the project and then dragged all the tables into it created three new calsses: ForumsModel, ThreadsModel, PostsModel added three interfaces: IForumView, IThreadView, IPostView three more classes: ForumsPresenter, ThreadsPresenter, PostsPresenter inside the model