Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Store records as XML or DBF?
Message
From
29/12/2016 08:21:16
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01646155
Message ID:
01646178
Views:
57
>>>Hi,
>>>
>>>I am working on a mobile VFP application for parts inventory control. This VFP 9 application will work on a Windows 8/10 tablet. All data communication between the application and the database is done via Web API services. The application has a couple of text boxes with the lookup forms. For example, a user of the Mobile App can lookup a part # with description or a cost centers, etc. These lookup views will use the data in the local storage on the tablet (e.g. folder "c:\myappdata". The data will be received as JSON object by an endpoint call to Web API server. I have two options, when saving the JSON to the local folder, either save it as XML or DBF. If I save it as XML, at run time, when a lookup textbox is instantiated, the XML will be converted to a cursor which will be bound to the lookup text box. If I save it as DBF, it is simpler, since the DBF does not need to be converted and can be used directly with the lookup. But I am always concern that DBF may have some "side effects". So I am leaning towards XML. The average size of the largest table to be stored in the local folder is about 5000 (max, I would say 10,000). I have not tested the time it would take the VFP to convert the XML to DBF. But in general, which would you recommend, XML or DBF?
>>>TIA for any suggestions.
>>
>>Dunno. But if you decide on XML why not have Web Api return XML rather then JSON ? Saves a conversion.....
>
>Good point. But 1) the guy who is developing Web API seems to be more comfortable with XML. 2) The same Web API will be used with the functionally the same iOS application. And the iOS developer prefers the JSON.
>So, I have to go with their preferences.

If you are using the default formatters then Web API will return either JSON or XML versions of the data depending on the Accept header on the request. 'the guy who is developing Web API' shouldn't need to be concerned with the format of the results and the various clients can just request the type that suit them best.

Good overview : https://www.asp.net/web-api/overview/formats-and-model-binding/json-and-xml-serialization
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform