Architecture in Xamarin app when using REST

JakobJensenJakobJensen DKMember ✭✭
Hi
I need some help again :-)
Im building a app.
Its a iOS and Android app.
The database and all the business Logic is placed on the server.
The app is calling the server through a REST service.
On the server side im using Entity Framework.

What is the best architecture on the xamarin app. Do i need to duplicate all the model classes from the server so i can use the object on the Client side?
Or what is the best approach?

Best Regards

Best Answers

Answers

  • JakobJensenJakobJensen DKMember ✭✭
    So lets say you have a customer object on the server side.
    Do you the serialize it to json, send it to the client, and then use the customer dto object to do what you have to do?
  • JakobJensenJakobJensen DKMember ✭✭
    So if i have to populate a list of customers, i send them over rest as json.
    On the client i deserialize them the customerDTO objects, and then populate the list?
    So the client does not know anything to the model entities from the server. Only the dto
Sign In or Register to comment.