Sterling Windows Phone 7 and Silverlight Database

Explore practical solutions to optimize last database operations.
Post Reply
surovy113
Posts: 29
Joined: Sat Dec 21, 2024 9:35 am

Sterling Windows Phone 7 and Silverlight Database

Post by surovy113 »

I began my work with Silverlight just before version 3.0 was released. I immediately discovered how powerful Silverlight was for line of business applications. By avoiding cross-browser compatibility issues and eliminating the need to use convoluted frameworks and callbacks to manage state in the stateless world of the Internet, Silverlight enabled web-based applications to be developed far more quickly than the traditional HTML and JavaScript stack. Not only was the user interface far more advanced, but the layout markup facilitated by XAML made it easy to create compelling designs.

While companies were drawn to Silverlight for its ability to create cross-browser and cross-platform solutions, the early value proposition seemed to be in the power of the out-of-browser experience or offline mode. This was paramount to many companies with field agents that must gather data at remote locations that may lack Internet access, and then synchronize the data when they list to data are able to come online. Silverlight could support this scenario with isolated storage, but there was no standard method for doing it.
The lack of a binary writer meant that most developers resorted to XML or JSON serialization, which takes quite a bit more space on disk. It also doesn’t facilitate fast-access queries, and in many cases applications were being built to load the entire object graph into memory in order to query and sort objects.

I quickly realized that I was solving a common pattern: serializing objects, but keeping certain properties “in memory” for querying, and then de-serializing the objects on demand once they were filtered and selected. After repeating the pattern several times, I had enough information to create a generic solution. Several weeks later, after long nights with little sleep, Sterling was born.

Image

Sterling quickly gained momentum because there just wasn’t a compelling open source solution to fill the “local database” gap. I intended from the start that Sterling would not replace a full blown relational database system (as I suspect one will eventually become part of the framework anyway). I didn’t want to create an imposing framework that would force developers to change their architecture to use Sterling, and I wanted something lightweight because I always hated adding a megabyte to a XAP file just to add a new feature.

I believe it is because of these goals - to remain lightweight and non-intrusive - that Sterling not only had initial success but was also a perfect candidate to easily port to the Windows Phone 7 platform when it was released. In fact, the only major change I had to do was change an IQueryable interface for the keys and indexes to IEnumerable for the phone. The lack of a decent alternative solution on the phone coupled with its initial popularity amongst developers quickly drove Sterling to the first 1,000 downloads.

Something more important happened. I chose open source for two reasons: I knew this would fill a need many developers experienced and wanted to make it available to a broad audience, and because I wanted to be able to collaborate with the community on the features in Sterling. This decision has helped Sterling evolve into the rich feature set it has today, which includes:
Post Reply