Movie downloads and more? I found download movies. Maybe you wonder why download movies when you can buy dvds? Downloading is much cheaper, much faster and very convinient way to do this.

Microsoft’s Silverlight Disappoints

15 May, 2007 (13:46) | .NET, Python, Ruby

Preface: I initially started playing with Silverlight with the hopes of writing software that will run on multiple platforms, mostly Mac and Windows. The goal of this article was originally to develop a cross-platform application using Microsoft’s Silverlight platform and the IronPython language. It didn’t take me long to realize that all this alpha software has holes in it for developing a simple cross-platform applications. I understand that I’m playing with alpha software and that many of my gripes will be fixed in the future. (I hope so, anyway.)

And now we start
I’ve seen some demos applications created with Microsoft’s Silverlight (formerly called WPFe) development platform. They look sharp and snazzy and modern. With the release of Silverlight 1.1 Alpha, Microsoft releases the ability to use .NET languages to create Silverlight applications. Included with this is the new DLR , Dynamic Language Runtime, and the ability to program with your favorite dynamic languages, like Ruby or Python via Microsoft’s IronRuby or IronPython implementations. This would be a big bonus if I could use my favorite language to create Flash like applications. I started the process of gathering all the required installs from Microsoft’s Silverlight website. I was planning on developing with IronPython 1.1 since IronRuby hasn’t been released yet, and then porting a simple image viewer application that I wrote in WPF (Windows Presentation Foundation) a few months ago. Well, after installing most of the required files, looking at samples, and getting a better understanding with what Silverlight is, I’ve now decided this article is about why I can’t build my sample application.

There’s lots of Beta and Alpha software required to preview Silverlight. I don’t have a problem with most of it because the downloads are small, and the intrusion to installing into the system is minor. However, there’s one nasty required install, and that’s Visual Studio Orcas Beta 1, the next generation of Visual Studio. It’s a whopping 6 Gigs to download (approximate). Why do I want developer tools that are SIX gigs in size? This is one of the reasons I’m going back to simpler development technologies. After all, the process of coding an applications is pretty simple: write text into a document, compile/build it to some form that is executable, whether it’s files being pushed to a web server for viewing over the web, or a native executable that a user runs on their Mac or Windows box. The development process is all essentially the same for anything a developer does, write text, package it. While it’s nice to have a development environment aid in writing a lot of this text (especially the mundane and repetative), there is a line in the sand where having the environment do too much is a bad thing. Ever since Visual Studio 2003, I’ve hated the wizards built into Visual Studio and how it allows a developer without the proper knowledge to create a mess of a project. I can install simpler development tools with features like Intellisense for less than 40 megs (look at Active State’s Komodo). Even the install for Eclipse is less than 130 megs.

Anyway, I started looking into developing a simple Silverlight application with a text editor since this is how I developed my first ASP.NET application six years ago, and it’s also how I started learning WPF. When I started with WPF, I used XAMLPad, and Visual Studio Express for C#. I installed a SDK and some Visual Studio plug-ins and I was off developing. Maybe because Silverlight is such alpha code, it doesn’t have this integration yet? Maybe, MSFT never intends to support an Express version of Visual Studio? Hopefully not.

I started working with plain text files and Notepad++ and looking at the sample apps. I copied the Python PhotoViewer project to use as my template (the version I’ve linked to was written in JScript since MSFT doesn’t have the Python one posted to their website) . It’s very easy to get a Canvas up and running with a TextBox in it. But I wanted to so something more, I wanted to port my existing application. I quickly found out that there was no support for WPF Layouts, DockPanels, and ComboBoxs. What, not a basic control like a ComboBox? How is a developer to develop without one? Sliverlight doesn’t come with any user controls, not even a button. If you were hoping to port an existing WPF application, you’re really out of luck, even for a simple application that only has a few buttons and a combo box — which mine does.

I shake off the dissapointment and continue up the trail
Included with theSilverlight 1.1 Alpha SDK is a SilverlightControlsStarterKit that has a few basic UI controls: buttons, a very basic listbox, scrollbars, scroll viewer area, and a Range Selector (a slider-like control). However, to use these controls, I needed to build them. In order to build them, I needed Visual Studio Orcas — something I’m refusing to install.

I was very interested in trying to use the controls in the SilverlightControlsStarterKit, so I started hacking with the .sln files to see if I couldn’t build them in a version of Visual Stuido that wasn’t the Orcas Beta. After a few minutes I decided this wasn’t a path worth going down.

