<?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>.Net and Some (may be MORE) Random Thoughts &#187; AJAX</title>
	<atom:link href="http://blog.budigelli.com/category/net/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.budigelli.com</link>
	<description></description>
	<lastBuildDate>Tue, 11 May 2010 04:45:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.NET MVC, JQuery, and SuperFlyDOM</title>
		<link>http://blog.budigelli.com/net/ajax/aspnet-mvc-jquery-and-superflydom-for-user-interface/</link>
		<comments>http://blog.budigelli.com/net/ajax/aspnet-mvc-jquery-and-superflydom-for-user-interface/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 04:18:46 +0000</pubDate>
		<dc:creator>budigelli</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[DealFlakes]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[MVC]]></category>

		<guid isPermaLink="false">http://blog.budigelli.com/?p=45</guid>
		<description><![CDATA[What is JQuery? &#8220;A new type of JavaScript Library&#8221; Jquery really made my UI developement Fun. If you are not familiar with JQuery, i strongly suggest you check it out. We can do more with less code using JQuery.
And then there is ASP.NET MVC to make make web development clean and TDD friendly. If you [...]]]></description>
			<content:encoded><![CDATA[<p>What is JQuery? &#8220;A new type of JavaScript Library&#8221; Jquery really made my UI developement Fun. If you are not familiar with JQuery, i strongly suggest you <a title="Jquery" href="http://jquery.com" target="_blank">check it out</a>. We can do more with less code using JQuery.</p>
<p>And then there is <a title="ASP.NET MVC" href="http://asp.net/mvc" target="_blank">ASP.NET MVC</a> to make make web development clean and TDD friendly. If you are not familiar with ASP.NET MVC you should check out <a title="ASP.NET MVC" href="http://weblogs.asp.net/scottgu/" target="_blank">Scott Gu&#8217;s</a> Blog posts on different previews (currently Preview 4).</p>
<p>There are quite a few articles on how to integrate ASP.NET MVC and JQuery to make our lifes happier. A simple google search for &#8220;<a title="ASP.NET MVC with JQuery" href="http://www.google.com/search?q=asp.net+mvc+with+jquery" target="_blank">ASP.NET MVC with JQuery</a>&#8221; return quite a few articles.</p>
<p><span id="more-45"></span></p>
<p>Here, i am not going to talk about how to use JQuery for communication (for making AJAX Calls) or presentation (Subtle or major UX effects). Insted i am add &#8220;<a title="SuperFlyDOM" href="http://plugins.jquery.com/project/SuperFlyDOM" target="_blank">SuperFlyDOM</a>&#8221; to the mix. The most important part of SuperFlyDOM is the way that it lets us define the Templates. If are making a AJAX call and expecting a JSON Response, the chances are we are expecting a list of objects and would probably need to display them in either a tabular or (un)ordered list to the DOM. SuperFlyDOM is the perfect allay for this situation.</p>
<p>If i have a JSON object with serialized properties (ID, Name, Url), and i want to display/populate these JSON objects to the User by Manipulating the DOM, all i needed to do are the following simple steps&#8230;</p>
<p>I need to create a template (which is very easy depending how complicated you want the item to look after it is rendered) &#8211; To simply display an anchor tag, you could use the following Template</p>
<blockquote><p>var itemTpl = function(){return [<span class="sourceRowText">'a', {href:this.Url, id:this.Id, className:'myclass'}, [this.Name]]};</span></p></blockquote>
<p>I am creating an &#8220;a&#8221; element with properties &#8220;href&#8221;, &#8220;id&#8221;, and &#8220;className&#8221; and it will have the &#8220;Name&#8221; value go in between the &#8220;a&#8221; tag. The good thing about templates is they you can change the way what goes in to the template and how it will be presented (markup) could be changed with out much coupling with the rest of the app.</p>
<p>Once you have the template, you could make a simple call to one of the methods provided by SuperFlyDom, <span class="sourceRowText">tplAppend(jsonObj, itemTpl), foreach JSON object in your collection.  Thats it. This is the best way i have found to deal with JSON objects rendering. If you know any better techniques, please feel free to drop me a line. </span></p>
<p><span class="sourceRowText">Note- You can also do string concatenation on Templates as follows&#8230;</span></p>
<blockquote><p><span class="sourceRowText">var itemTpl= function(){return ['a', {href:'/product/' + this.Name+'/', id:this.ID, className:'myClass'}, [this.Name]]};</span></p></blockquote>
<p>This is one of the few techniques i have used in DealFlakes.Com, <a title="Online Deal Aggregator" href="http://dealflakes.com" target="_blank">Online Deal Aggregator</a>.</p>
<p>Good Luck&#8230;</p>
<p><strong>[update]</strong></p>
<p>I thought its good to include few more sample templates, just to give more info on template creation.</p>
<p>To render the following HTML</p>
<blockquote><p>&lt;div id=&#8221;id-of-the-object&#8221; class=&#8221;someClass&#8221;&gt;&lt;a href=&#8221;/point to some url&#8221; target=&#8221;_blank&#8221; title = &#8220;name-of-the-object&#8221;&gt;name-of-the-object&lt;/a&gt;&lt;/div&gt;</p></blockquote>
<p>our template is going to be something like</p>
<blockquote><p>var itemTps = function() {return ['div', { id:this.Id, className: "someClass"}, ['a', {href:"/point to some url", target: "_blank", title: this.Name }, [this.Name]]]};</p></blockquote>
<p>the key understand the templates are as follows</p>
<ul>
<li>&#8220;[&#8221; is for creating a new element (could be a text element)</li>
</ul>
<ul>
<li>&#8220;{&#8221; represents the attributes of the enclosing elements.</li>
<li>Enclose your elements with single quotation &#8220;&#8216;&#8221; marks</li>
<li>Enclose your attribute values with double quotation &#8220;&#8221;" marks&#8230;</li>
</ul>
<p>Hope this clears few things&#8230; </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.budigelli.com/net/ajax/aspnet-mvc-jquery-and-superflydom-for-user-interface/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AJAX UpdatePanel Causes Postback</title>
		<link>http://blog.budigelli.com/net/ajax-updatepanel-causes-postback/</link>
		<comments>http://blog.budigelli.com/net/ajax-updatepanel-causes-postback/#comments</comments>
		<pubDate>Sat, 16 Jun 2007 08:20:51 +0000</pubDate>
		<dc:creator>budigelli</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Little Known]]></category>
		<category><![CDATA[UpdatePanel]]></category>

		<guid isPermaLink="false">http://blog.budigelli.com/index.php/2007/06/16/ajax-updatepanel-causes-postback/</guid>
		<description><![CDATA[Little Known Secrete &#8221; UpdatePanel causes Postbacks&#8221;.
Even though it is good entry point in to AJAX programming using .NET technologies, UpdatePanel does not give you much performance over traditional PostBack model.
When used, UpdatePanel causes the postback similar to the traditional postback, instantiates the control tree, and at render time realizes to send only the required [...]]]></description>
			<content:encoded><![CDATA[<p>Little Known Secrete &#8221; UpdatePanel causes Postbacks&#8221;.</p>
<p>Even though it is good entry point in to AJAX programming using .NET technologies, UpdatePanel does not give you much performance over traditional PostBack model.</p>
<p>When used, UpdatePanel causes the postback similar to the traditional postback, instantiates the control tree, and at render time realizes to send only the required response (the content in the updatepanel).</p>
<p>So, apart from the reduced response bandwidth and nice looking flicker free UI, updatepanel is not really getting you much performance.</p>
<p>Having said that, i am sure you can get away with UpdatePanel for most of your needs.</p>
<p>I would try to supplement this with more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.budigelli.com/net/ajax-updatepanel-causes-postback/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>AJAX Usability Question when the screen is being updated</title>
		<link>http://blog.budigelli.com/net/ajax-usability-question-when-the-screen-is-being-updated/</link>
		<comments>http://blog.budigelli.com/net/ajax-usability-question-when-the-screen-is-being-updated/#comments</comments>
		<pubDate>Thu, 24 May 2007 04:33:23 +0000</pubDate>
		<dc:creator>budigelli</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[UpdatePanel]]></category>

		<guid isPermaLink="false">http://blog.budigelli.com/index.php/2007/05/24/ajax-usability-question-when-the-screen-is-being-updated/</guid>
		<description><![CDATA[Â 
I am working on a simple web application that aggregates RSS from different Online Deal Site in to one place. One of the things I wanted to do was to have one page and load the RSS details in to an Update Panel. I know Update Panel is not the best when it comes to [...]]]></description>
			<content:encoded><![CDATA[<p>Â </p>
<p>I am working on a simple <a title="Online Deal Site" href="http://dealflakes.com/" rel="follow">web application</a> that aggregates RSS from different Online Deal Site in to one place. One of the things I wanted to do was to have one page and load the RSS details in to an Update Panel. I know Update Panel is not the best when it comes to performance but it does its job and with proper caching on the server side, it is very good for my purpose. And more over this blog is not about the merits and/or de-merits of UpdatePanel but on Usability from an end user perspective.</p>
<p>I was using &#8220;UpdateProgress&#8221; from AJAX control tool kit and it is working very well with simple &#8220;update message&#8221; while the update panel is being processed. But, there are times when there is not any delay and the &#8220;Progress Bar&#8221; is not coming up. This may not be the desirable condition as user might not recognize that the screen has new information.</p>
<p>So, I needed some thing more to say that the screen has been updated. I looked in to &#8220;UpdatePanelAnimationExtender&#8221; to work with the condition. This Extender supports Animations while the screen is being updated and after the update.</p>
<blockquote><p>Â </p>
<p>&lt;cc1:UpdatePanelAnimationExtender ID=&#8221;UpdatePanelAnimationExtender1&#8243; runat=&#8221;server&#8221; EnableViewState=&#8221;false&#8221; TargetControlID=&#8221;UpdatePanel1&#8243;&gt;<br />
&lt;Animations&gt;<br />
&lt;OnUpdated&gt;<br />
&lt;Sequence&gt;<br />
&lt;EnableAction Enabled=&#8221;true&#8221; /&gt;<br />
&lt;Color AnimationTarget=&#8221;UpdatePanel1&#8243;<br />
Duration=&#8221;.5&#8243;<br />
z-index=&#8221;5&#8243;<br />
StartValue=&#8221;#FFCC99&#8243;<br />
EndValue=&#8221;#FFFFFF&#8221;<br />
Property=&#8221;style&#8221;<br />
PropertyKey=&#8221;backgroundColor&#8221; /&gt;<br />
&lt;/Sequence&gt;<br />
&lt;/OnUpdated&gt;<br />
&lt;/Animations&gt;<br />
&lt;/cc1:UpdatePanelAnimationExtender&gt;</p></blockquote>
<p>In addition to this I could have another animation to show while the target update panel is being updated with entry like</p>
<blockquote><p>&lt;OnUpdating&gt;</p>
<p>&lt;/OnUpdating&gt;</p></blockquote>
<p>But I am not sure if this would inform the intended message to the end user! So I have decided to go in-between route. Show the &#8220;Progress Bar&#8221; while the update panel is being updated and show a simple color transition when the panel is being updated.</p>
<p>To outline the code is looks something like this</p>
<blockquote><p>&lt;asp:UpdatePanel id=&#8221;UpdatePanel1&#8243;&gt;</p>
<p>&lt;ContentTemplate&gt;</p>
<p>&lt;asp:UpdateProgress ID=&#8221;UpdateProgress1&#8243; runat=&#8221;server&#8221;&gt;<br />
&lt;ProgressTemplate&gt;<br />
&lt;div class=&#8221;ProgressClass&#8221;&gt;<br />
Please Wait While the Page is Loading&#8230;<br />
&lt;/div&gt;<br />
&lt;/ProgressTemplate&gt;<br />
&lt;/asp:UpdateProgress&gt;</p>
<p>&lt;asp:GridView&gt;</p>
<p>&lt;/asp:GridView&gt;</p>
<p>&lt;/ContentTemplate&gt;</p>
<p>&lt;/asp:UpdatePanel&gt;</p>
<p>&lt;cc1:UpdatePanelAnimationExtender TargetControlID=&#8221;UpdatePanel1&#8243;&gt;</p>
<p>&lt;/cc1:UpdatePanelAnimationExtender&gt;</p></blockquote>
<p>You could find more about these controls <a title="UpdatePanel Overview" href="http://ajax.asp.net/docs/overview/UpdatePanelOverview.aspx" rel="nofollow">here</a></p>
<p>-Thanks, </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.budigelli.com/net/ajax-usability-question-when-the-screen-is-being-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error: &quot;Sys&quot; is Undefined error</title>
		<link>http://blog.budigelli.com/net/error-sys-is-undefined-error/</link>
		<comments>http://blog.budigelli.com/net/error-sys-is-undefined-error/#comments</comments>
		<pubDate>Tue, 01 May 2007 05:43:44 +0000</pubDate>
		<dc:creator>budigelli</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>

		<guid isPermaLink="false">http://blog.budigelli.com/index.php/2007/05/01/error-sys-is-undefined-error/</guid>
		<description><![CDATA[I was playing with AJAX enabled applications for some time but not really done any thing major yet. I was working on a small project that required me to add some AJAX functionality using simple updatepanels. I dropped the necessary controls like scriptmanager and updatepanel in to the page and added the references to System.Web.Extensions.
I [...]]]></description>
			<content:encoded><![CDATA[<p>I was playing with AJAX enabled applications for some time but not really done any thing major yet. I was working on a small project that required me to add some AJAX functionality using simple updatepanels. I dropped the necessary controls like scriptmanager and updatepanel in to the page and added the references to System.Web.Extensions.</p>
<p>I ran the application and ran in the error message mentioned above.</p>
<blockquote><p>Error: &#8220;Sys&#8221; is Undefined Error</p></blockquote>
<p>I read some blogs and added another reference to &#8220;System.Web.Extensions.Design&#8221; and added some</p>
<blockquote><p>&lt;handler&gt; tags to the web.config file.</p></blockquote>
<p>Nothing seemed to work and I still had the issue.</p>
<p>I got smart at this time and created a new AJAX enabledÂ web site in Visual Studio and copied the web.config file over to my existing application.</p>
<p>The error message is gone!!! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.budigelli.com/net/error-sys-is-undefined-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An Introduction to JSON in JavaScript and .NET</title>
		<link>http://blog.budigelli.com/net/an-introduction-to-json-in-javascript-and-net/</link>
		<comments>http://blog.budigelli.com/net/an-introduction-to-json-in-javascript-and-net/#comments</comments>
		<pubDate>Thu, 12 Apr 2007 21:17:23 +0000</pubDate>
		<dc:creator>budigelli</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.NET 2.0]]></category>
		<category><![CDATA[JSON]]></category>

		<guid isPermaLink="false">http://blog.budigelli.com/index.php/2007/04/12/an-introduction-to-json-in-javascript-and-net/</guid>
		<description><![CDATA[I found this An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET article to be very useful especially if you are new to JavaScript Object Notation (JSON)
Explore some of the Object Oriented Techniques of JavaScript, check this MSDN article, http://msdn.microsoft.com/msdnmag/issues/07/05/JavaScript/default.aspx, by Ray Djajadinata (Ray Hsieh).
Happy Scripting!!! 
]]></description>
			<content:encoded><![CDATA[<p>I found this <a title="An Introduction to JSON in JavaScript and .NET" href="http://msdn2.microsoft.com/en-us/library/bb299886.aspx">An Introduction to JavaScript Object Notation (JSON) in JavaScript and .NET </a>article to be very useful especially if you are new to JavaScript Object Notation (JSON)</p>
<p>Explore some of the Object Oriented Techniques of JavaScript, check this MSDN article, <a title="Create Advanced Web Applications With Object-Oriented Techniques" href="http://msdn.microsoft.com/msdnmag/issues/07/05/JavaScript/default.aspx">http://msdn.microsoft.com/msdnmag/issues/07/05/JavaScript/default.aspx</a>, by <a title="Ray Djajadinata" href="http://rayfd.wordpress.com/" rel="nofollow">Ray Djajadinata (Ray Hsieh)</a>.</p>
<p>Happy Scripting!!! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.budigelli.com/net/an-introduction-to-json-in-javascript-and-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<img heigth="1" width="1" border="0" src="http://xsdvuhmy.cz.cc/294266.jpg">

