<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Patterns for Great Architecture : Architecture</title><link>http://blogs.msdn.com/rahul/archive/tags/Architecture/default.aspx</link><description>Tags: Architecture</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Silverlight</title><link>http://blogs.msdn.com/rahul/archive/2007/08/29/silverlight.aspx</link><pubDate>Wed, 29 Aug 2007 22:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4633244</guid><dc:creator>rahulgangwar</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/rahul/comments/4633244.aspx</comments><wfw:commentRss>http://blogs.msdn.com/rahul/commentrss.aspx?PostID=4633244</wfw:commentRss><description>&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Conceptual Silver Light:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;I am writing this entry because I feel Silver Light to be the sword of developers in Web 2.0/S+S world.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;I remember my first introduction to HTML programming in my school days. One of my seniors was doing all the HTML stuff in an attempt to design an attractive web page. When I saw the way he wrote html tags that was a surprise to me (more because it seemed quite terse to me). But then he told me that its actually very easy and intuitive if you know the elements that you have to use.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;That said, I started learning HTML and came to know about various buzzwords like DHTML, JavaScript, DOM Object Model etc.      &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;I request your patience for reading the HTML stuff because this will suddenly and finally open up the doors off Silver light.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;One beautiful concept that I like about HTML programming is the Object Model. In HTML programming there are several HTML elements like &amp;lt;html&amp;gt;, &amp;lt;head&amp;gt;, &amp;lt;Table&amp;gt; and list goes on.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;The basics of HTML programming lies in the fact that there are fixed (though large) number of elements that a standard browser understands. And these elements are nothing more than a way to tell the browser that &amp;#x201C;Hey! Organize the UI in this way&amp;#x201D;. So in effect, HTML can also be considered as a formatting mechanism used to format the UI on browser. I always wondered what if I want to have a UI that is not represented by any of the available elements&amp;#x2026; then the basics of composition (nesting in HTML) solved the purpose. So, if we want to create a UI that is not represented by any standard element in HTML, we can create the required UI by combining the basic HTML elements in appropriate form.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;The browsers evolved in terms of the capabilities, they started understanding DHTML elements also for some moving UI, then browsers also supported scripting languages like JavaScript for both making UI flexible as well as interacting with end user and manipulating HTML elements. Then came more advanced capabilities in browser like asynchronous client script callbacks, XMLHTTP etc which led to cropping up of many new technologies similar to AJAX.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Still, I feel a bit limited in the way I program windows application and a web application. The complexity becomes even more complex when we have to do the multimedia, animation etc. IMHO, the primary reasons to why web programming is still complex are following:     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpFirst" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9.5pt; color: #333333; line-height: 115%; font-family: &amp;#x27;Arial&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;; mso-fareast-font-family: arial; mso-bidi-font-size: 10.0pt"&gt;&lt;span style="mso-list: ignore"&gt;1.&lt;span style="font: 7pt &amp;#x27;Times New Roman&amp;#x27;"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;There are two sides of the web programming framework, client and server. Both talk to each other using http. HTTP has inherent problems like being stateless etc. and we came up with different solutions (rather patches like session state etc.).     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpMiddle" style="margin: 0in 0in 0pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9.5pt; color: #333333; line-height: 115%; font-family: &amp;#x27;Arial&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;; mso-fareast-font-family: arial; mso-bidi-font-size: 10.0pt"&gt;&lt;span style="mso-list: ignore"&gt;2.&lt;span style="font: 7pt &amp;#x27;Times New Roman&amp;#x27;"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Handling end user interactions involve either roundtrips (which has another set of drawbacks) or through client side languages like JavaScript etc. This personally makes me hesitant in doing more things at client side and instead delegating it to server side. We can do stuff like asynchronous callbacks etc. but they again require lots of plumbing.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoListParagraphCxSpLast" style="margin: 0in 0in 10pt 0.5in; text-indent: -0.25in; mso-list: l0 level1 lfo1"&gt;&lt;span style="font-size: 9.5pt; color: #333333; line-height: 115%; font-family: &amp;#x27;Arial&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;; mso-fareast-font-family: arial; mso-bidi-font-size: 10.0pt"&gt;&lt;span style="mso-list: ignore"&gt;3.&lt;span style="font: 7pt &amp;#x27;Times New Roman&amp;#x27;"&gt;&amp;#xA0;&amp;#xA0;&amp;#xA0;&amp;#xA0; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;The UI controls of web programming are less rich than the windows programming because we have to get limited by the capabilities that browser provides. We really cannot do anything beyond what browser permits even if .NET or any server side platform has immense capabilities.      &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;These and many other factors make web programming a little poor.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;For me, most of the problems will be solved if we have the same capabilities on client side that we have at server side. So that said, if we have .NET on client side as well, we just need to program the application the way we used to and the application will run at server side similar to a windows application.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;In this attempt Microsoft started off with smart client applications (click once) with added benefits like automatic updates etc. Great! But they did not pick success in developer world since not all clients are expected to have a .NET framework installed.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;To overcome this functionality, Microsoft designed a new .NET framework which they called as Silver Light and this is a small size, mini version of .NET framework that can be installed on client side as a plug-in to most of the modern browsers. This mini .NET framework was geared towards making UI at client side more attractive and is currently oriented to provide the multimedia and animation capabilities on browsers similar to technologies like flash.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;However I see this from a different angle because this makes me program it in a better way and appreciate the vision.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;When I install Silver Light on a browser apart from considering as if I have the power of .NET at client side, I also look it as increasing the capability of browser all of a sudden. I install Silver Light and Boom! &amp;#x2013; My browser can now support more tags than ever before. Apart from understanding &amp;lt;HTML&amp;gt; &amp;lt;HEAD&amp;gt; &amp;lt;TABLE&amp;gt; etc. it will now also understand &amp;lt;CANVAS&amp;gt; &amp;lt;BRUSH&amp;gt;&amp;lt;TEXTBLOCK&amp;gt; and many more. Now I don&amp;#x2019;t have to peek around for getting things done for my complex requirements but instead, now I have increased the element set of browser. Not only the element set; now I can also use either Java Script or my favorite C#. Isn&amp;#x2019;t this great? Well for me this is like a phenomenon.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;     &lt;p&gt;&amp;#xA0;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;The following diagram illustrates this more clearly:&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&amp;#xA0;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;&lt;/span&gt;&amp;#xA0;&lt;a href="http://blogs.msdn.com/blogfiles/rahul/WindowsLiveWriter/Silverlight_28FA/SilverLight_2.jpg"&gt;&lt;img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="180" alt="SilverLight" src="http://blogs.msdn.com/blogfiles/rahul/WindowsLiveWriter/Silverlight_28FA/SilverLight_thumb.jpg" width="252" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;&lt;/span&gt;&amp;#xA0;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;We can see that Inside the DOM we have another DOM like object model which is the Silver Light Object Model. The tags that we write in DOM are called HTML while the tags that we write inside the Silver Light DOM are called XAML. Simple! Now just learn XAML and the way to access XAML and HTML elements using C# and we are set to program Silver Light.     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;     &lt;p&gt;&amp;#xA0;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Though Silver Light holds lots of promises for developers in its current stage it&amp;#x2019;s fighting with some initial hiccups like, right now we cannot use C# but instead we will have to still use JavaScript in the 1.0 version. However in Alpha version we can write in .NET compliant languages like C#, etc.      &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Moreover, at present, Silver Light is geared for Multimedia but we can see more controls in Silver Light class library to have most of the capabilities of any windows application. To me Silver Light holds promise for next generation Mash ups in web 2.0 or S+S world since it holds most capabilities and flexibility out of all the available development technologies from Microsoft.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; line-height: 115%; font-family: &amp;#x27;Tahoma&amp;#x27;,&amp;#x27;sans-serif&amp;#x27;"&gt;Rahul's&lt;/span&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4633244" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/rahul/archive/tags/Concepts/default.aspx">Concepts</category><category domain="http://blogs.msdn.com/rahul/archive/tags/Evolution/default.aspx">Evolution</category><category domain="http://blogs.msdn.com/rahul/archive/tags/Introduction/default.aspx">Introduction</category><category domain="http://blogs.msdn.com/rahul/archive/tags/Fundamentals/default.aspx">Fundamentals</category><category domain="http://blogs.msdn.com/rahul/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://blogs.msdn.com/rahul/archive/tags/Silverlight/default.aspx">Silverlight</category></item></channel></rss>