Ruby inside silverlight function over c #

Just found out that you can use Ruby or Python inside SilverLight application.

link here

.. I wonder if it can get around some of SilverLight's limitations by using these languages โ€‹โ€‹instead of C #.

I know that Ruby Engine inside a SilverLight application gets truncated, just like the .NET CLR, so I would like to know that even without all the features of the full Ruby or Python Engine:

Is there anything else I can do using these dynamic languages โ€‹โ€‹that I cannot do in C # SilverLight?

...

If we need to download something community built to extend the cut down on Ruby (to support eg Interop calls?), What's the impact on deployment?

...

If not, if you can't do anything you can't use C # with these engines, besides the typical advantage of a dynamic language, and not bypassing some of the limitations of the SilverLight CLR, why choose Ruby in a Silverlight application?

One of my interests is socket usage, socket usage in SilverLight is improving in every version, but it can still be frustrating due to the xml authorization file required on the server side. Will rubies make it unnecessary

Thank,

Ric

+2


source to share


4 answers


I suspect you cannot get around this. Please be aware that this is not a language that imposes restrictions here, but a runtime. It's Silverlight itself, to be precise. Since both C # and Ruby are compiled in CIL, in this case you are left with more or less exactly the same capabilities (except for some differences in the input system).



+2


source


I'm not sure what you are driving at. Regardless of the language, you are still running in the same sandbox, security models, and constrained by the same cut libraries in Silverlight. You can extend the bits you think are "limited" as long as your code doesn't violate the security model with any language.



You may be able to do things differently using a different language, but the same basic restrictions still apply.

+1


source


You need to make sure the files are xap included or use the silverlight 3 slvx system to stream assemblies defined in C # or VB etc.

The Ruby language must be a complete Ruby implementation, so you can use all the features of the Ruby language like metaprogramming, etc. All source files must be included in the xap for it to work. If you are using ruby โ€‹โ€‹you also get gestalt and you can include ruby โ€‹โ€‹source files just like you now add javascript files to an html page.

0


source


One of the best use cases for dynamic languages โ€‹โ€‹in .NET is to allow users to extend the application with their own code, so this is the main reason I use IronPython in a Silverlight application. It's so nice to have Silverlight runtime available in the limited .NET runtime. It's very easy to integrate (although I found it hard to make C # extension methods visible to Python) and can be very powerful for users.

0


source







All Articles