I went to Google and started searching for Silverlight Controls ComboBox and couldn’t find anything — I was expecting another developer to have conjured up one by now. What I did find was that the third-party company Telerik was building RadControls for Silverlight — not a ComboBox, though.

All is not lost!
There are a couple of nifty samples, though, in the Silverlight 1.1 SDK. One is the PhotoViewer written with Python as the language. It’s located in the samplesPhotoViewerpython folder. Basically, a web page hosts the Silverlight runtime and calls some Javascript to load a XAML file, which binds to the code, whether C#, VB.NET, JavaScript, or Python. In this sample case, it was binding the XAML to IronPython with the following in the header:
<x:Code Source=”Code.py” Type=”text/python” />

That’s the only change required in the XAML file to bind to the IronPython runtime. So Simple.

The DLR Console

The other cool sample is the DLR console runtime that allows you to play with different languages (Python and Javascript supported for now, I imagine Ruby will be in the future) and dynamically modify WPF properties in the display window much like the XAMLPad that comes with the WPF SDK allows with XAML. Look at the code in the window above, that’s what Python looks like controlling the Silverlight API. Ahhhh…Python. Just wait until how beautiful Ruby will look!

Other Silverlight Disappointments and Revelations
I’m also disappointed that it looks like Silverlight will only run inside the browser, like current Flash applications. Adobe’s been there, been doing that for years. I was really hoping to be able to generate executables for both Mac OSX and Windows (would also like to support Linux), but the only way I can think to do that is to make a native executable shim for each OS and embed a web browser that can host the Silverlight Controls. Not something that’s entirely out of the question, plenty of people have been doing this with Flash. This led me to a revelation: Silverlight isn’t my golden ticket to cross-platform simple application development, what I’m really looking for is a cross-platform WPF runtime.

I’m going to now research the upcoming Adobe Apollo environment, which promises Windows, Mac, and Linux runtimes. The only thing I’m not really digging about Apollo is having to use Adobe’s ActionScript. It would be so much better if it supported existing scripting languages that many developers already know, like Python, Ruby, Perl, etc.. This was the draw for me to looking at Microsoft’s Silverlight in the first place.

I’m not going to totally dismiss Silverlight, as an alpha is far from release, and the promise to be able to develop in Python or Ruby is quite enticing to me. I justvelopers to use. I could even write it in Python.

Questions/Comments for Microsoft:

  • Couldn’t the compiled dlls SilverlightControlsStarterKit for these so we could at least start playing with them wit hope that when the time comes for Silverlight to be mainstream, I’m not going to have to use Microsoft’s latest Visual Studio, that maybe they’ll have a lightweight and free version like they do for their C# and VB and WebDevelopment platforms.

    And, maybe I should be a little less lazy and build a ComboBox in Silverlight for all dehout compiling them like we could the rest of the samples in the SDK?

  • What is the plan for including user controls? Is Silverlight going to be too lightweight (no basic controls that were even included in Visual Basic 3.0 14 years ago)?
  • Is there a document somewhere listing what features/controls from WPF will be supported in Silverlight?A Microsoft Silverlight Developer Reference, for those who are visual.
  • With Silverlight will we be able to install applications to target platform, like Adobe Apollo, or is Silverlight only intended to run inside the browser? I know the answer to this, but I’m hoping this isn’t so. Silverlight isn’t going to compete against Apollo, but Flash in it’s ability to stream custom content to custom embeded applications.
  • Is there ever going to be a cross-platform runtime for WPF? (This is what I’m really looking for.) Learned that NOPE, not unless we wait for Mono to port .NET 3.0 Looking at the new Microsoft Developer Reference image (link below), there are some classes in Silverlight 1.1 that aren’t in the current .CHM document, most interestingly to me is the Windows.Applicaiton class — hmm, could this mean anything for my desires?
  • Remember your target audience for these Alphas includes the hardcore developers, especially those who don’t want to install massive beta software. Delivering some simple text file templates would go a long way. (I should clarify, that you only need the simple SDK to start your fun hacking, but my complaint about this has more to do with Orcas being required to play with the included controls, which I wanted to do. This wasn’t a well thoughtout comment.)

Comments

Comment from asd
Date: May 16, 2007, 9:45 am

