find me on
 
twitter del.icio.us
linkedin flickr
goodreads flixster
facebook aim
dopplr stackoverflow
tweets
 
del.icio.us
 
recent posts
 
history
 
July 2008
M T W T F S S
    Aug »
 123456
78910111213
14151617181920
21222324252627
28293031  
 
jason.prado (@) gmail.com real tangible
 
Silverlight + Python on OS X. Easy.
 

I have set myself a goal of making Silverlight and the DLR the premier method of scripting the web. I love JavaScript, but I love Python more and I like the freedom to choose languages and paradigms most of all.

So I started this afternoon since I bugged out of work early for a doctor’s appointment. I only have a Mac at home, and although I virtualize Vista on my machine I want to do all of this development in OS X since most of the leet haxors I know use OS X.

I was expecting some hassle here for sure. I downloaded and compiled mono, which was a bit of a pain but I basically followed this post. I recommend you just download the dmg instead (more on that later). Then I got the SDK, which is packaged as a separate release until SL 2 is RTW. Turns out starting an app is as simple as this:

> script/sl [ruby|python|jscript] <application_name>
> script/server /b

And a a sample page of your control pops up in your browser, served by the .NET app Chiron. The XAP is generated on the fly. If you’re developing alongside a backend framework like django then just plan to serve your XAP and scripts off of a separate port and everything is easy.

Basically I’m way impressed that this is so easy; the only hiccup I had was that Chiron would mysteriously 500 while trying to generate the XAP. The first thing I tried in order to debug it was switching to the packaged binary of mono instead of the built from trunk version, and it started working immediately. Not a big problem. So stay tuned while I try to develop some traditional webapp building blocks in dynamic languages + Silverlight.

[on an unrelated note, I just noticed that this site looks like ass on IE. sorry about that, I'll fix it as soon as I have time. I just got Vista running at home a few days ago.]

You can leave a response, or trackback from your own site.

One Response to “Silverlight + Python on OS X. Easy.”

  1. Every now and then, someone starts working on a Python-webpage binding for Mozilla-based browsers. [1] It seems feasible to take it to completion. Mozilla comes with PyXPCOM, which allows you to create extensions partially written in Python. [2] Someone could take it further and have an extension act as an intermediary between the webpage’s Python code and PyXPCOM.

    I’d imagine security would be a bit tough, though.

    [1] http://weblogs.mozillazine.org/roadmap/archives/008865.html
    [2] http://developer.mozilla.org/en/docs/Creating_a_Python_XPCOM_component

Leave a Reply