Forum General
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Architecture in Xamarin app when using REST

JakobJensenJakobJensen DKMember ✭✭
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


  • 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.