JavaFX FTW! It has all the Swing controls and you could probably get it to interact with JRuby somehow.

Comment from somebody
Date: May 16, 2007, 3:30 pm

So you are disappointed because you wanted to use Silverlight for something that Silverlight wasn’t designed for? You should check WPF instead. The DLR already runs on Mono so Python is there. In a couple of years (maybe) WPF will be available on Mono also. The porting effort is coordinated here: http://www.mono-project.com/Olive.

Comment from taude
Date: May 16, 2007, 4:02 pm

somebody: Well, I’ve been hearing a lot of hype on how Silverlight is Microsoft’s answer to Adobe’s Apollo — which isn’t the case. WPF is great. I really like it. When I was first learning it, I was able in the matter of hours get a pretty application up and running that was importing images off of Flickr into my own custom UI. With the limited functionality that Silverlight seems to have — no input/layout controls — that it’s a very small subset of WPF. So small, that I’m not even sure MSFT should be relating the two technologies. Maybe a lot of the WPF functionality will be added by shipping time? A lot of what I was reading was claiming that Silverlight was just going to have the 2d functionality of WPF, never mentioning anything about loosing all the layout and input controls. Silverlight seems to be several years behind Flash for browser based applications. Granted, with time, many 3rd party controls will be developed, however, given with what Silverlight is shipping with at this time, a developer is going to have to invest a great amount of effort to create input controls for doing simple applications. Even though there’s lots of potential there, I feel a developer’s time is better spent learning Adobe’s Actionscript than messing around with Silverlight at this time — unless they want to just stream video (the quality of Silverlight video is pretty amazing in this regard).

asd: I’ve never been a big fan of Java Swing. It doesn’t do it for me as far as building responsive UIs. I haven’t downloaded any Swing applications in awhile, though, so maybe it’s better now? I also don’t really like the Java library installation process that Sun provides, it feels clunky. Adobe’s Flash installation is pretty good and I think should be the standard most runtime environments should shoot for.

Comment from wpf
Date: May 16, 2007, 5:09 pm

Somebody “The DLR already runs on Mono so Python is there. In a couple of years (maybe)”

Heh, there’s something I want to invest in. Wait a few years and maybe it’ll work!?

Taude: Swing speed has drastically improved in the last few major releases. Not bad at all. Sun just needs to come up with a better install (easier AND smaller) to have any hope of JavaFX working well.

Comment from Alex G
Date: May 16, 2007, 5:36 pm

Orcas in’t required for Silverlight in any shape or form.

If you don’t like wizards you don’t have to use them. I didn’t even know there were any and I used to be full time in VS.NET 2005 for over a year.

“What, not a basic control like a ComboBox? How is a developer to develop without one?”
Easy, been doing it Flash for years. Not to say it’s not asked for, but c’mon…

“If you were hoping to port an existing WPF application, you’re really out of luck”
You probably missed the point about Silverlight. MS is straight up about the fact that Silverlight has XAML and only implements a small subset of WPF features.

“I’m also disappointed that it looks like Silverlight will only run inside the browser, like current Flash applications.”
Are you serious about this?

“what I’m really looking for is a cross-platform WPF runtime”
Flex.

“Is there a document somewhere listing what features/controls from WPF will be supported in Silverlight?”
Yes, it’s WPFE doc file which is included in the SDK.

“Is there ever going to be a cross-platform runtime for WPF?”
No, just like there isn’t one for Win32. Unless you don’t mind waiting for Mono folks to rewrite entire .net 3.0 in the next 5 years.

“Remember your target audience for these Alphas includes the hardcore developers, especially those who don’t want to install massive beta software”
I’m surprised somebody who’s been writing asp.net since beta doesn’t actually have Orcas downloaded.

Dude, you are making it sound like you are just whining about Silverlight not being a silver bullet for all your needs. If you want to write applications cross platform, go Java. Apollo won’t be anywhere close to WPF, it’s just a simple application wrapper around Flex and Flash.

Comment from jim d
Date: May 16, 2007, 6:40 pm


There’s lots of Beta and Alpha software required to preview Silverlight.

What are you talking about? You need one application. one. 4 meg install and your done.

Perhaps you were talking about *creating* Silverlight content. For that you need: the silverlight installer, and Notepad. I’m pretty sure the latter is out of beta.

Comment from taude
Date: May 16, 2007, 7:48 pm

