view resolution

38 views
Skip to first unread message

Mario Gutierrez

unread,
Nov 6, 2012, 10:37:48 AM11/6/12
to servic...@googlegroups.com
So the resolution logic is currently this
 
  • If the Web Service specifies a template (via a customized IHttpResult.TemplateName response) - then a View with that name.
  • A view with the same name as the Response DTO, looking first in /Views then in /Views/Shared
  • A view with the same name as the Request DTO, looking first in /Views then in /Views/Shared
I wonder if it would make more sense to search for Request DTO before Response DTO. As it is, if I have a Response DTO shared by many methods, I can no longer use a Request DTO as the name of a view template. It simply never gets used. Wouldn't it make more sense to search for Request DTO first, then Response DTO?

Demis Bellot

unread,
Nov 6, 2012, 12:27:22 PM11/6/12
to servic...@googlegroups.com
Yeah this was a tough call, because on the one hand the response must match the RazorView model - which is what Response DTO's do :)
And on the other the Request DTO's are unique, so I was thinking more along the lines of conventionally picking the most likeliest times the models will match - which is why I went with the Response DTO.

But I might change it seeing that Request DTO's are unique and can allow for your scenario of services re-using the same Response DTO with different views.

Demis Bellot

unread,
Nov 12, 2012, 4:31:23 PM11/12/12
to servic...@googlegroups.com
ok i've swapped the order around in this commit: 

Should be available in the new release at the end of this week.
Reply all
Reply to author
Forward
0 new messages