<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Daveloper</title><subtitle type="html" /><id>http://weblogs.asp.net/daveloper/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/daveloper/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/daveloper/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2008-04-01T21:35:00Z</updated><entry><title>Silverlight Security Concepts</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/daveloper/archive/2008/04/01/silverlight-security-concepts.aspx" /><id>http://weblogs.asp.net/daveloper/archive/2008/04/01/silverlight-security-concepts.aspx</id><published>2008-04-01T19:35:00Z</published><updated>2008-04-01T19:35:00Z</updated><content type="html">&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I’m cutting into this topic to remind myself that even though Silverlight is the greatest thing since sliced bread, there are a few things that we have to keep&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;in mind when developing a &lt;S&gt;flashy&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/S&gt;shiny Silverlight application.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;First of all.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Your silverlight code is visible to the end user.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;A brief walkthrough of how a user might acquire the silverlight code that you’ve written for your Silverlight application.&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;User goes to your site&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Whips out its favorite DOM explorer or just simply the ‘view source’&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Find the object element inside your page thats hosting your silverlight application&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Find the “src” attribute which contains a link to the “Clientbin/ShinyApp.xap”&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Downloads the application, unzips the xap (it technically is just a zip file)&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;And finally the user gets out Reflector and starts poking around your code.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This is my opinion is great, no longer do I have to spend countless hours tweaking and hacking away to get that awesome animation working, when I can simply look at the source code itself and learn by coding.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Mike Harsh , PM&amp;nbsp;in the&amp;nbsp;Silverlight team&amp;nbsp;mentioned in the initial video on Channel9 that the first release of Silverlight will use textual&lt;SPAN style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/SPAN&gt;(as opposite to compiled binary) xaml to enable all developers to share their source, and are looking for input from customers if they prefer perhaps a compiled version of their xaml.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Good news is, if you haven’t noticed that most of the current Silverlight 1.0 application use the inline or referenced xaml pages for their content, which in my opinion (and Mikes) enables a more fluent adoption of Silverlight.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;All is well.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;However, their might be some developers that are transitioning from ASP.NET to silverlight or are looking at the possibility of integration.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Howver, with the ASP.NET model comes the complete seperation that all managed code and (most of the) UI logic is run on the server and spit backout to the client as easy and (usually) safe Javascript.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;With Silverlight however, this distinction is not present.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;You could write an entire application as a Silverlight application, and mentally translate all your database calls to WCF calls which inturn does your basic database CRUD.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;This however would not be a big deal, since the calls to your WCF services are being protected by the cross domain policy file which restricts (or enables) cross domain calling of your WCF services.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;The user can see you’re code calling the webservices, but the potential abuser cannot call your webservices as it cannot impersonate your Silverlight application even though he might even physically have your application.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;Ofcourse, you can still write code which might undermine your application (or more importantly the users) security, but using the cross domain policy and encapsulating you’re database calls inside your WCF calls is great way to minimise the potential of your data becoming compromised.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;A few more weeks of Silverlight and I think I might have to join &lt;A class="" title=these href="http://onten.org/blogs/tina/Silverlight-Rehab/" mce_href="http://onten.org/blogs/tina/Silverlight-Rehab/"&gt;these&lt;/A&gt; guys...&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0cm 0cm 10pt"&gt;&lt;FONT face=Calibri size=3&gt;I also recommend &lt;A class="" title=this href="http://sessions.visitmix.com/?selectedSearch=T13" target=_blank mce_href="http://sessions.visitmix.com/?selectedSearch=T13"&gt;this&lt;/A&gt; talk over at the Mix08 sessions called "Working with Data and Web Services in Microsoft Silverlight 2"&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6057520" width="1" height="1"&gt;</content><author><name>daveloper</name><uri>http://weblogs.asp.net/members/daveloper.aspx</uri></author></entry></feed>