jim d: I removed a confusing sentence regarding my intent on having a Visual Studio Express integration for Silverlight. As was stated in the artice, I went ahead with NOtepad++ and started hacking up some code

I mention in the article “There’s lots of Beta and Alpha software required to preview Silverlight. I don’t have a problem with most of it because the downloads are small, and the intrusion to installing into the system is minor.” But the gigantic ORCAS is required to compile the included code for some controls — and that is what I have issues with.

Also, you’re right, all someone really needs to get started is the Silverlight Runtime and Silverlight SDK. (2 items). I downloaded all the files from the Silverlight website before I realized what was really needed. I downloaded 2 runtimes, Expression Blend 2 Preview, and 2 SDKs (1.0, 1.1).

Alec G: I don’t disagree with a lot of your comments. My Orcas comment was more geared at compiling the sample controls. And I slam on Orcas being 6 gigs to download. I started playing with Silverlight with a text right away, I’m pretty sure that’s mentioned in the article. Come on, 6 gigs to write text and have some started templates pre-configured should be considered normal for an IDE?

Indeed, I did miss the point about Silverlight, this article covers the learning process. I’ve been reading for weeks on the web how Silverlight and Adobe’s Apollo are going to be competing products. This leads one to make some conclusions. Really, Silverlight competes with Adobe’s Flash, since it’s really geared towards making embeded front-ends for media content in the web-browser. Though, it looks like the Silverlight codecs deliver spectacular video quality — even over a slower Internet connection like mine is.

I’m not going to be waiting for the Mono port. I’d rather go with the Java route.

