Shawn

Shawn Wildermuth

The Blog

My Rants and Raves about technology, programming, everything else...


Introducing Project Niagara

Url: http://niagara.codeplex.com

The NiagaraThe goal of Project Niagara is to democratize the validation support. The project wants to help developers add validation support to ADO.NET Data Services as well as Web Services in Silverlight. In addition, it has the goal of allowing multiple ways to supply the validation metadata to the different data access strategies. As it is my opinion that there are scenarios where attributes are not the best idea.

The deliverables for this project will include:

Read...


How Silverlight 3 Validation Works

SilverlightAs RIA Services is plodding towards a release, many people are looking at it to help them with validation of data in Silverlight. Using this validation in Silverlight 3 is pretty straightforward but there are some caveats.  I want to show you under the covers so you understand what is happening. In this first part of the series, let's look at what it means to use validation from the outside.

Back when Dynamic Data was being developed, a set of attributes was created to help tell the Dynamic Data folks about validation and other metadata so they could create smart scaffolds. These include:

In addition, there were attributes that could tell Dynamic Data about how to name fields and such. This meant that if you were using a POCO class or a DTO, that you could do the annotation like so:

Read...


Fall/Winter Silverlight Tour Schedule

Url: https://agilitrain.com/workshop/info/Silverligh...

Silverlight TourWe have made some adjustments in the Fall/Winter schedule for the Silverlight Tour. As Fall is often our busiest time of year, we decided to move some dates around to not conflict with the PDC and other conferences. Here is the new Schedule for the Silverlight Tour and the Advanced Silverlight Workshop:

Silverlight Tour

Read...


Using Large Message Requests in Silverlight with WCF

SilverlightToday I was working with a client and ran into a problem I didn't expect. This particular problem had to do with Silverlight consuming a WCF Service. Sometimes WCF causes me to spew four letter words. There is a class of WCF problems that cause this: connection rejection. WCF has been designed to prevent common DDoS and other attacks that could cause servers to fail or at least not serve honest requests. To this end the default size of a request is quite small. In fact, its usually 64K in size. This size is fine for most every request but occassionally when a client wants to send a collection of things to the server this size is too small. But we'll get to that in a minute. First, some background...

This particular client has a large service that's been working for quite a while, then suddenly a single call he has was being rejected. The new service call he was making was sending back a list of a couple of hundred of POCO classes. He had been downloading large lists before so on the surface this should have worked. But it didn't. 

The cause was that the default WCF limits were rejecting the connection. This type of error where its just failing, even Fiddler isn't helpful. There is no return code, the connection is just severed. Debugging it requires some trial and error which sucks.  The calls that were returning a lot of data were working fine because the default ClientConfig file looks like this:

Read...


ADO.NET Data Services 1.5 Feature: Projections

SilverlightIf you've been following my blog, you should know that I am keeping a pretty close watch on ADO.NET Data Services. The team recently released a second CTP of the new version with some interesting features. This CTP has some pretty compelling additions, but I am going ot focus on one in particular.

I've been teaching and using ADO.NET Data Services for a long time and I like showing off exposing a LINQ-based provider (Entity Framework, NHibernate or others) to a Silverlight application. While ADO.NET Data Services does expose its API through a REST API, the magic for me is in its use in Silverlight. In case you haven't been following along, using the Silverlight client you can issue a LINQ query through the Silverlight client (though in fairness, the full power of LINQ is not supported in the client):

var qry = (from g in ctx.Games
           where g.Genre.Name == "Shooter"
           orderby g.ReleaseDate
           select g) as DataServiceQuery<Game>;

qry.BeginExecute(new AsyncCallback(r =>
{
  try
  {
    theList.ItemsSource = qry.EndExecute(r).ToList();
  }
  catch (Exception ex)
  {
    // NOOP
  }
}), null);

This is a powerful feature so that (unlike web services) developers can use a looser service definition to define their data stack. Let the developer who needs data be able to sort, filter and shape that data as necessary.

Read...


Silverlight Data Examples Have Been Updated!

Url: http://www.silverlightdata.com

Silverlight LogoIf you've never had the chance to visit my sister site (http://www.silverlightdata.com), now's a good time. I've updated my examples there to include my MVVM, Prism and Declarative UI examples (to go with the skinning/switchable Astoria example).  Take a look if you're doing Silverlight data-based applications.

Read...


Why Declarative UIs Are Important

Url: http://wilderminds.blob.core.windows.net/downloads/declarativeui.zip

Sketching a UIIf you're building Internet applications, you've probably been bombarded with lots of new technologies the last few years: Silverlight, Flex, ASP.NET MVC, jQuery, etc. While all of these technologies have their use-cases, many of them are pointing to something that is new and important.

The central idea of separating concerns is not new. Back in SmallTalk when Model-View-Controller was born, the benefits of isolating layers of an application were pretty apparent. The problem was that it wasn't easy to implement. The problem with implementation was never the code...or was exactly the code. The problem is that when you are working on a problem in the user interface, it is far to easy to try and solve it directly in the code. Its not laziness or lack of talent.  Its simply a matter of focus sometimes. Under the timeline gun its easy to be myopic about a problem. Its simply too easy to just try and solve a problem by writing code in the user interface (or the View).

Read...


My SketchFlow .NET Rocks TV Episode is up (DNR-TV)

Url: http://dnrtv.com/default.aspx?ShowID=148

Silverlight LogoI am excited to announce that my new DNR-TV episode is up at .NET Rocks. Carl and I visited while we were both at DevTeach to show off Blend's new SketchFlow functionality. If you have time, give it a spin!

 

Read...


A Plethora of Silverlight Behaviors/Triggers

Url: http://expressionblend.codeplex.com/

Blend

It looks like the Expression team is skulking around and releasing code. They've just released a bunch of behaviors on the new Expression Blend Samples CodePlex project. The number of sample behaviors and triggers is just staggering:

Read...


One Week Left Before Seattle's Silverlight Tour Stop

Url: https://agilitrain.com/Workshop/Info/Silverligh...

Silverlight Tour

Are you ready...for Silverlight 3? If not, now's your time to ramp up in three days.  The Silverlight Tour is coming back to Seattle next week.  It arrives on September 2nd in Bellevue and there are still seats available. 

Read...