문제

I'm developing a library for Windows Phone 7. We want application developers to link to our library, but we want to be able to update functionality without requiring our client's applications to be updated.

On other platforms we accomplish this using a Javascript interpreter. Occasionally we check to see if a new script is available. If it is we download it and cache it.

I know that Windows Phone 7 doesn't allow pushing new code unless it's been signed by the Marketplace (it would have been nice to be able to just pull a new binary down). Is there another option for being able to run scripts on the client? Is there a better way to do this?

도움이 되었습니까?

해결책

The Dynamic Language Runtime is compatible with Silverlight, so it should be possible to use it to host .NET implementations of scripting engines. A quick search finds two test apps showing how to use IronRuby on Windows Phone 7:

http://msdn.microsoft.com/en-us/magazine/ff960707.aspx

http://blog.tomasm.net/2010/03/21/ironruby-on-your-phone/

There may be other DLR based scripting engines that will work on the phone too.

다른 팁

The latest alpha release of ironRuby includes binaries for Windows Phone 7. You coudl consider using these. Not sure what the marketplace requirements about using dynamic code are though as there is the potential to remotely update with code which would not pass marketplace acceptance.

The other alternative would be to have your library in JavaScript and run it in a WebBrowser control. You could remotely update this without issue as there's no way the javascript could try and call protected APIs, etc.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top