curiouswebster
asked on
MVC3 and WebService objects as models
I am on a project that is considering tightly binding a Razor Page (cshtml file) to a web service object. And I have been told to find out if there are any pitfalls to this approach.
In my past MVC projects, I have create a View Model as a POCO class, and used Data Transfer Objects to transfer values from the POCO to the back end methodology, with that's to a backend DLL, a Web Service or Entity Framework. But here the suggestion is to strongly type the model with the object.
Does any see any problems with that approach?
I need to dig into the exception handling plans for that, in the event the web service is not reachable.
Any other problems that anyone sees?
Thanks.
In my past MVC projects, I have create a View Model as a POCO class, and used Data Transfer Objects to transfer values from the POCO to the back end methodology, with that's to a backend DLL, a Web Service or Entity Framework. But here the suggestion is to strongly type the model with the object.
Does any see any problems with that approach?
I need to dig into the exception handling plans for that, in the event the web service is not reachable.
Any other problems that anyone sees?
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I refined my question in my prior post.
What do I lose when the model is just properties: a DTO object, which in this case, is defined on the backend. What cool things can I do when the strongly typed model has function and "can do things"?
What do I lose when the model is just properties: a DTO object, which in this case, is defined on the backend. What cool things can I do when the strongly typed model has function and "can do things"?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
ASKER
So, now my question has become more refined...
Is there any direct value to passing a POCO between the the View and the Controller which is MORE THAN a DTO? What kinds of useful properties could be added to the POCO for greater local value to the UI solution?
Thanks.