In the last four posts, I discussed various ways of allowing you as the developer to control portions of your app and allowing you to fix or change portions of your app without having to submit the app to the marketplace.
This post is going to be pretty short and will allow you to download a sample app that exercises the various methods.
Note that the app is not showing the how to update the strings from the server. The reason is that each developer can use their existing servers for updating their strings – that’s a problem that most developers either already solved themselves or are using existing solutions and I didn’t feel like it was the important bit.
The sample app
The app simply has a few buttons – clicking each one of them will activate a different portion of the elements discussed in this series, outputting the result in a message box.
- XML XPath – selecting temperature: Uses a simple XPath expression to select data in an XML DOM.
- XML XPath – calcing temperature: Uses a more complicated selection in the XPath that actually calculates mathematically the Celsius temperature.
- HTML XPath – getting description: This sample (which may become defunct if the server changes it’s HTML layout) downloads a battlefield3 server status HTML page and reports weather the Xbox server is up.
- Simple JS function: Shows how to run a simple JS expression that calculates something and returns the value to the caller.
- Run JS Weather Wrapper: Shows a wrapped JS object that makes network calls and that returns the results to the managed code.
There are a bunch of comments inside the file that explains what each function does.
I wrapped all the XML Parsing and JINT extensions in a simple to use Library (full source provided of course) – feel free to decompose it if you want.