Adam Calderon

Thoughts About .NET That Sometimes Hurt My Brain

September 2008 - Posts

RIA Talks

Over the next few months I will be covering SoCal doing a talk on Rich Internet Applications (RIA) using ASP.NET AJAX 4.0 and Silverlight. The inspiration for this talk comes from the convergence I see between some of the Web 2.0 technologies and Silverlight and the coming of age of Web 3.0. I am hoping I will be able to cover some of the challenges you will face when interacting with these technologies and provide some guidance as you move forward creating applications of this type.

Information and Dates

Title

Building RIA Applications for Web 3.0

Description

Web 3.0 will prove to be the incarnation that moves us into highly interactive applications that exploit the advances in UI graphics, module web applications and the ever increasing internet connection speed to provide users with an online experience never seen before. In this session we will take a look into how some of the new Microsoft Web technologies (ASP.NET AJAX 4.0 and Silverlight) will play a role in this new frontier. First will take a look at ASP.NET AJAX 4.0 and how some of the new features like templates and data binding are contributing to a pure client-side story for web development. Then we will dive into Silverlight exploring the extensive UI model, robust communication stack and reliance on .NET and how these features provide a robust environment for creating truly interactive module web applications. Finally we will look at how the HTML Bridge in Silverlight provides interaction between the dynamic language world of JavaScript and the static language world of .NET and how to best work in these two environments to provide a rich Web 3.0 experience.

Dates and Locations

Tuesday September 22nd

San Diego .Net User Group

www.sandiegodotnet.com

 

Saturday October 25th

SoCal Code Camp (USC)

http://www.socalcodecamp.com/

 

Tuesday November 4th

San Diego .Net Developers Group

http://www.sddotnetdg.org/

 

Tuesday November 11th

Disney .NET Developers Group

 

Tuesday November 11th

Silverlight User Group SiG

http://www.ocdotnet.org/SIGs/WPFSliverlightUserGroupSIG/tabid/175/Default.aspx

Serializing LINQ Types

So I am using the new Data Designer in VS 2008 to create my LINQ to SQL DataContext and associated data classes and one of the first thing I wanted to do was to send back one of these "data classes" to an AJAX client via a AJAX-enabled web service. I write the code to return a SalesTerritory class "yes I am using the infamous AdventureWorks database" and hook up all of the associated code and try to run the thing. To my surprise things didn't work. I open up Nikhil Kothari's Web Development Helper to find out I have a serialization error.

"Type 'RIASilverlightWeb.Data.SalesTerritory' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with the DataMemberAttribute attribute.

Well this really bummed me out. I sure the heck didn't want to decorate all of that generated code with DataContact/DataMember stuff. To my surprise MS has made this easy. All you need to do is go to the properties of the designer and set the SerializationMode to Unidirectional (see below).

SerializationMode

What this does is decorate all of your classes with the DataContract attribute and all of your properties with the DataMember attribute. Once you do this the data can be serialized.

This can also be done with SQLMetal using the /serialization:Unidirectional command flag.

Posted: 09-10-2008 1:57 AM by AdamCalderon | with no comments
Filed under: ,