Diary.Dev

The unstructured ramblings of a developer gone wild.

  • Home
  • Archive
  • Contact
  • FeedSubscribe
  • Sign in

Converting a legacy application to Silverlight, Part 1

Posted on 21. January 2011 22:58 by Martin

This is a story of converting an application from ASP, old, old ASP, and RDO into a modern application. It has a few twists and turns and will take much more than a single blog post to tell.

We needed a way to edit data with quite a number of fields. Some of these fields were lookup, others were simple values like dates,. A grid with all items on a single row, like Excel, wouldn’t work. So, the DataForm control came to the rescue. Or, so I thought.

The normal behavior for the control is to give it a collection of all the items being edited. This works fine for small sets. When you have over 10000 items, the initial load takes a long time. Additionally, you end up with a snapshot; you don’t see things getting added to the backing data store until you explicitly ask for it. This wouldn’t work for us.

One thing that our old system did was let you create custom filters on the data. Granted, this was back before we took security seriously. I just let the end user type in any old WHERE clause that got added to my SQL query. Yeah. I wasn’t going to do that with this updated version.

So, I went down the road of learning how to filter data coming from and Entity Framework LINQ statement. I didn’t want to hard code anything.

I came up with an XML schema that would encompass any type of filter that I could think of. Next, I set about writing code that would take an IQueryable object and return another one that had all of the conditions defined in an XML document. In my next post, I’ll start to discuss how I did that. And, I’m sure you’ll find things that I could’ve done better. This was my first time working at this level with the technology.

My next task was loading items from the server only when necessary. This meant creating a new VCR control that could call RIA Service methods to retrieve counts and individual items. I’ll discuss that one in a future post.

Tags:

Mission App | RIA Services | Silverlight

Submit to DotNetKicks...
Permalink | Comments (0)



Calendar

<<  January 2021  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar

Category list

  • RSS feed for HistoryHistory (1)
  • RSS feed for Mission AppMission App (2)
  • RSS feed for Non CodeNon Code (1)
  • RSS feed for RIA ServicesRIA Services (2)
  • RSS feed for SilverlightSilverlight (1)
 

Copyright © 2011.

Design by Free Flash Templates | Adapted by ExtraGeek