Tuesday, March 2, 2010

A Remote Data Source Best Practice


Every time you create a Data Source, Dashcode creates a JSON equivalent of it. But every time you load the application, these Data Sources are refreshed. That means if you have an application that connects to 10 different XML feeds, the time the application takes to load is to high. Based on the previous post, you can modify the Data Source on the fly. So create an XML copy of the remote response (Or JSON if it’s the case) in a folder accessible by the application. Make Dashcode to read from that XML instead the remote one. Then when you need to show the real data, programmatically change the URL and the parameters to the remote feed. This will increase the speed of your application.

No comments:

Post a Comment