+1
Managing access to various environments through one app code base.
Our application currently loads content from RSS Feeds and JSON calls from Wordpress where content is created. They use specific URLs that are currently hardcoded into our app. This works great while we're only looking at our sandbox environment, but now we're ready to move our application to production and I'd like the ability for our app to be smart enough to choose which environment it should pull content from.
I don't know if anyone has tackled this yet, but wanted to reach out before we got too deep.
I don't know if anyone has tackled this yet, but wanted to reach out before we got too deep.
Customer support service by UserEcho
Help me understand your use case here. Are you suggesting that the same class or list would need to pivot from one datasource to another based on certain criteria?
The more I'm thinking through this, the more I'm considering using a SQL database that has a preference pointing to it. My problem is preferences are only available in one wire at a time, so there needs to be some passing which adds to the fun of course... :)
So I guess my request would be to add the API key capabilities for Parse. If we were able to do that, it would save us from having to manage a config file at all. Can we put that feature request in? Or perhaps a capability like Github has where you can include/declare any public API and it will be accessible in your app?
What would be easy to set up and for the team to manage would be to create a little datasource in the app that points to an external json file with a single name:vale pair.
<datasource name="bestof" source="URL" query="/app/status" providertype="json"/>
and the json file be something like:
{
"app": {
"status": [
{
"level": "sandbox"
}
]
}
when the app loads, fire that datasource and return the result. depending on the result, set up a couple if statements that set a [var:statusURL] to the url you want and then in any place in the app that references that URL, replace it was your [var:statusURL].
Hope that helps.