Silverlight on Rails

I am looking to move to a better UI platform for the next version of Subtext. The two contenders are Flash and WPF. As it happens, I have stumbled into the first skirmishes of a major technology war between Adobe and Microsoft. I have a hunch about what Microsoft’s next move will be. In the finest traditions of the blogosphere I am rushing to broadcast my unfounded speculation.

Background: Silverlight is a subset of the new WPF UI in Vista, designed to run cross-platform and cross-browser. Flash is Flash – videos and cartoons – but all grown up now in version 9 as a real programming language (Actionscript 3) with a component model (Flex 2). The market is RIA’s (Rich Internet Applications). You know, web apps that are as fancy as desktop apps. A lot of frisky 20-somethings think this is going to be the next big pile of fast bucks. Ryan Stewart has been doing some good coverage of the arena.

Microsoft’s technology is arguably superior to Adobe’s, but they are starting from zero market share. Worse, Microsoft’s development toolchain only runs on Windows. Cool hackers wouldn’t be caught dead on Windows anymore. Microsoft will officially announce Silverlight in two weeks, but has signaled they have a surprise in store.

I predict the surprise will be the integration of Ruby into Silverlight, done by John Lam. Essentially "RIA’s on Rails". This will address two of Microsoft’s problems: allowing cross-platform development, and being cool. You will be able to develop Silverlight apps in Ruby on a Mac. That is certifiably cool these days.

You heard it here first. If I’m wrong, I’ll just delete this post 🙂 . Another day I will post about how despicable it is for these self-infatuated famous hackers to be discriminating against programmers because of the logos on their laptops.

12 Replies to “Silverlight on Rails”

  1. Its immoral to delete your post 🙂

    Whats wrong with integration into an IDE such as IntelliJ/Eclipse or Visual Studio? Most developers want to be in that environment, then they can develop with your tool and it can translate into Java or C# actual code in their IDE. It could then switch from design view or code view. Design view is your view. Well perhaps I use the wrong terms, but I think you understand the idea.

  2. Tough call. My first instinct is to agree with Philip: Eclipse is where it’s at. You already have it coded to SWT, so this should be the easiest route to go.

    However, if you want to integrate with lots of other cool things (google maps) then WPF would be better. I guess it depends now on the target audience: who are your developers, and what are they making? So, if you want to get into the web development space, then perhaps Flash is the way to go.

    [I didn’t explain why I am looking for something better than SWT/Swing. I want to smoothly animate layout changes in my new UI, to avoid disorientation. Flash and WPF have good built-in support for animation, among many other higher-level features (like no redraw methods). – Jonathan]

  3. How about going with something nice and open like XUL?
    Or Java for that matter.

    But if you REALLY have to pick one of those two I’d say go for Flash, at least there is hope for a free player soon.

  4. I would be more hopeful of and less surprised to see them incorporate or support Python with Silverlight. Microsoft has been doing more backing of Python projects lately, with Ruby getting in bed with Sun. Although both companies obviously show interest in a myriad of open languages. Microsoft funds the IronPython project, sponsers the Python Software Foundation, and has been known to be porting their ASP.Net APIs to Python. I think all of this points to my favorite language getting a pretty important commercial boost from Big Redmond in the coming times. How some of the community views this is bound to be diverse, of course.

  5. Smalltalk is not an UI platform, but it is a perfect platform for exploratory style of programming. It’s definitely a language of choice for a person developing a radically new system alone. Some implementations (notably Squeak) have nice graphic capabilities like antialiased object-oriented graphics etc.

    [Yes, but not anti-aliased text! – Jonathan]

  6. Even if the toolset is Microsoft-only at first, if the platform is as cool as some people say it is and can be authored in Ruby then someone will create a non-microsoft development toolset.

  7. Squeak does do antialiased TrueType fonts. At least, I thought that’s what I made the default in my own Squeak image quite a while ago.

    [Darius – Yes, that seems to have improved since the last time I checked. There is simple gray-scale antialiasing of certain fonts. I also see there is some experimental support in development for sub-pixel antialiasing via Freetype. A lot of the desktop graphics are not being antialiased (like balloon help).

    My big problem with Smalltalk is that its community doesn’t seem to invest in defining and documenting API’s. You actually hear the claim that Smalltalk is “self-documenting”, and that you should just read the code to understand it.

    –Jonathan]

  8. Will you go open source?
    What open source library will you use, prevent derived commercial work or allow derived commercial work?

    [I am leaning towards the WTFPL license. -Jonathan]

  9. I’d pick the GUI system that gives you the most expressiveness and flexibility. Subtext is exploring some very new territory, and I think it’s important that the user interface allows for rapid experimentation.

    Now, I’ve never actually seen a GUI toolkit that gives flexibility and expressiveness, but I doubt that Microsoft has made it. 🙂

    Our current programming languages just aren’t well suited to the complex logic and cross-cutting concerns that UI’s require. Maybe Subtext’s GUI should be written in Subtext. Perhaps the bootstrapping process could involve writing the first iteration of the UI in OpenGL, since it’s got a stable API, it’s simple, it’s cross-platform, it’s fast, there are lots of little libraries that add antialiased fonts and SVG support and bitmaps and all that. Perhaps the frankenstein of libraries would be a bit messy, but once you’ve lifted yourself up by the straps, it’s smooth sailin’, right? 🙂

  10. You have the correct idea. I played around with using Rails to drive WPF/e, and it works fine. Ruby’s rhtml templates are very good, just use WPF/e’s XAML instead of HTML. (Ruby’s XML builder will not work since the XAML tags have a ‘.’ character in them). The only difficulty is binding the button actions to code. Since you probably dont want Ruby Rails to generate .Net assemblies, you need a dynamic language. I used IronPython with some success. But I had to create a little hosting app that would bind the IronPython script to the button elements. (This was all in WPF/e, before Silverlight). I imagine JScript will work as well. Hopefully when Ruby is available on .Net, it can run on the Silverlight client.

Comments are closed.