Topic Archive

Browsing all posts in Old.

LINQ + WCF + Silverlight (Part One)

After spending a respectable amount of time building LINQ to SQL web applications, I’ve uncovered a set of practices that makes it much easier for me to wrap a SQL Server table model around data classes and keep each aspect of my layered application properly separated. This means my data layer is testable and separate from my business (or domain) layer, which is testable and separate from my presentation layer. With this pattern in place, creating a flexible, reusable solution for all of your layered web applications is much easier, even if you decide not to use LINQ to…

Continue reading "LINQ + WCF + Silverlight (Part One)" »

IDictionary’s missing methods

Continue reading "IDictionary’s missing methods" »

Frictionless data persistence in Silverlight 2

Compressed
While asking the user explicitly for an increased quota makes good sense, it should be avoided whenever possible because it is irrelevant to the experience of using the application and it represents a potential barrier to use. With that in mind, the scant 100 kilobytes we have to work with could be stretched significantly by providing the GZipStream and DeflateStream classes from System.IO.Compression. Unfortunately that is not the case.

Two things get in the way in Silverlight when we attempt to serialize or compress values: serialization, and compression. You can find an approach to serialization here, and a port of…

Continue reading "Frictionless data persistence in Silverlight 2" »

Compression in Silverlight 2: porting SharpZipLib

With a goal to create a Silverlight declarative persistence solution similar to one I recently wrote for ASP.NET WebForms, I quickly discovered that System.IO.Compression no longer contains the GZipStream class we could use to achieve the goal of compressing IsolatedStorage. With a 100kb quota imposed on the browser that can only increase with explicit user permission, it makes sense that we would want to reduce the size of our required state as much as possible to delay or prevent this prompt: it’s an opportunity for both user confusion and support overhead.

Our new goal, then, is to support zip compression in Silverlight…

Continue reading "Compression in Silverlight 2: porting SharpZipLib" »

Serialization in Silverlight

Note: This post is, essentially, a re-tread on the serialization solution explored by Rockford Lhotka during a prototype of CSLA.

That last little while I’ve been working on a persistence solution for Silverlight that requires both serialization and compression to have any value. These two concepts are, unfortunately, fairly difficult to implement in Silverlight due to the fact that they no longer exist. Serialization is slowed by the following limitations:

1. There are no Serialization attributes. This means no concept of a formatter that we could use to blast objects into binary, or XML, like we enjoy in .NET today.
2. Reflection is limited…

Continue reading "Serialization in Silverlight" »

Page 4 of 7« First...«23456»...Last »

Subscribe to the Dimebrain RSS feed, or sign-up for daily emails updates.

Twitter

Twitter

Follow me on Twitter »

Work with me

  • Need help designing or developing your next software product or service? Stuck in a software slump? Contact me and we'll figure out how to get you productive.
Microsoft Most Valuable Professional (MVP)