by jesseliberty via Jesse Liberty - Silverlight Geek on 3/5/2010 3:11:37 AM
For this week’s release of the Silverlight HyperVideo Platform we are committed to having configuration information retrieved from a database. To accomplish this we need (want?)
Smooth-streaming videos that we can use to illustrate the relationship among Items, Topics and Links and
A Database in which to store the configuration information
Step 1 was accomplished by
Step 2 was accomplished by creating a Database with four tables
[Click on image for full size]
The Sets, Items, Topics and Links tables each represent part of an object, with the remaining part held in Listables. This “normalization” of the database reduces the duplication of data, and thus reduces the likelihood of database corruption.
The Sets, Items, Links and Topics tables each have a column titled MyLinkableId which is a foreign key linked to the key ID field in the Linkables table. This lets us create views such as this definition of the ItemsView
SELECT dbo.Items.ID AS ItemsID, dbo.Items.ItemUri, dbo.Listables.ID AS ListablesID, dbo.Listables.TextToDisplay, dbo.Listables.ImageSource, dbo.Items.MyListableID FROM dbo.Items INNER JOIN dbo.Listables ON dbo.Items.MyListableID = dbo.Listables.ID
As shown in the image, the column MyListableID in Items and the column ID in Listables are used to join the two tables together into a complete Item.
The second set of connections from each of Links and Topics to the Listables (colored blue) represent the has a relationship from Items to Topics and from Items to Links.
Thus, the database has captured all the object relationships, but has translated it into relational terms.
The next step is to use the Entity Frameworks to translate back to objects, and WCF RIA Services to create those objects both on the database server and on the Silverlight client.
When we roll out the player tomorrow, the videos will be on the MSN server, the Configuration Database will be hosted on a MaximumASP server, and the HVP will be served on Silverlight.net (!)
Original Post: Persisting the Configuration
The content of the postings is owned by the respective author. Silverlight Feeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on Silverlight Feeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.