I’m looking for something that’s somewhere between what Flash is and WPF. Being able to create an application like that NY Times Reader on multiple-platforms would be incredibly powerful for a developer. I’m going to continue my quest and look into QT (Skype was created with this), Mozilla’s XUL (http://www.getdemocracy.com/ has created a really spectacular cross-platform application using XUL and Python that really hits a sweet-spot with me, but there’s a lot of loops to get up and running, also ActiveState’s Komodo IDE was created with XUL), and now I’ll add to that list, Java Swing (I believe blurb.com uses swing for their book development software).

Yeah, I’m complaining a bit, Silverlight is so close to what I need, yet so far away. Surely, if Microsoft can create a cross-platform browser plug-in for Mac, that they could create runtimes that launch
applications natively from the OS that aren’t embedded in a browser? In the future I may still try my idea of creating native code that launches a simple shell app with an embedded web browser that hosts an embedded Silverlight application (though Firefox browser will be required to be installed on the Mac and Windows). Also, where Microsoft is really close in their supporting of Dynamic languages. The DLR is a great thing (in my view). My criticisms are intended to give those in charge of the Silverlight product insight into what some customers are looking for, especially if their product is so close to delivering that. Also, MSFT’s developed so many user input controls for WPF, that I can’t believe it would be terribly difficult for them to include them with the package, though, I know I’m simplifying the problems this could lead to. Alas, it’s proven that this isn’t the product I was looking for, but hopefully I help some other developers out.

Comment from RogerV
Date: May 17, 2007, 3:21 am

Dude, you spent all that time and by now you could have been one rock’n guru in Adobe Flex 2 - building amazing, beautiful web apps.

The charting library is to die for. Super easy to build cool, custom widgets.

ActionScript3 is very nicely improved over plain JavaScript (has classes, inheritance, optional static typing and code completion in appropriate IDE - but still preserves all the functional programming of JavaScript).

Well, I have my dev staff do Java in the middle-tier, but you could just as well roll your Flex middle-tier in .NET if that’s your preference.

Already has excellent support across Windows, Mac, Linux, IE, Firefox/Mozilla, Safari.

Heck Flex was looking great a year ago when I was checking it out at JavaOne. By now its very mature and has gone open source.

If you have real projects to do right now, as I do, then Flex is the only choice - fortunately it’s not one to be regretted.

Pingback from Links of the day « Geeks in the West Country
Date: May 17, 2007, 3:24 am

[...] Microsoft’s Silverlight disappoints [...]

Comment from Phil Winstanley
Date: May 17, 2007, 3:58 am

“However, there’s one nasty required install, and that’s Visual Studio Orcas Beta 1, the next generation of Visual Studio. It’s a whopping 6 Gigs to download (approximate).”

Orcas isn not a requirement at all, I wrote my first silver light app in Notepad. In fact you go on to say you used Notepad++. You need the .NET 3.5 compilers if you want to write managed code, and they might only well come with Orcas at this stage, but that’s just for ease of deployment, not a long term effort.

“I quickly found out that there was no support for WPF Layouts, DockPanels, and ComboBoxs. What, not a basic control like a ComboBox?”

I couldn’t possibly comment on this, however I suspect that lack of controls could be short lived.

“However, to use these controls, I needed to build them. In order to build them, I needed Visual Studio Orcas — something I’m refusing to install.”

Well actually all you need is the C Sharp compiler (v3.5). I can however relate to this, Microsoft release the source code for lots of things but not compiled binaries which can be a pain.

“I’m also disappointed that it looks like Silverlight will only run inside the browser, like current Flash applications.”

That’s not the case, it’s just .NET.
http://weblogs.asp.net/nunitaddin/archive/2007/05/10/silverlight-console-applications.aspx
http://weblogs.asp.net/nunitaddin/archive/2007/05/16/test-with-silverlight-coreclr.aspx

In addition there’s a full image viewer in here I believe: -
http://www.nikhilk.net/Content/Presentations/MIX07.zip

In fact, I think Nikhil even takes you through building it in this session: -
http://int1.fp.sandpiper.net/soma/applications/silverlight/v1/videos/XD003.wmv

Comment from taude
Date: May 17, 2007, 7:42 am

RogerV: I’m on it, look for my post introducing Adobe Apollo post in the next couple of days where I discuss the simplicity in installing user runtime, and a first look at some applications that have been made. I thought the installation of the runtime that took 10 seconds was a breath of fresh air. Looking forward to doing some image manipulation in my demo.

Comment from John Dowdell
Date: May 17, 2007, 10:31 am

“The only thing I’m not really digging about Apollo is having to use Adobe’s ActionScript. It would be so much better if it supported existing scripting languages that many developers already know, like Python, Ruby, Perl, etc.”

There are two closely-related clientside logic languages which can drive Adobe Apollo applications: the ECMAScript-based ActionScript in Adobe Flash Player, and the ECMAScript-based JavaScript in the Webkit HTML browser. Apollo basically brings existing platform-neutral web apps to the desktop, with file privileges and other amenities available to full native-code applications.

If you prefer to write in Python or other serverside languages, and have these execute on the clientside machines, then it might be possible to do a static compile to an ECMAScript language, as opposed to the local runtime conversion to .NET code that Microsoft is offering. I’m still unclear, though, on the total costs of automating a language conversion, whether on the authoring machine, at the server, or on the final clientside machine — Google Web Toolkit, for instance, converts Java code to JavaScript, and I’m not certain yet how people feel about the overall efficiency and range of constructs such a process supports.

jd/adobe

Comment from Augusto
Date: May 17, 2007, 6:40 pm

taude;

It’s gotten a lot better, as for

>I also don’t really like the Java library installation process that Sun provides, it feels clunky

Read my blog entry on that issue;
http://sellmic.com/blog/2007/05/16/easy-deployment-is-finally-here-session-my-notes/

Pingback from 學習Silverlight 困難重重
Date: October 17, 2007, 12:10 am

[...] 前幾天試玩Silverlight 真是玩到頭都大埋,下載SDK同Blend後,立即打開Visual Web Developer,但竟然找不到Project Template,連Project都冇. 那我試試在C# Express看看都是沒有,當然VB 2005都是沒有….於是在Blend中找到Project Template,但心想…那Code方面在那裡辦? 原來Silverlight 需要以External方式用VS 2005做Code Editor,那我立即建立一個Silverlight VB Project,但竟然出現Msgbox說VB需要VS Orcas執行,,,,天呀…..那我唯有建立C#的….老實說,我寫VB,如做一些經常做的程序,經常用的Class,寫Code都算是行雲流水,但一轉至C#就想停一停想一想…..始終同時兩種Language,在腦中都會出又現”打架”情況….而且C# Syntax是Case-Sensitive , 變數/ declarator (”Dim” etc..) / Operator又大不同…所以一切都以龜速速度進行….不過玩玩下…AVG竟然話Blend有Virus….真是頭痕….. 其實我都看到國外有些網友說Silverlight真是很Beta… Microsoft’s Silverlight Disappoints http://www.simplifiedchaos.com/2007/05/15/12/ [...]