SingingEels : Development Community & Resource

Login

Articles

  • ADO.NET (2)
  • ASP.NET (36)
  • LINQ (5)
  • Security (2)
  • Silverlight (3)
  • SQL (7)
  • Standards (5)
  • WCF (2)

Syndication

  • Articles RSS
  • Blogs RSS

Contribute

  • Our Authors List
  • Member Sign-Up
  • Suggestions Box

Silverlight Beta Has WCF, LINQ, Windows Controls!

(Mar 06 2008 - 08:29:58 AM by Timothy Khouri) - [print blog post]

I can't stress enough how amazing this is. When the Silverlight alpha came out, I was very disappointed due to the fact that there was no standard windows controls (TextBox, DropDownBox, etc). There was also no WCF support, meaning you're basically stuck with glorified JavaScript application. I was consistantly reassured by a good friend of mine who works for Microsoft (Jonathan Cater) that the beta would fix all of that, but I was still skeptical.

Why WCF in Silverlight is Great

Silverlight (as you may already know) brings amazing power to the web world in that you get beautiful rich content abilities, embedded audio and video codecs, cross-browser and cross-platform abilities and more. But many argued that you got the same with Adobe's Flash.

Where Silverlight destroys Flash and Java Applets is in version 2.0 (currently in beta) which brings a powerful slew of .NET support including WCF. WCF (Windows Communication Foundation) gives you the ability to build client / server applications on a TCP based connection, HTTP based connection and more. It's so incredibly easy to use verses the traditional "write it yourself TCP client", that I predict we are going to see a complete change in the Internet as a whole.

Be prepaired for MMORPGs (online video games) that have a Silverlight client end. Be prepaired for big corporations to drop windows apps and build robust (SoA based architecture) applications in Silverlight. Seriously, buy stock in Microsoft right now... and in 2 years cut me a check with a percentage of your profits... I'll accept personal checks.

Silverlight Windows Controls

I'm also pleased with the "windows controls" that are in Silverlight so far. I will admit that I haven't looked too much into them, so don't expect me to give an exhaustive list. But what I will say is that when the alpha came out, I was thinking "what happened to Microsoft!?" But, after seeing the TextBox, DatePicker, Calendar and ListBox I realize that they will not disappoint me with the release version.

Visual Studio 2008 and Silverlight

Another great thing that I forgot to mention is that there is much better Visual Studio support now for Silverlight. There's intellisense, a nicer editor and the like. Also, when starting a project, you have the ability to create a Web Site, Web Application or just an HTML file, whereas in the alpha, you could only start with a basic HTML file.

  • Mar 06 2008 - 09:35:46 AM Timothy Khouri

    Well, I tried porting one of my recent WCF clients to Silverlight (which is basically my test to see how far Silverlight has come in the way of WCF and it's overall usefulness to me), and I'm sadly still a little disappointed.

    While it does have WCF support (and it also supports Sockets in the System.Net.Sockets namespace), it doesn't support the "DuplexClientBase" infrustructure.

    It does support "ClientBase", which is one-way WCF communications, but I really need to have the call back and OperationContext abilities of WCF in order for this to be a really "connected" application (as apposed to a "request-for-data" application).

    Let's see how Microsoft goes from here...

  • Jul 29 2009 - 12:35:46 AM viserys

    I'd like to thank you first of all for your WCF articles - they've been invaluable.

    Do you know if Silverlight 3 is capable yet of using the DuplexClientBase structure? I'm designing a game with a Silverlight client (as you mentioned in your post), but I think I might need to change direction if not.

  • Jul 29 2009 - 05:37:24 AM Timothy Khouri

    SL3 *does* support a duplex WCF model, however, it's not exactly the same as the standard WCF net.tcp duplex channel.

    The basic differences are that Silverlight will use a polling mechanism to achieve 2-way communications, and the other difference is that messages are fired asynchronously.

    It's going to be a slight learning curve using SL3 (especially if you haven't really gotten into Silverlight or WPF much yet), but I think it's worth it.

    Here's a blog post from earlier this year about SL3 and the duplex WCF stuff: http://blogs.msdn.com/silverlightws/archive/2009/03/20/what-s-new-with-web-services-in-silverlight-3-beta.aspx

  • Jul 29 2009 - 12:37:14 PM viserys

    I'm a little bit concerned from my reading, as the Internet's abuzz with rumored scaling issues with PollingDuplex, poor responsiveness compared to TCP, etc. The MSDN documentation says that all methods in my service contract must be IsOneWay enabled, also, which will require me to rethink my design slightly.

    I might just go ahead with it (as a learning experience, if nothing else). Do you have any experience with the PollingDuplexBinding, especially with regards to something like a game? The closer to realtime the communication is, the better.

  • Jul 30 2009 - 05:47:02 AM Timothy Khouri

    Personally, I haven't really done much with it... and there is always the option of using a straight TCP sockets. I would try to do the polling route and see how it goes. It may require you to rethink the messages you send to the client.

    Example: Instead of sending lots of separate "Bob moved by 1,2" commands, you could send an array of 'commands' that represent the current location of GameUsers in the area, where they are going, and the ETA (when then 'should' get there). This would allow you to smoothly animate player's movement on the client end.

    I hope it works out for you... If you don't have a blog already, you could blog your progress here on SingingEels. Maybe even write an article when it's all said and done :)

  • Jul 30 2009 - 10:01:10 AM viserys

    Unfortunately, we decided last night to skip WCF for the Silverlight client and go with sockets. WCF seems very, very cool, and I'd like to work with it, but getting Silverlight to cooperate with a self-hosted duplex service is more trouble than it's worth at this point in time. I spent roughly all day reading up on it, and roughly all night trying to get it to work. No joy. :(

    We do have a blog, but it's not much to look at yet. I've been posting daily, but the project started only a few days ago. Might write that article you mentioned once we have something substantial, though!

    Thanks again for all of your input.

You must be logged in to add comments. If you have not already done so, you can create an account here. If you already are a member, you first need to login before you can comment.

Developer / Architect / Author

Blog Archives

  • August 2010 - (1)
  • June 2009 - (1)
  • January 2009 - (1)
  • November 2008 - (1)
  • October 2008 - (2)
  • September 2008 - (2)
  • August 2008 - (3)
  • July 2008 - (1)
  • June 2008 - (3)
  • May 2008 - (2)
  • April 2008 - (2)
  • March 2008 - (4)
  • February 2008 - (2)
  • December 2007 - (2)
  • November 2007 - (1)
  • October 2007 - (4)
  • September 2007 - (9)
  • August 2007 - (7)

Related Ads

SingingEels.com as of Sep 02 2010 - 09:22:22 PM - (0.0312514)