Questions tagged [presentation-layer]

76 questions
86
votes
14 answers

Why should I isolate my domain entities from my presentation layer?

One part of domain-driven design that there doesn't seem to be a lot of detail on, is how and why you should isolate your domain model from your interface. I'm trying to convince my colleagues that this is a good practice, but I don't seem to be…
16
votes
8 answers

Pros and Cons of Various Java Web Presentation Layer Technologies

I'm currently working on a web app that makes heavy use of JSF and IceFaces. We've had some discussions of moving to another presentation layer, and I thought I'd take the discussion out into SO and see what the experts think. I'm curious if anyone…
rtperson
  • 11,306
  • 4
  • 27
  • 36
11
votes
2 answers

How to avoid duplicating business logic across multiple different presentation layers

I am currently designing the architecture for an multi-channel commerce system which will have multiple different frontend presentations which are tailored to device and channel (user type and location). The challenge I'm facing is how to best…
11
votes
10 answers

Putting presentation logic in controller is a good practice in Ruby?

Some recommendation [1] suggest you to use <%= current_user.welcome_message %> instead of <% if current_user.admin? %> <%= current_user.admin_welcome_message %> <% else %> <%= current_user.user_welcome_message %> <% end %> But the problem is…
Howard
  • 17,155
  • 33
  • 104
  • 173
7
votes
2 answers

Is there a neat way to get attribution for a background image in the presentation layer?

I have a CC-BY image that I'm using as a background, brought in by CSS. This image is purely there for its looks, and definitely not content. I need to put attribution on this image somewhere, and obviously it would be nicest to make this…
Duncan Parkes
  • 1,832
  • 1
  • 14
  • 24
6
votes
1 answer

In what layer do controllers fit in layered architecture/DDD

So, I've seen some questions about it here but none of them was specific about it neither answered my doubt. In a layered architecture/DDD application, in what layer would a controller (the "C" in common MVC applications) fit? I've read in different…
6
votes
2 answers

Refactoring a legacy WebForms app to better separation of concerns

i.e. Is MVP still the next best choice when MVC is not an option? I thought I'd ask this here as I'm sure there are others like me who don't have the luxury of being on a green-field project and want to refactor a webforms UI to better separation of…
rohancragg
  • 4,904
  • 5
  • 32
  • 44
5
votes
2 answers

When to use @ in a Rails View and when to use a symbol?

<% form_tag(:action=>'update', :id=>@album.id) do %> Title: <%= text_field(:album, :title) %>
Artist: <%= text_field(:album, :artist) %>
Genre: <%= text_field(:album, :genre) %>
Release Date: <%= datetime_select(:album,…
5
votes
2 answers

Best way to separate Business from Presentation Logic?

I want to create a game that will work both locally and online. My first thought was to create an interface that would have all the methods that will be needed by the GUI for the business logic and then have a network implementation and a local…
pek
  • 16,939
  • 27
  • 83
  • 98
4
votes
5 answers

ASP.Net MVC and N-Tier

Greetings, Apologies in advance that I have not researched this toughly enough to answer the question myself, but I imagine it would take me some time and I would rather know now before I invest more time in learning it. I couldn't find anything in…
4
votes
1 answer

Passing Business Validation Error from Service layer to presentation layer

We are using MVP pattern in our Presentation Layer(PL) and a WCF based service layer(SL). PL calls operation contracts on the SL and internally it does some business validations. If the validation passes, we return an obect (exposed as a data…
Marshaler
  • 41
  • 2
3
votes
1 answer

How to get UIImageView real location in view while animation?

Hi all, For the animation i used: [UIView commitAnimation:@"anim" context:nil]; [UIView setAnumatioDuration:10]; imageView.center=CGPointMake(100,100); [UIView commitAnimation]; The thing is that when i call with timer every 0.5 seconds: CGRect…
3
votes
2 answers

How to verify entire content of Geb module using Spock at once without asserting each element individually?

I have a Module with content defined for each element on the webpage I am working with: package com.abc.modules import geb.Module class Member extends Module { static content = { // Member fields mbrID {$("div.subject-details…
Marco S.
  • 51
  • 5
3
votes
1 answer

When does a CALayer have a presentationLayer?

I was working with CALayers and I want to retrieve some information about the state of a sublayer of my layer while an animation is running. Now I know I can retrieve the information from the sublayer's presentation layer by calling…
Jan Kaiser
  • 780
  • 1
  • 5
  • 19
3
votes
5 answers

CSS: Fixed or Float Layout?

My question revolves around CSS Fixed Layout vs a Float Layout that extends to fill the width of the browser. Right now the issue I'm running into is to have the masthead resize depending on the width of the page (something that I understand isn't…
George Stocker
  • 55,025
  • 29
  • 167
  • 231
1
2 3 4 5 6