<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Silverlight &#38; WCF RIA Services &#187; .NET RIA Services</title>
	<atom:link href="http://bachelorthesis.zdechovan.com/tag/net-ria-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://bachelorthesis.zdechovan.com</link>
	<description>Bachelor Thesis About RIA Enterprise Applications (written by Lukáš Zdechovan, led by Ondrej Svačina)</description>
	<lastBuildDate>Sat, 29 May 2010 17:57:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enable associated entities to load with base entity</title>
		<link>http://bachelorthesis.zdechovan.com/enable-associated-entities-to-load-with-base-entity/</link>
		<comments>http://bachelorthesis.zdechovan.com/enable-associated-entities-to-load-with-base-entity/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:04:02 +0000</pubDate>
		<dc:creator>Lukáš Zdechovan</dc:creator>
				<category><![CDATA[Samples]]></category>
		<category><![CDATA[.NET RIA Services]]></category>
		<category><![CDATA[domain model]]></category>
		<category><![CDATA[Entity Framework]]></category>

		<guid isPermaLink="false">http://bachelorthesis.zdechovan.com/?p=104</guid>
		<description><![CDATA[ I encoutered a problem, when I wanted to load Employees entities also with some associated entities at once, from the well-known AdwentureWorks database model (in Entity Framework) via DomainService/Context in a .NET RIA Services SL Application.
So if you encountered the same problem, that initially your associated/referenced entities are null when loaded, read more to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-132" style="margin: 10px;" title="Associated entitites" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/association.png" alt="Associated entitites" width="150" height="81" /> I encoutered a problem, when I wanted to load Employees entities also with some associated entities at once, from the well-known AdwentureWorks database model (in Entity Framework) via DomainService/Context in a .NET RIA Services SL Application.</p>
<p>So if you encountered the same problem, that initially your <strong>associated/referenced entities are null</strong> when loaded, read more to see how to solve this issue.</p>
<p><span id="more-104"></span>A week ago, I wanted to bind the DataGrid with Employees from AdventureWorks DB with contact information as FistName, LastName, etc. <a href="http://msdn.microsoft.com/en-us/library/ms124714.aspx">Contact</a> is with <a href="http://msdn.microsoft.com/en-us/library/ms124432.aspx">Employee table</a> associated by ContactID foreign key, so in SQL I would go for inner join (or left outer join) on these two tables.</p>
<p>In my Data Model I had the Employee entity with navigation property Contact.</p>
<p>But when you load it by a service query in your domain context on the client, you&#8217;ll basicly populate your domain context Employees collection with data. Navigation property to Manager is working since, this is also an already laoded Employee entity. But all the other navigation properties like Contact are null. Of course, this is logical, since you probably want don&#8217;t want to transfer a large amount of data, you know, all the associated entities, which you usually do not need.</p>
<p>The usual scenario is that you have a list of entities and you download some detail only after one is selected, for example. In my problem, I had to either change the domain model in way, that Employee entity will contain some of the Contact attributes, but that&#8217;s not correct.</p>
<p>So what you actually have to do, to download entities also with specified associated entities?</p>
<p>At first, open the metadata class for the domain service.<br />
Find the Contact navigation property in the Employee entity class. Add [Include] attribute above the property. This way we tell Ria Services to change the query to get Employee also with associated Contact entity.</p>
<pre class="c-sharp">[Include]
public Entity&lt;Contact&gt; Contact;</pre>
<p>Now change the Domain service class retrieve method to include the Contact.</p>
<pre class="c-sharp">return this.ObjectContext.Employees.Include("Contact");</pre>
]]></content:encoded>
			<wfw:commentRss>http://bachelorthesis.zdechovan.com/enable-associated-entities-to-load-with-base-entity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Localization of Silverlight Business Application (sample)</title>
		<link>http://bachelorthesis.zdechovan.com/localization-of-silverlight-business-application/</link>
		<comments>http://bachelorthesis.zdechovan.com/localization-of-silverlight-business-application/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 16:55:03 +0000</pubDate>
		<dc:creator>Lukáš Zdechovan</dc:creator>
				<category><![CDATA[Samples]]></category>
		<category><![CDATA[.NET RIA Services]]></category>
		<category><![CDATA[Localization]]></category>

		<guid isPermaLink="false">http://bachelorthesis.zdechovan.com/?p=99</guid>
		<description><![CDATA[
Although it looks that localization of Silverlight Business Applications is not worth of writing a post, there are some really inconspicuous problems which you have to resolve.
If you want to localize the application by creating resource files of strings for a particual language (AppStrings.sk-SK.resx, AppString.de-DE.resx) you should definitely read this post (with sample source-code) to [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp" style="text-align: left;">
<div id="attachment_102" class="wp-caption alignleft" style="width: 150px"><img class="size-full wp-image-102" title="Illustration - flags" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/100-countries1.png" alt="Illustration" width="140" height="114" /><p class="wp-caption-text">Illustration</p></div>
<p>Although it looks that localization of S<strong>ilverlight Business Applications</strong> is not worth of writing a post, there are some really inconspicuous problems which you have to resolve.</div>
<p>If you want to localize the application by creating resource files of strings for a particual language (AppStrings.sk-SK.resx, AppString.de-DE.resx) you should definitely read this post (with sample source-code) to not get into trouble.</p>
<p><span id="more-99"></span></p>
<p>At first I create a New project with Business Application Template.<br />
<img class="size-full wp-image-111" style="margin: 10px;" title="Business Application Template" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/1-template.png" alt="Business Application Template" width="584" height="70" /><br />
The strings resource files are in the template located in both Client and Server (Web) projects.<br />
<img class="alignleft size-full wp-image-112" style="margin: 10px;" title="Resource files" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/2-resourcefiles.png" alt="Resource files" width="263" height="530" /></p>
<p>The most important resource is the ApplicationStrings.resx file, in which almost all the strings from the client side are stored.</p>
<p>Strings which are used in the login and registration form are stored on the server side in RegistrationDataResources.resx.</p>
<p>To localize the strings you have to create copies of desired resource file with an appropriate sufix according to the culture, so slovak copy of AppStrings will be ApplicationStrings.<strong>sk-SK</strong>.resx. Do the same to all resource files in the project and translate them to your language.</p>
<p style="text-align: left;">Don&#8217;t add resource files to the Web\Resources directory in the client project, because in this folder should be placed just links to files in Resources folder in Web project. Link to a file si added by adding Existing item to client side Web\Resources and choosing &#8220;Add as link&#8221; option.<a href="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/3-add-links.png"><img class="aligncenter size-thumbnail wp-image-113" style="margin-top: 6px; margin-bottom: 6px;" title="Add as a link" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/3-add-links-150x150.png" alt="Add as a link" width="150" height="150" /></a> Till now, we did similar work we do in ASP.NET applications when localizing them.</p>
<p>To test whether it works add following line to App.xaml.cs</p>
<pre name="code" class="c-sharp">
...
using System.Threading;
using System.Globalization;
...
private void Application_Startup(object sender, StartupEventArgs e)
{
    // This will enable you to bind controls in XAML files to WebContext.Current
    // properties
    this.Resources.Add("WebContext", WebContext.Current);

    // This will automatically authenticate a user when using windows authentication
    // or when the user chose "Keep me signed in" on a previous login attempt
    WebContext.Current.Authentication.LoadUser(this.Application_UserLoaded, null);

    //Change current culture to slovak, just for the test
    Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("sk-SK");</strong>

    // Show some UI to the user while LoadUser is in progress
    this.InitializeRootVisual();
}
</pre>
<p>Run the project and you&#8217;ll not see any localized string there.</p>
<p>Now, you&#8217;ll have to do a bit of manual work to make your localization working. At first, unload your client side project by right-click on a project and select &#8220;Unload Project&#8221;.<br />
Navigate to the project folder in your filesystem and open the .csproj file in notepad or similar text editor.<br />
Locate &lt;SupportedCultures&gt; element a place there all the culture that you want to have in your app separated by comma (&lt;SupportedCultures&gt;en-US,sk-SK&lt;/SupportedCultures&gt;).</p>
<p>Reload the project back, build it and run. Localization should work.</p>
<div id="attachment_117" class="wp-caption aligncenter" style="width: 310px"><a href="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/4-localized-page1.png"><img class="size-medium wp-image-117" title="Localized page" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/4-localized-page1-300x167.png" alt="Localized page" width="300" height="167" /></a><p class="wp-caption-text">Localized page</p></div>
<p>Now, let&#8217;s look on how to localize new strings, which are not stored as resources. In this template, not localized are &#8220;Home page content&#8221; and &#8220;About page content&#8221; strings.</p>
<p>I created new resourcefiles HomeView.resx and AboutView.resx plus sk-SK localized equivalents and rebuild the project. In those I will store my strings for each view. To enable use of these resoruces in these views, add some piece of code to the ResourceWrapper.cs Helper class, which holds as a StaticResource in the XAMLs.<br />
<em>Note: Your resources are in Assets.Resources namespace in this case.</em></p>
<pre name="code" class="c-sharp">
using Assets.Resources;
...
public sealed class ResourceWrapper
{
private static SecurityQuestions securityQuestions = new SecurityQuestions();
private static HomeView homeView = new HomeView();
private static AboutView aboutView = new AboutView();
...
public HomeView HomeViewStrings
{ get { return homeView; } }

public AboutView AboutViewStrings
{ get { return aboutView; } }
</pre>
<p><span style="font-style: normal;">Then in our XAMLs we may use our ResourceWrapper properties HomeViewStrings and AboutViewStrings to bind to desired string.</span></p>
<pre name="code" class="xml">
&lt;TextBlock ... Text="{Binding Path=HomeViewStrings.HomeContent, Source={StaticResource ResourceWrapper}}" /&gt;
</pre>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 394px"><img class="size-full wp-image-119" title="Localized content" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/5-localized-content.png" alt="Localized content" width="384" height="167" /><p class="wp-caption-text">Localized content</p></div>
<p><span style="font-style: normal;">You can localize the whole application this way, so I hope this article was helpful.</span></p>
<p><span style="font-style: normal;"><strong>Remember what is the most important:</strong></span></p>
<ol>
<li><span style="font-style: normal;">Change the project file in text editor to allow the client to support different cultures (via SupportedCultures XML node).</span></li>
<li><span style="font-style: normal;">Login and registration resources are stored in the Web project.</span></li>
<li><span style="font-style: normal;">Add your own resourcefiles also to ResourceWrapper.cs Helper class to allow binding to it in XAML file.</span></li>
<li><span style="font-style: normal;">I recommend to set the Access Modifier in default resource files to &#8220;Public&#8221; (default is internal) and for culture-specific resource files to &#8220;No-code generation&#8221;, because we don&#8217;t need it in these.</span></li>
</ol>
<p><a href="http://bachelorthesis.zdechovan.com/wp-content/uploads/2010/01/LocalizedSilverlightApp.zip">Download source code</a> of the sample. (Silverlight 4, .NET 4.0, VS 2010)</p>
<p>If you find some errors in my sample or you would like to share your knowledge about localization, some new ideas, etc, please leave comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://bachelorthesis.zdechovan.com/localization-of-silverlight-business-application/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>10 MIX &#8216;09 Webcasts about RIA &amp; Silverlight</title>
		<link>http://bachelorthesis.zdechovan.com/10-mix-09-webcasts-about-ria-silverlight/</link>
		<comments>http://bachelorthesis.zdechovan.com/10-mix-09-webcasts-about-ria-silverlight/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 18:25:49 +0000</pubDate>
		<dc:creator>Lukáš Zdechovan</dc:creator>
				<category><![CDATA[Resources]]></category>
		<category><![CDATA[.NET RIA Services]]></category>
		<category><![CDATA[MIX '09]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[webcast]]></category>

		<guid isPermaLink="false">http://bachelorthesis.zdechovan.com/?p=17</guid>
		<description><![CDATA[I&#8217;ve found a lot of useful videos about Rich Internet Application, Silverlight and .NET RIA Services.
Visit MIX 09 web site to see all videos related to Microsoft Technologies or continue reading and watch my recommended webcasts.
***

I. User Experience Design Patterns for Business Applications with Microsoft Silverlight 3
Come hear how creating great user experiences for business [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_18" class="wp-caption alignleft" style="width: 162px"><a href="http://videos.visitmix.com/MIX09"><img style="padding: 5px; margin: 5px;" title="mix09logo" src="http://bachelorthesis.zdechovan.com/wp-content/uploads/2009/11/mix09logo.png" alt="MIX '09 logo" width="152" height="66" /></a><p class="wp-caption-text">MIX &#39;09 logo</p></div>
<p>I&#8217;ve found a lot of useful videos about Rich Internet Application, Silverlight and .NET RIA Services.</p>
<p>Visit <a href="http://videos.visitmix.com/MIX09">MIX 09</a> web site to see all videos related to Microsoft Technologies or continue reading and watch my recommended webcasts.</p>
<p>***</p>
<p><span id="more-17"></span></p>
<h3><span style="font-weight: normal;">I. User Experience </span><span style="font-weight: normal;">Design Patterns</span><span style="font-weight: normal;"> for Business Applications with Microsoft Silverlight 3</span></h3>
<p>Come hear how creating great user experiences for business applications can result in both improved productivity and significant support cost savings. Learn how to use proven user experience patterns in cost effective ways with Silverlight 3, including rich data display, data input and advanced data validation, and application navigation.</p>
<p><a href="http://videos.visitmix.com/MIX09/C21F">Watch video</a></p>
<h3><span style="font-weight: normal;">II. Consuming Web Services in Microsoft Silverlight 3</span></h3>
<p><span style="font-weight: normal;">Come hear how to work with external REST, SOAP, and Windows Communication Foundation (WCF) services from Silverlight. Learn how to securely and efficiently communicate with services using Binary XML, debug services with improved Faults support, and implement server-to-client &#8220;push&#8221; using the new Add Service Reference for Duplex functionality.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t42f">Watch video</a></span></p>
<h3><span style="font-weight: normal;">III. Escaping Flatland in Application Design </span><span style="font-weight: normal;">Rich User Experiences</span></h3>
<p><span style="font-weight: normal;">Learn how technology and rich application design can not only enhance seemingly ordinary interactions but also engage users like never before. We showcase examples of how to create more compelling user experiences on the Web and desktop. To top it off, we walk through building a highly interactive application making use of these principles.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/c11f">Watch video</a></span></p>
<h3><span style="font-weight: normal;">IV. Building Amazing </span><span style="font-weight: normal;">Business</span><span style="font-weight: normal;"> Centric Applications with Microsoft Silverlight 3</span></h3>
<p><span style="font-weight: normal;">Come hear how simple it is to build end-to-end data-intensive Silverlight applications with the new set of features in Silverlight 3 and .NET RIA Services. Explore Silverlight improvements that help to enable rapid development for business applications and to make your development process more productive.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t40f">Watch video</a></span></p>
<h3><span style="font-weight: normal;">V.</span> NET RIA Services<span style="font-weight: normal;"> &#8211; Building Data-Driven Applications with Silverlight and ASP.NET</span></h3>
<p><span style="font-weight: normal;">Learn how Microsoft is simplifying the traditional n-tier application pattern by bringing together ASP.NET and Silverlight. Learn about patterns for working with data, implementing reusable and independently testable application logic, and application services that readily scale with growing requirements.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t41f">Watch video</a></span></p>
<h3><span style="font-weight: normal;">VI. Microsoft Silverlight Is Ready for Business</span></h3>
<p><span style="font-weight: normal;">Come learn how to build a Silverlight business application today with the new UI features including DataGrid, DataForm, validation and navigation. Also see an example of how to connect to services using a LINQ enabled, Entity Framework-backed, data management solution.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t69m">Watch video</a></span></p>
<h3><span style="font-weight: normal;">VII. High-Speed </span><strong>RIA Development</strong><span style="font-weight: normal;"> with the Microsoft Silverlight Toolkit</span></h3>
<p><span style="font-weight: normal;">Come learn how the Silverlight Toolkit can help jumpstart development of stunning Web experiences, and learn how to use the latest controls to create more immersive, more manageable user experiences. Using Microsoft Visual Studio and Microsoft Expression Blend, explore advanced debugging and unit testing techniques for building components that work across Silverlight and Windows Presentation Foundation (WPF).</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/T15f">Watch video</a></span></p>
<h3><span style="font-weight: normal;">VIII. Building </span><span style="font-weight: normal;">Accessible RIAs </span><span style="font-weight: normal;">in Microsoft Silverlight</span></h3>
<p><span style="font-weight: normal;">Learn how to maintain compliance with a growing number of accessibility standards (including 508 in the U.S., WCAG 2.0, and others) by using Silverlight to produce fully accessible RIAs that are policy compliant. See how to use the new User Interface Automation (UIA) technology included in Silverlight by walking through the design and development decisions made when building Buttercup, a Silverlight based DAISY talking book reader.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t65m">Watch video</a></span></p>
<h3><span style="font-weight: normal;">IX. What&#8217;s New in Microsoft Silverlight 3</span></h3>
<p><span style="font-weight: normal;">Take a tour of the new features in Silverlight 3 including a dive into some of the new experience oriented features like pixel shaders, perspective 3D, animation enhancements, bitmap APIs and improvements to the media stack. Also hear about new Silverlight base framework additions including updates to the style model, data binding improvements, improved resource handling and improvements to the web services stack. This session will also introduce the Silverlight 3 out of browser model.</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/T14F">Watch video</a></span></p>
<h3><span style="font-weight: normal;">X. Building Microsoft Silverlight Controls</span></h3>
<p><span style="font-weight: normal;">Learn how to encapsulate structure, animation, and logic inside custom controls that handle theming, layout, validation, and data binding. Using Microsoft Visual Studio and Microsoft Expression Blend, explore advanced design, coding, debugging, and testing techniques for building components that work interchangeably in Silverlight and Windows Presentation Foundation (WPF).</span></p>
<p><span style="font-weight: normal;"><a href="http://videos.visitmix.com/MIX09/t16f">Watch video</a></span></p>
<p><span style="font-weight: normal;">I hope you enjoy some of these webcasts <img src='http://bachelorthesis.zdechovan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://bachelorthesis.zdechovan.com/10-mix-09-webcasts-about-ria-silverlight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

