Silverlight and LINQ2SQL Web Service

In my previous blog about getting desktop applications to speak to your web applications I got a taste of what Silverlight is about. It was the first experience I.ve had with Silverlight or even WPF and sparked my interest on the technology. Not only that, I stumbled onto a couple articles describing LINQ and how much it has improved which intrigued me. Now, I am working on re-creating my .Tournament Management. program using Silverlight and LINQ (in a web service). In this blog I won.t give a full detail on every aspect of my project, but I will provide information on some of the key discoveries I.ve made. Even though I was surprised by the amount of articles available on the web about them there still seemed to be a couple issues that I struggled with and couldn’t find immediate answers to.

One thing that I found is that I used Microsoft.s Expression Blend for designing the pages and user controls for my Silverlight control. It is not easy to develop UI-friendly WPF/Silverlight applications with just the XAML code. If you are looking to do anything more than just display a few text boxes or a few buttons then I would strongly recommend getting a WPF/Silverlight designer like Microsoft.s Expression Blend. As I stated in my previous blog: It’s got a high price-tag of $499 but I believe you will find it worth the investment if you are planning to do anything even remotely extensive with WPF/Silverlight.

My goal of the over-all experience is to be able to re-create my tournament management software in less time/effort while still providing equal functionality if not more. My theory is that using Silverlight I will be able to create sophisticated and clean user interfaces for the application and using LINQ2SQL I will be able to specify my database structure and easily create objects based on the structure. LINQ will provide the ability to easily query those objects while LINQ2SQL will provide the data persistence support.

  • Stretching controls (the little locks in Expression Blend).
  • Serializing complex LINQ2SQL object relationships.
  • There is never “truly” multiple windows in a Silverlight app. They are just separate controls displayed at different times.
  • Staying Object Oriented. Most of the functionality is coded into one single file.
  • Extending your user controls. Can.t extend from an already-extended control. Can’t extend TabItem control.
  • Databinding datagrids within a user control. Can.t seem to use Expression Blend to do this (at least not in the designer). Can.t set DataContext of the datagird from the designer, can only set the DataContext of the whole user control.
  • Asynchronous calls to web services make binding data to controls more complex. Show a good pattern for binding combo boxes.
  • Although using delegates makes the method count lower, it makes it hard to track when certain events occur in the code. The code is no longer linear, so to speak.

Leave a Reply

Your email address will not be published.

Humanity Verification *Captcha loading...