Questions tagged [presentation-model]

41 questions
53
votes
6 answers

What are the differences between Presenter, Presentation Model, ViewModel and Controller?

I have a pretty good idea how each of these patterns work and know about some of the minor differences between them, but are they really all that different from each other? It seems to me that the Presenter, Presentation Model, ViewModel and…
9
votes
1 answer

SwiftUI randomly crashes on presentationMode?.wrappedValue.dismiss()

This is how the crash looks like So it randomly crashes on the UIKit line UIKitCore -[UIViewController _ancestorViewControllerOfClass:allowModalParent:] + 44 I have View in default SwiftUI navigation stack: struct MyView: View { …
6
votes
1 answer

How do you use Presentation Model with Webforms?

I have started using Presentation Model w/ ASP.NET webforms and like the pattern quite a bit. What I am really having an issue with is where to instantiate some of my classes, mostly the presentation model, my business object, and things like the…
Greg
  • 6,962
  • 11
  • 39
  • 52
5
votes
4 answers

What are the main drawbacks of using Presentation Model in code behind?

I am trying to prepare myself for being challenged with the question: "Why cant we just implement the presentation model in the code behind?" In fact I have worked on a project where we used a Presentation Model that was implemented in the code…
Jack Ukleja
  • 12,190
  • 10
  • 65
  • 101
4
votes
1 answer

MVP, WinForms - how to avoid bloated view, presenter and presentation model

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…
MatteS
  • 1,466
  • 1
  • 13
  • 33
3
votes
4 answers

What are the biggest pain points with the ViewModel pattern?

Glenn Block and I have been working together on the ViewModel pattern. We’ve been trying to identify the biggest pain points associated with the pattern, with the goal of adding framework support to alleviate the pain. Tonight, Glenn posted, “View…
Jeff Handley
  • 4,054
  • 2
  • 20
  • 23
3
votes
1 answer

Presentation Model vs Passive View

i am wondering about the difference between the two mentioned patterns. when you consider, that you need synchronization code in the presentation model pattern and that code is in the presentation model itself, then i think the patterns are quite…
3
votes
1 answer

MVP vs. Presentation Model, which one is better?

UPDATE MVP vs. Presentation Model, which one is better (for desktop application) - in terms of maintainability testability complexity flexibility separation of concern - changing one component (view, controller, model etc) has minimal impact on…
janetsmith
  • 7,972
  • 11
  • 48
  • 72
2
votes
3 answers

Am I implementing the MVP / Presentation Model UI pattern correctly?

I'm re-working a Winforms application and would like to employ a variation of the Presentation Model pattern for the UI. Could someone tell me from the following explanations if I'm doing it correctly? I have decided to set up dependencies as…
stakx - no longer contributing
  • 77,057
  • 17
  • 151
  • 248
2
votes
3 answers

BestPractice: Pros and Cons for using AutoMapper or LINQ (LINQ to Objects) for mapping between a Domain Model and a Presentation Model

What do you think? How do you map between your domain and presentation model?
Rookian
  • 18,055
  • 27
  • 99
  • 175
2
votes
1 answer

RIA Services: Inserting multiple presentation-model objects

I'm sharing data via RIA services using a presentation model on top of LINQ to SQL classes. On the Silverlight client, I created a couple of new entities (album and artist), associated them with each other (by either adding the album to the artist's…
nlawalker
  • 5,654
  • 6
  • 26
  • 43
1
vote
2 answers

How to put entities and collection of entities inside a DTO in Silverlight - WCF RIA?

I would like to make a DTO which contains Entities. How should I do that? Is it possible? For example I have something like this in my server project: public class MyCustomDTO { [Key] public int id { get; set; } public…
1
vote
2 answers
1
vote
1 answer

Flex Cairngorm 3 Presentation Model Initializations

ok so I have a TitleWindow that I open up... and I have 6 states defined. I am using the Presentation model pattern for all of my views. I have discovered a frustrating nuance. When I tell my window to go to XXX state, the controls have to…
1
vote
1 answer

Clojure defrecord and private fields

I frequently implement my Java swing GUIs using Martin Fowler's Presentation Model pattern. Here is an example: import java.awt.BorderLayout; import java.awt.event.ActionListener; import javax.swing.BorderFactory; import javax.swing.JButton; import…
Ralph
  • 29,142
  • 31
  • 124
  • 261
1
2 3