<?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>Gateway Technolabs Blog</title>
	<atom:link href="http://www.gatewaytechnolabs.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gatewaytechnolabs.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 10 Apr 2012 05:40:39 +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>Know more about Facebook Timeline and Your Tabs</title>
		<link>http://www.gatewaytechnolabs.com/blog/2012/04/know-more-about-facebook-timeline-and-your-tabs/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2012/04/know-more-about-facebook-timeline-and-your-tabs/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 05:39:54 +0000</pubDate>
		<dc:creator>nikul.patel</dc:creator>
				<category><![CDATA[Search Engine & Online Digital Marketing]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=566</guid>
		<description><![CDATA[
			
				
			
		
Here&#8217;s what you need to know about Timeline and your tabs: Your tabs on Static HTML will remain unaffected by the changes, and the new timeline dimensions are now available on all versions of this app.
Landing Tabs
Landing tabs are still alive and well, you can still direct people to tabs created with Static HTML via [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F04%2Fknow-more-about-facebook-timeline-and-your-tabs%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F04%2Fknow-more-about-facebook-timeline-and-your-tabs%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Here&#8217;s what you need to know about Timeline and your tabs: Your tabs on Static HTML will remain unaffected by the changes, and the new timeline dimensions are now available on all versions of this app.</p>
<p><strong>Landing Tabs</strong></p>
<p>Landing tabs are still alive and well, you can still direct people to tabs created with Static HTML via links that you control, such as Facebook ads (there&#8217;s an option for destination tab). But unless the user follows a direct link to your tab, they will land on your Timeline.</p>
<p><strong>Landing Tab Substitutes</strong></p>
<p>Put your landing tab as the first tab after the photos (scroll over the tab icon in your admin panel, and select the second most tabs after Photos to &#8220;Swap position with&#8221;. (Photos is Facebook&#8217;s default first tab, currently you can’t change it). &#8211; Pin your call to action and include a link to your actual landing tab. To pin a status, (1) post your status, then (2) scroll over the status and in the upper right click &#8220;Pin to Top.&#8221;</p>
<p><strong>Dimensions</strong></p>
<p>All Static HTML tabs can now be 810 pixels wide when used on a Timeline page. To adapt a 520 pixel tab, all you need to is convert your page to timeline, then go to your tab and re-save it.</p>
<p>Like gating</p>
<p>Like gating still exists within tabs, but currently Facebook doesn&#8217;t refresh the tab after someone likes it. It is unclear whether this is a bug or a new policy &#8212; we&#8217;re keeping an eye on it. If it isn&#8217;t a bug, we will build a workaround that will be available by default within Static HTML.</p>
<p><strong>Custom Icon</strong></p>
<p>On Timeline pages you can now also select a bigger custom icon for tabs (111&#215;74 pixels) through Facebook itself. To do this, go to your page &gt; Edit Info &gt; Apps &gt; Edit Settings &gt; Change Icon (here you&#8217;ll upload an image) &#8211; We&#8217;re researching ways to change the icon directly in the app, to provide simpler organization of all pages you admin.</p>
<p>For more information on all of these things, see this article: <a href="http://mashable.com/2012/02/29/facebook-brand-timelines-changes-marketing/">http://mashable.com/2012/02/29/facebook-brand-timelines-changes-marketing/</a></p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2012/04/know-more-about-facebook-timeline-and-your-tabs/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2012/04/know-more-about-facebook-timeline-and-your-tabs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Facebook Timeline for company’ pages</title>
		<link>http://www.gatewaytechnolabs.com/blog/2012/03/new-facebook-timeline-for-company-pages/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2012/03/new-facebook-timeline-for-company-pages/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 09:41:30 +0000</pubDate>
		<dc:creator>Team Gateway</dc:creator>
				<category><![CDATA[Search Engine & Online Digital Marketing]]></category>
		<category><![CDATA[Facebook Fan Page]]></category>
		<category><![CDATA[Facebook Marketing]]></category>
		<category><![CDATA[Facebook New Timeline Theme]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=560</guid>
		<description><![CDATA[
			
				
			
		
How to adjust new timeline for your business and benefit from it?
It’s a fact that from every 7 minutes spent online 4 minutes are spent on social sites from which 3 minutes are spent on Facebook. Based on these figures it’s abundant to state why having a good Fan page is relevant for any company. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F03%2Fnew-facebook-timeline-for-company-pages%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F03%2Fnew-facebook-timeline-for-company-pages%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>How to adjust new timeline for your business and benefit from it?</strong></p>
<p>It’s a fact that from every 7 minutes spent online 4 minutes are spent on social sites from which 3 minutes are spent on Facebook. Based on these figures it’s abundant to state why having a good Fan page is relevant for any company. As a marketer, by now you’ve probably been spending hours and hours learning FBML and creating a perfect welcome page to make your Fan page worthwhile for your visitors. And just when you were starting to get the hang of it, Facebook is changing is changing the entire concept of company pages.</p>
<p>During the F8 Developers conference in San Francisco in September 2011 CEO Mark Zuckerberg introduced the features of the new Facebook Timeline.</p>
<p><a href="http://www.youtube.com/watch?v=q877VK_Auzc&amp;feature=related"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="394" height="371" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.youtube.com/v/q877VK_Auzc&amp;feature" /><embed type="application/x-shockwave-flash" width="394" height="371" src="http://www.youtube.com/v/q877VK_Auzc&amp;feature"></embed></object></a></p>
<p>The new timeline is a completely different approach of how Facebook works for companies. So can this new timeline offer any benefits to your company or is it just the same thing all over again?</p>
<p>First of all, the new timeline allows much more creativity for your company page in terms of design possibilities. For example photos and applications are displayed with bigger sizes and in a higher resolution. Secondly, the navigation system has been changed.  The year’s timeline allows you to see the entire history of company activities, since it has launched a Facebook page till nowadays. So, from now on a visitor will be able to easily access any past activity or post of a company on Facebook by only a few clicks. Facebook says it’s about telling the whole story of your company/product or service in a single page. In this case Facebook has done all the work for you, showing your customers how much you’ve invested in your Facebook page already and providing an archive of accessible content to your fans.  Keep in mind that if there’s any old forgotten content which you don’t want your customers to see anymore, it’s time to locate and remove it.</p>
<p>The new timeline is available to both private profiles as company pages with only slightly different features.</p>
<p>Therefore, it’s good to be prepared and be aware of exactly what to expect from the new Facebook timeline. Let’s have a look at the new features and more importantly how those features can be applied best for your business.</p>
<p><strong>1. No default page</strong></p>
<p>Before timeline you could have new visitors of your Facebook page land on your customized Welcome page. According to the new Facebook timeline any visitor &#8211; fan or non-fan &#8211; lands on a single page of the timeline.  Therefore it’s crucial to create an interesting and attractive design of your main banner to encourage visitors to become a fan right away and scroll down to see recent posts and activities of your company.</p>
<p><strong>2. The timeline arrangement</strong></p>
<p>This is the life of your company per year. There is a link on the right side which provides visitors opportunity to access any posts of your company from the year a page was started up to nowadays. You can easily highlight the most important events in the timeline of your company by selecting the star on the top on the post. These events will be adjusted to the whole width of the Facebook screen.</p>
<p>The new Facebook timeline enables you to tell stories about your company/product or service by sharing and highlighting your most valuable events, photos, videos or posts. Users can filter based on four different activities from the timeline wall: highlights, friends’ activity, post by page and post by others. On the right side of the timeline they can see which of their friends already like your page, what other visitors are posting/talking, total likes of your page and recommendations for the page on Facebook. On the left side of the timeline you can see your page’s activities with multimedia, links, photos, etc.</p>
<p>The detailed visualization of new timeline arrangement is shown in this image.</p>
<p><strong>3. Main banner together with profile      picture</strong></p>
<p>As mentioned before a good banner is the key element of your page. From now on, the banner is your welcome page. Make sure the feelings and emotions you want to communicate to your fans on social media are visible. In some cases it’s a good idea to create a collage of different images which represent your company/product/service the best. See an example of the Nike+ Facebook banner (<a href="http://www.facebook.com/#!/nike">http://www.facebook.com/#!/nike</a>). For the consultancy/services industry it can be a good idea to place the image of your team to the banner.  Don’t forget to place your logo and maybe some pay off or short phrase which can trigger a visitor to like the page.</p>
<p>Please be aware that it’s not allowed to put any promotions or call-to-actions on the banner so the commercial element cannot be implemented that obviously. However it can be created on other customized Facebook applications.</p>
<p>A good example of an attractive and positive banner is implemented by Coca-Cola which you can see here: <a href="http://www.facebook.com/#!/cocacola?__adt=4">www.facebook.com/#!/cocacola?__adt=4</a></p>
<p><a href="http://www.facebook.com/#!/cocacola?__adt=4"></a><strong>4. About company &amp; customized Facebook      applications</strong></p>
<p>After the main banner comes a short overview: the ‘about the company’- section. In case you want to generate more traffic to your website or other sites it’s wise to insert links to these pages in this section. If you have a physical shop for instance you could mention working hours, address, telephone any other practical info. Additionally when people click on the ‘About company’ section they will be forwarded to the detailed information page where you can place all the additional information about your company/product or service, including geolocation with Bing maps.</p>
<p>Next the ‘About a company’ section allows you to show links to four customized subpages. These four main links are going to be an important part of your Facebook strategy. The photo application always remains on the 1st place of the line, however the other three pages are free to customize.  Your Twitter account, videos, apps, reviews of your products or anything interesting what you want to tell to your fans can be displayed there. The customized pages will be opened inside Facebook on the page. Usually you can develop pages yourself by using HTLM code or just use the free Iframe application which is always available from the Facebook search. Another great advantage is that the maximum page width is increased to 850 px.</p>
<p><strong>5. </strong><strong>New admin panel</strong></p>
<p>If you are an admin and want to know how your page performs and what’s new you can easily observe all notifications, new fans, messages and page tips from the new administration dashboard all-in-one.  Moreover the dashboard allows you to measure the reach of your page by analyzing the insights. Also you can attract an audience by creating an advertising campaign.</p>
<p><strong>6. </strong><strong>Future trends and recommendations</strong></p>
<p>So can the new timeline offer any benefits to your companies Facebook strategy? The Facebook timeline has the potential to be a huge treasure to organizations’ online presences. Before there wasn’t much motivation for fans to click around on a company’s Facebook page, aside from special offers or maybe a popular viral ad. Now, thanks to the new timeline, brands have a chance to provide a special surfing experience as never before.  How much Facebook is facilitating the appearance of your page though, the content is still up to you.</p>
<p>An attractive Facebook page alone doesn’t bring you the ROI. The future trend for Facebook will be an integration of f-commerce/e-store into your Facebook page. Some companies have already started to integrate webshops and e-commerce elements into Facebook. A good example of a webshop implemented in the new Facebook timeline was made by this company selling cool t-shirts: Threadless <a href="http://www.facebook.com/#!/threadless">www.facebook.com/#!/threadless</a></p>
<p>I will tell more on how to establish e-commerce on Facebook in my future blog posts.</p>
<p>For now it’s time to make your Fan page ready for the new timeline. From the 30th of March 2012 the new timeline page will be automatically generated from your old company fan pages. Good luck.</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2012/03/new-facebook-timeline-for-company-pages/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2012/03/new-facebook-timeline-for-company-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customize your Facebook fan page to promote your business or product on Facebook</title>
		<link>http://www.gatewaytechnolabs.com/blog/2012/02/customize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2012/02/customize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook/#comments</comments>
		<pubDate>Sat, 25 Feb 2012 05:31:24 +0000</pubDate>
		<dc:creator>nikul.patel</dc:creator>
				<category><![CDATA[Search Engine & Online Digital Marketing]]></category>
		<category><![CDATA[Facebook Advertising]]></category>
		<category><![CDATA[Facebook Fan Page]]></category>
		<category><![CDATA[Facebook Fan Page Customize]]></category>
		<category><![CDATA[Facebook Marketing]]></category>
		<category><![CDATA[Online Digital Marketing]]></category>
		<category><![CDATA[Search Engine]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=554</guid>
		<description><![CDATA[
			
				
			
		
What’s new in Facebook? You can simply post all sorts of content, photograph or video, but the actual layout and design of your fan pages is the same as everyone using. But you can customize your Facebook Fan Page with new professional look and feel to promote your business on Facebook.
Why Facebook Fan Page?
Facebook is [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F02%2Fcustomize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2012%2F02%2Fcustomize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><em>What’s new in Facebook? You can simply post all sorts of content, photograph or video, but the actual layout and design of your fan pages is the same as everyone using. But you can customize your Facebook Fan Page with new professional look and feel to promote your business on Facebook.</em></p>
<p>Why Facebook Fan Page?<br />
Facebook is the most popular branding platform with over 750 million users on social media platform. Facebook changed the face of online marketing media where people can connect with friends &amp; followers. Facebook gets hug success due to his most popular services, are they <strong>Facebook Game, Facebook Application and Facebook Site</strong>. (Fan Page)</p>
<p>Facebook fan page become the second generation home page for online branding and marketing to improve your business ROI, where you can easily customize your brand or services over Facebook and start broadcasting on social media channel.</p>
<p>Facebook Fan Page is very useful to promote business, services, new products, deals, and gift coupon or company welcome page with attractive branded flash animation, Photo &amp; Video Galleries. Custom Facebook Fan Page is the easiest way to promote your business or services outside of your website to increase your potential customer and brand promotion.</p>
<p>Customize Facebook Fan Page gets advantages to increase more participants on your survey, polls and opinion or Quiz with attractive fan page design. You can integrate real time or third party application on your fan page to make it more interactive with friend and followers.</p>
<p>To increase product sell your can custom Facebook Fan Page e-Commerce Store, from where friends or followers can easily look at your product and buy.</p>
<p><strong>Why Facebook Fan Page?</strong></p>
<li>You can customize Facebook Fan Page Designing with Creative Graphics &amp; Flash</li>
<li>HTML/CSS with JQuery Slider or Menu also integrate</li>
<li>CMS base Facebook Fan Page</li>
<li>eCommerce base Facebook Fan Page</li>
<li>Flash Animation Support (Banner or Image)</li>
<li>Embedded Photos &amp; Videos with respective Galleries</li>
<li>Application or Survey or Quiz or Poll Integration*</li>
<li>Third Party API or Application Integration*</li>
<li>AddThis – Bookmarking &amp; Sharing</li>
<li>Contact Us or Inquiry Form Integration with Backend Dashboard*</li>
<li>Analytic &#8211; Tracking Code Implementation</li>
<li>Customize your FB Fan Page URL &#8211; (www.Facebook.com/YourCompanyName)</li>
<li>Integration of other Social Media Platforms like Twitter, IN, YouTube, Flickr</li>
<li>Integration of Paid &amp; Free FB Applications like: Coupons, RSS Feed, Twitter, Promotion Gallery, Poll &amp; Survey, Badges, Gifts, Social Quiz, Store Location, Music Player, Leader board, Rating &amp; Reviews</li>
<li>Integration of Google Translator &amp; Analytic</li>
<li>Integration of Account with Twitter to check the Twitter status</li>
<li>Integration of Slide Share Account with Facebook so that Client/Visitor can view presentations</li>
<li>Google Map integration in Facebook Fan Page</li>
<li>Integration of Facebook Ecommerce Application (Payment E-Commerce Storefront)</li>
<li>Facebook Likes Button, Recent Activity, Recommendations</li>
<li>Real Time Application (Set, Edit, Delete)</li>
<p><strong>Other Facebook Services Offering</strong></p>
<li>Facebook Advertising</li>
<li>Facebook Application Development</li>
<li>Facebook Game Development</li>
<li>Facebook API Integration</li>
<p>For more detail: http://www.gatewaytechnolabs.com/customfacebookfanpage.html</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2012/02/customize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2012/02/customize-your-facebook-fan-page-to-promote-your-business-or-product-on-facebook/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Things To Consider While Using SQL Server Reporting (SSRS)  With Silverlight (3 and 4)</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/08/things-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/08/things-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 05:45:32 +0000</pubDate>
		<dc:creator>Nishith Desai</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=433</guid>
		<description><![CDATA[
			
				
			
		
Reporting is the heart of most business applications. And SQL Server Reporting Service (SSRS) is a preferred choice while MSSQL Server is the database back-end. Apart from ready to use services, SSRS provides different and useful scalability and extensibility options.
On the other end, lately, MS Silverlight has generated positive heat amongst varied business applications.
So you [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F08%2Fthings-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F08%2Fthings-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Reporting is the heart of most business applications. And SQL Server Reporting Service (SSRS) is a preferred choice while MSSQL Server is the database back-end. Apart from ready to use services, SSRS provides different and useful scalability and extensibility options.</p>
<p>On the other end, lately, MS Silverlight has generated positive heat amongst varied business applications.</p>
<p>So you got the point. I’m talking about the marriage between <a href="http://en.wikipedia.org/wiki/SQL_Server_Reporting_Services" target="_blank">SSRS</a> and <a href="http://silverlight.net/" target="_blank">Sliverlight</a>.</p>
<p>It started with challenges as the whole concept was an unknown devil which we were able to tame in the end.</p>
<p>The problem was simple &#8211; Microsoft doesn’t have any SSRS report-viewers for Silverlight &#8211; but its impact was not so. Initially, it was apparent that we cannot use SSRS with Silverlight.</p>
<p>So, I Googled (and then Bingged also &#8211; both the technologies are from Microsoft <img src='http://www.gatewaytechnolabs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) to find out the following two possibilities out of my one hour of investment:</p>
<ol>
<li>Use Third Party Report Viewer Controls</li>
<li>Use ASP.NET application and invoke it from Silverlight application</li>
</ol>
<p>Each option has its own distinctions. Here are those:</p>
<ol>
<li><strong>Third Party controls: </strong>We can use third party report viewers which support SSRS reports. Right now there is only one such software provider <a href="http://www.perpetuumsoft.com/Silverlight-Viewer-for-Reporting-Services.aspx">Perpetuum Software</a> is available. They provide SSRS report viewer for Silverlight which is also Silverlight 4 ready. There are other report viewers provided by other major component providers like Telerik however they do not support SSRS reports at present. Instead, they support their own reporting ways from within Silverlight application.</li>
<li><strong>ASP.NET Application: </strong>In this approach, we have to create an ASP.NET web application for hosting SSRS reports. The web application will use default report viewer control. To integrate this web application into the Silverlight application there are two possible options as below:
<ol>
<li><em>Using Html Viewer: </em>We can use HtmlViewer control to view reports hosted as an ASP.NET web application. Though, Silverlight 3 does not have in-built html viewer control, there are third party controls available like one from Telerik. The good news is that Silverlight 4 does have in-built html viewer control.</li>
<li><em>Using JavaScript: </em>We can use client side JavaScript functions to open new window or IFRAME from within Silverlight application which will show reports hosted as an ASP.NET web application.</li>
</ol>
</li>
</ol>
<p>I am sure Microsoft will come up with a better solution to this problem in the coming days. Until that any of the above options can be used. I used option #2 – ASP.NET application &#8211; considering the client needs of flexibility and it worked well.</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/08/things-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/08/things-to-consider-while-using-sql-server-reporting-ssrs-with-silverlight-3-and-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Something about NULL in SQL Server</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/08/something-about-null-in-sql-server/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/08/something-about-null-in-sql-server/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 10:20:36 +0000</pubDate>
		<dc:creator>bthaker</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=496</guid>
		<description><![CDATA[
			
				
			
		
As developers, we all probably know what a NULL is in SQL Server. NULL is not a specific value but it stands for UNKNOWN value. In other words, NULL represents the ‘absence of data’.
The behavior and treatment of NULL in SQL server is very interesting in different context and part of T-SQL language. Let’s have [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F08%2Fsomething-about-null-in-sql-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F08%2Fsomething-about-null-in-sql-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As developers, we all probably know what a NULL is in SQL Server. NULL is not a specific value but it stands for UNKNOWN value. In other words, NULL represents the ‘absence of data’.</p>
<p>The behavior and treatment of NULL in SQL server is very interesting in different context and part of T-SQL language. Let’s have a quick look on how it is treated in different ways by SQL Server.</p>
<p>When you use NULL (UNKNOWN value) in Arithmetic operations or in String Concatenation operations, the result is always UNKNOWN because the value which is being operated is not available or UNKNOWN. So, all the following statements yield the result of NULL:</p>
<blockquote><p><code>SELECT 5 + NULL<br />
SELECT 10 / NULL<br />
SELECT 'Gateway' + ' Technolabs' + NULL</code></p></blockquote>
<p>So beware when you are trying to do something similar as shown below:</p>
<blockquote><p><code>DECLARE @TOP INT<br />
DECLARE @SQL NVARCHAR(100)<br />
SET @SQL = 'SELECT TOP ' + CAST(@TOP AS VARCHAR(10)) + '* FROM HumanResources.Employee'<br />
EXECUTE SP_EXECUTESQL @SQL</code></p></blockquote>
<p>The above query will never execute. Guess why?  Because you forgot to initialize @TOP variable and due to that it will contain NULL. So when you try to concatenate the value of @TOP with the value of @SQL, the resulting query is UNKNOWN.</p>
<p>Unlike other programming languages, SQL Server follows the rules of “Three-Valued Logic” which means that the result of a condition in T-SQL can have any of three possible values viz. TRUE, FALSE and UNKNOWN. If NULL is one of the operands in condition composed of comparison operators like =,&gt;,&lt;,&gt;=,&lt;=,&lt;&gt;, then the result of the expression is NULL or UNKNOWN.  For example, the result of all of the following conditions is UNKNOWN:</p>
<p>&#8230; WHERE 100 = NULL</p>
<p>&#8230; WHERE NULL &gt; 5</p>
<p>&#8230; WHERE NULL &lt; 10</p>
<p>Even following statement yields NULL as per SQL-92 Standards:</p>
<p>&#8230; WHERE NULL = NULL</p>
<p>Let’s create a simple table and insert some records in it.</p>
<blockquote><p>
<code>CREATE TABLE tblPerson<br />
(<br />
PersonID INT<br />
,PersonName VARCHAR(50)<br />
,Age TINYINT<br />
)<br />
GO<br />
INSERT INTO tblPerson<br />
SELECT 1,'Person-1',25<br />
UNION<br />
SELECT 2,'Person-2',NULL<br />
UNION<br />
SELECT 3,'Person-3',35</code>
</p></blockquote>
<p>We have a table which contains three rows.  The second row has NULL in Age for Person-2. Now, execute the following query:</p>
<blockquote><p>
<code>SET ANSI_NULLS OFF<br />
SELECT * FROM tblPerson WHERE Age = NULL</code>
</p></blockquote>
<p>The above query will return 1 row for Person-2. Notice the use of SET ANSI_NULLS OFF which is not recommended way because it does not conform to SQL-92 standards. Microsoft encourages the usage of SET ANSI_NULLS ON which is considered best practice and which is also the default behavior of SQL Server. Now, consider following query:</p>
<blockquote><p>
<code>SET ANSI_NULLS ON<br />
SELECT * FROM tblPerson WHERE Age = NULL</code>
</p></blockquote>
<p>The result of the condition in WHERE clause in above query will be UNKNOWN. It is neither TRUE nor FALSE. But, in this case SQL server treats NULL as if “NOT EQUAL TO” and evaluates the result of the condition to FALSE and will not return any rows. Note the use of SET ANSI_NULLS ON, which is SQL Server default.</p>
<p>If you want to fetch rows where Age is NULL, you should use ‘IS’ operator with ANSI_NULLS set to ON instead of using ‘=’ operator with ANSI_NULLS set to OFF. So, the preferred query should be as follows:</p>
<blockquote><p>
<code>SET ANSI_NULLS ON<br />
SELECT * FROM tblPerson WHERE Age IS NULL</code>
</p></blockquote>
<p>As you can observe from above examples that using comparison operators (=,&lt;,&gt;,&gt;=,&lt;=,&lt;&gt;) in condition with NULL as one of its operands appearing in WHERE clause yields UNKNOWN result when you don’t specify ANSI_NULLS option or if it is set to ON.</p>
<p>But this is not the case when NULL appears in condition for a CHECK constraint. To see this, let’s add a CHECK constraint to our table so that age must be greater than zero when a record is inserted or updated.</p>
<blockquote><p>
<code>ALTER TABLE tblPerson<br />
ADD CONSTRAINT CK_tblPerson_Age CHECK (Age &amp;gt; 0)</code>
</p></blockquote>
<p>Now, add new row with NULL in Age as shown below:</p>
<blockquote><p><code>INSERT INTO tblPerson VALUES (4,'Person-4',NULL)</code></p></blockquote>
<p>The age for newly inserted row is NULL which is not greater than zero because it is UNKNOWN. But, SQL Server treats NULL differently in this case and evaluates the CHECK constraint condition as if it is TRUE and inserts new row to the table.</p>
<p>You saw that the condition WHERE NULL=NULL yields NULL because both the values are UNKNOWN and due to this comparison is not possible. Thus, the result will always be UNKNOWN. But again, this is not always the case. To prove my point, let’s add a UNIQUE constraint on PersonID column.</p>
<blockquote><p>
<code>ALTER TABLE tblPerson<br />
ADD CONSTRAINT UK_tblPerson_Age UNIQUE (PersonID)</code>
</p></blockquote>
<p>Now insert a new row where PersonID is NULL as shown below:</p>
<p>INSERT INTO tblPerson VALUES (NULL,&#8217;Person-5&#8242;,30)</p></blockquote>
<p>Because PersonID column allows NULL values, SQL Server will insert this new row. Now, try inserting one more row where PersonID is NULL:</p>
<blockquote><p><code>INSERT INTO tblPerson VALUES (NULL,'Person-6',35)</code></p></blockquote>
<p>As you may probably have guessed, because of UNIQUE constraint on PersonID SQL Server will not allow inserting another row with NULL for PersonID because tblPerson already contains one row with NULL in PersonID column. In this case, SQL server treats NULL even differently and considers all NULLs as if they are equal and does not allow a second NULL to be inserted. Even when SQL Server groups or orders rows by a column, it considers all the NULLs in one group as if they are all equal.</p>
<p>I hope this discussion will help many of you in understanding the behavior of NULL in SQL Server. Thank you for taking time to read this article. Readers’ valuable comments are always welcome!</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/08/something-about-null-in-sql-server/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/08/something-about-null-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Performance Enhancement Tips for LINQ Coupled With MSSQL Server</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/07/5-performance-enhancement-tips-for-linq-coupled-with-mssql-server/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/07/5-performance-enhancement-tips-for-linq-coupled-with-mssql-server/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 06:27:38 +0000</pubDate>
		<dc:creator>Kalpesh Patel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[.Net 3.5]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=459</guid>
		<description><![CDATA[
			
				
			
		
LINQ is one of the most exciting enhancements made in the Microsoft.NET languages in the recent years.
Essentially, it’s a new way to represent different data models in OOPs notation.
While working extensively with LINQ in last couple of years on mission critical .NET projects, I’ve observed the following five performance enhancement possibilities.
1. Lazy Loading &#38; Eager [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2F5-performance-enhancement-tips-for-linq-coupled-with-mssql-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2F5-performance-enhancement-tips-for-linq-coupled-with-mssql-server%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" target="_blank">LINQ</a> is one of the most exciting enhancements made in the Microsoft.NET languages in the recent years.</p>
<p>Essentially, it’s a new way to represent different data models in OOPs notation.</p>
<p>While working extensively with LINQ in last couple of years on mission critical .NET projects, I’ve observed the following five performance enhancement possibilities.</p>
<h3><strong>1. Lazy Loading &amp; Eager Loading </strong></h3>
<p><strong>Lazy Loading:</strong></p>
<p>By default LINQ loads the related objects lazily. Lazy loading means Loading Object with that associate Objects.</p>
<p>For example, If I have two tables called User (UserId, Name) and User_Car  (UserId, CarID, CarBrand), whenever we initiate a User object, it will automatically load User_Car object details also as shown in the code below.</p>
<pre>
<code>var userObj = from user in DataContext.User
              Select user;</code>
</pre>
<p>The above query returns the User Object with the details of associate object of User_Car.  E.g.</p>
<pre><code>Int carId= userObj.User_Car.CarID;</code></pre>
<p>The above statement will fire two queries on database.</p>
<p>First one will be fired when we write query on User Object. E.g.</p>
<pre><code>var userObj = from user in datacontext.User
              Select user;
(Select ID, Name from User)</code></pre>
<p>And second query will fired when we try getting the value from User_Car object.</p>
<p>E.g</p>
<pre><code>Int carId=userObj.User_Car.CarID;
(Select User_Car.CarID, User_Car.User_ID, User_Car.CarBrand
from User_Car where User_Car. User_ID =@userID)</code></pre>
<p>This leads to more round trips to the database. Instead, we can opt for Eager loading.</p>
<p><strong>Eager Loading:</strong></p>
<p>Defining associate Objects  which are require in advance.So when LINQ execute query then it fetch only that objects.And LINQ fire a single on database.</p>
<p>For Example,</p>
<pre><code>DataContext dc= new DataContext ();
DataLoadOptions options = new DataLoadOptions ();
option.Loadwidth&lt;User&gt; (U =&gt; U.User_Car)
dc.LoadOptions = options; </code></pre>
<p>(Here, User_Car object as pre-fetch object. So when we write query on User Object then automatically User_car records get fetch.)</p>
<p>e.g</p>
<pre><code>var userObj = from user in DataContext.User
               Select user;</code></pre>
<p>SQL Query is,</p>
<pre><code>(Select User.ID, User.Name, User_Car.CarID, User_Car.User_ID,
User_Car.CarBrand from User join User_Car on
User.ID=User_Car.User_ID)</code></pre>
<p>And when we write</p>
<pre><code>Int carId= userObj.User_Car.CarID</code></pre>
<p>It fetches the record from memory only. So Eager Loading reduce the Database round Trips and Improve the performance.</p>
<h3><strong>2. Use DataLoadOption.AssociateWith ()</strong></h3>
<p>In Eager Loading, When association of Master object and child object are based on non PrimaryKey then use <strong>DataLoadOption.AssociateWith (). </strong> It will optimize SQL query and give better Performance.</p>
<h3><strong>3.Set ObjectTrackingEnabled = False</strong></h3>
<p>LINQ objects are use only for data retrieval (No insert, update, delete operations are required) then make this flag off.It will avoid Identity Field(Auto-Increment Field) management process.</p>
<h3><strong>4. Set Delay Loaded = True</strong></h3>
<p>Field which is not in use or huge in size of contain for particular object then set this property as True.So we access the field then only data get  load.</p>
<h3><strong>5. Use Compiled Query</strong></h3>
<p>Compiled Query skip the steps of  generating Expression Tree and generating SQL Query  of Process Life Cycle.When First time query get executed, the expression tree and SQL query is generated and next time system will use same for execution.</p>
<p>e.g</p>
<pre><code>Public static Func&lt;DataContext, int, IQueryable&lt;User&gt;&gt;
    UserByID=
	    CompiledQuery.Compile ((DataContext db, int UserID) =&gt;
            From U in db.User where U.ID == UserID select U);</code></pre>
<p>When we call Function first time the expression tree and SQL query will be generate and next time system will use the same to execute query on database.</p>
<p>After applying one or more of the above tips, a LINQ application will definitely perform better and thus will ensure faster response times to business needs.</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/07/5-performance-enhancement-tips-for-linq-coupled-with-mssql-server/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/07/5-performance-enhancement-tips-for-linq-coupled-with-mssql-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>8 things about jQuery which makes it a powerful tool to write rich client side scripting</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/07/8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/07/8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 06:21:56 +0000</pubDate>
		<dc:creator>Kiran Dangar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=449</guid>
		<description><![CDATA[
			
				
			
		
For whom the client side scripting becomes a headache OR for those who loves client side scripting… jQuery is a great way of doing client side scripting with ease and fun. Playing with HTML DOM elements using jQuery is really a fun and as easy as writing ABCD  
Introduction: jQuery is actually an Open [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2F8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2F8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>For whom the client side scripting becomes a headache OR for those who loves client side scripting… jQuery is a great way of doing client side scripting with ease and fun. Playing with HTML DOM elements using jQuery is really a fun and as easy as writing ABCD <img src='http://www.gatewaytechnolabs.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Introduction: </strong>jQuery is actually an Open Source cross-browser JavaScript library which allows faster and easier JavaScript development then the traditional JavaScript development.</p>
<p>There are 8 things which gives power to the developers for building robust and excellent client side scripts.</p>
<p><strong>1 &#8211; Cross browser support</strong> :<br />
Those who have ever written traditional JavaScript, they must have faced problems with diff. browser support and it becomes a tedious stuff for detecting browser behaviors and writing separate logics for all , but jQuery has wiped out all those problem by giving cross browser support. So no more cross-browsing compatibility issues here.</p>
<p><strong>2 &#8211; jQuery selectors , manipulation &amp; Traversing</strong><br />
Every web developers must have used CSS and its syntax for defining styles by class (with DOT) / elements  / element ID (using #), jQuery also uses all common CSS syntax for selecting a set of DOM elements which is called jQuery Selectors.</p>
<p>i.e. $(“#sample”)  will return all the DOM elements with [ ID = sample ]<br />
$(“div.xyz span#abc”) will return only those &lt;span&gt; elements with ID= abc and are child of a &lt;div&gt; with class name “xyz”</p>
<p>To learn more you can visit :<a href="http://api.jquery.com/category/selectors/"> http://api.jquery.com/category/selectors/</a></p>
<p><strong>3 &#8211; jQuery EventBinding</strong><br />
jQuery supports all such events like click ,mouse over/move,load, etc. Writing event on any set of DOM elements are also becomes easier with JQ, by just passing a function as a parameter in event binding.<br />
its as easy as this : $(“#sample”).click(function(){ alert(‘Hi there !’); });<br />
To learn more you can visit :<a href="http://api.jquery.com/category/events/"> http://api.jquery.com/category/events/</a></p>
<p><strong>4 &#8211; Callback functions</strong><br />
jQuery also facilitates the callback functions in many methods which becomes useful while working with animations or any timer based functionalities.</p>
<p>i.e.  $(“#sample”).show(“slow”, [ optional callback function ] );</p>
<p><strong>5 &#8211; Utilization of JSON</strong><br />
JSON stands for “JavaScript object notation”. Use of JSON everywhere as an optional parameters makes jQuery more flexible and powerful for passing a set of parameters.<br />
Jquery utilizes JSON format widely in most of inbuilt functions ,all AJAX methods and in jQuery plug-in development as well.</p>
<p>i.e.  $(“#sample”).css({height:”40px”, color:”black” });</p>
<p><strong>6 &#8211; jQuery AJAX</strong><br />
jQuery gives a variety of AJAX functionalities to the developers with extensive use of callbacks for different AJAX events, and a good thing about jQuery AJAX is that we don’t have to take care about cross-browser compatibility issues. and no need to take care of xmlHTTP object n all.<br />
It gives different functions for all kind of developer’s needs</p>
<p>i.e. $(“#sample”).load( [ URL] ); – a very basic function, which will load the HTML from the specified URL into #sample.</p>
<p>To learn more visit : <a href="http://api.jquery.com/category/ajax/">http://api.jquery.com/category/ajax/</a></p>
<p><strong>7 &#8211; jQuery plugins</strong><br />
jQuery plug-in is a concept or we can say a mechanism of making our own functionality generalized by packaging it all together as a plug-in.<br />
jQuery plug-in offers great portability to the code and of course code re-usability with ease.</p>
<p>To learn more visit : <a href="http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Plug_me:_Writing_your_own_plugins">http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery#Plug_me:_Writing_your_own_plugins</a></p>
<p><strong>8 &#8211; JQuery UI</strong><br />
jQuery UI is an Open Source library which is built on core jQuery.<br />
It can be used to built highly interactive web applications,<br />
jQuery UI offers a wide range of inbuilt functions for animations, effects , themes mechanism , rich  UI widgets and complex behaviors like Drag-Drop , resizing , selection &amp; sorting.</p>
<ul>
<li>jQuery UI categorizes all functionalities in main 3 section given below
<ul>
<li><strong>Interaction:</strong> Covers complex behaviors like Drag-Drop elements, Resizing and Sorting. And provides a wide range of options for handling different behaviors and scenarios</li>
<li><strong>Widgets: </strong>Fully functional rich UI elements (ultimately jQuery plug-ins) with a Rich User Interface and flexible theming options.</li>
<li><strong>Effects: </strong>Enables supports of various animation and transition effects like slide,blind,bounce, drop,fade etc.</li>
</ul>
</li>
</ul>
<p>To learn more visit : <a href="http://jqueryui.com/demos/">http://jqueryui.com/demos/</a></p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/07/8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/07/8-things-about-jquery-which-makes-it-a-powerful-tool-to-write-rich-client-side-scripting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Template Method Pattern</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/07/the-template-method-pattern/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/07/the-template-method-pattern/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 07:02:28 +0000</pubDate>
		<dc:creator>sgadhavi</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Pattern & Practices]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=420</guid>
		<description><![CDATA[
			
				
			
		
The Template Pattern uses the inheritance beautifully to take advantage of code reuse. No composition is used because of the strict nature of the circumstances where this pattern should be used. The subclasses are bound to implement the abstract behavior of superclass and give the implementation in their own way and yet the sequence of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2Fthe-template-method-pattern%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2Fthe-template-method-pattern%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong></strong>The Template Pattern uses the inheritance beautifully to take advantage of code reuse. No composition is used because of the strict nature of the circumstances where this pattern should be used. The subclasses are bound to implement the abstract behavior of superclass and give the implementation in their own way and yet the sequence of algorithm is made unchangeable by making the method, of superclass which has the algorithm, final.</p>
<p><strong>Definition</strong>: Defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm&#8217;s structure.</p>
<p><strong>When to use it</strong>: When you have a fixed algorithm to execute from a superclass and which must not be changed in sequence but should behave differently in subclass specific way then its good to use this pattern for</p>
<ol>
<li>Integrity reason of the algorithm&#8217;s sequence.</li>
<li> Code reuse, if there are many subclasses which all depend on superclass implementation of certain functions which are of similar nature.</li>
</ol>
<p><strong>How to use it</strong>: Superclass will have certain methods, whose implementation is given by superclass itself and some methods which are defined as abstract, and thus, must be implemented by the subclasses. In this pattern, a superclass will define a method, which has a fixed sequence in calling some methods, we call it template method or an algorithm. Define this template method as final in superclass so that, subclasses can not change the sequence of algorithm and still contribute subclass-specific way by giving their own implementation of abstract methods. So the client will call the final method of subclass, inherited from superclass, and get the implementation of the algorithm in the subclass-specific way.</p>
<p><strong>Example</strong>: The diagram 1.1 shows the initial design, where two different classes has an algorithm which has same sequence of methods but each having its implementation of those methods in their own way. Here, the same code is scattered across the classes.</p>
<p><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/07/Template-Pattern.jpg"><img class="alignnone size-medium wp-image-421" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/07/Template-Pattern-300x173.jpg" alt="Diagram 1.1" width="300" height="173" /></a></p>
<p>The diagram 1.2 shows the Template Method Pattern, where we take out the common behavior of subclasses into superclass creating a common point of change which will reflect to all the subclasses. We define the subclass-specific methods in superclass as abstract thus making mandatory for subclass to give implementation. Also, we create a new method, Template Method(on which the name is given to this pattern), by calling the methods in the sequence by which we want our common algorithm to be executed. And , defining it as final so that we are sure that no subclass can change the sequence and just give its own implementation.</p>
<p><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/07/Diagram-1.jpg"><img class="alignnone size-medium wp-image-423" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/07/Diagram-1-300x211.jpg" alt="Diagram 1.2" width="300" height="211" /></a></p>
<p><strong>Conclusion</strong>: To conclude, the sequence,which must be same throughout the subclasses, is defined by the superclass and some part of the algorithm is executed by subclasses .Such design is a very good example of secure algorithm ensuring fixed sequence but with added touch of subclasses who give their own implementation.</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/07/the-template-method-pattern/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/07/the-template-method-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Quick Look at Model-View-Presenter (MVP) Architecture</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/07/a-quick-look-at-model-view-presenter-mvp-architecture/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/07/a-quick-look-at-model-view-presenter-mvp-architecture/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 14:01:03 +0000</pubDate>
		<dc:creator>Amit Patel</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MVP]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=397</guid>
		<description><![CDATA[
			
				
			
		
As UI-creation technologies such as ASP.NET and Windows® Forms become more and more powerful, it&#8217;s common practice to let the UI layer do more than it should. Without a clear separation of responsibilities, the UI layer can often become a catch-all for logic that really belongs in other layers of the application. One design pattern, [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2Fa-quick-look-at-model-view-presenter-mvp-architecture%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F07%2Fa-quick-look-at-model-view-presenter-mvp-architecture%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As UI-creation technologies such as ASP.NET and Windows® Forms become more and more powerful, it&#8217;s common practice to let the UI layer do more than it should. Without a clear separation of responsibilities, the UI layer can often become a catch-all for logic that really belongs in other layers of the application. One design pattern, the Model View Presenter (MVP) pattern, is especially well suited to remove lost of logic from UI layer.</p>
<h3>Some noteworthy benefits of MVP pattern:</h3>
<ul>
<li><strong>Platform independent:</strong> In this Pattern application make independent from its platform so when ever requirement comes to move to window to web or any other version its    only need to change on code behind page for view Implementation, so later on required to any of the application portion convert in web to window or any other platform we can handle it by minimum efforts.</li>
<li><strong>Loose couples form UI:</strong> So application stays loose couples from code behind page (UI) to business layer or any other next latter.</li>
<li><strong>Useful to create automated unit test:</strong> MVP is purely loose couples from any plate form so that it is very use to prepare automated unit test cases.</li>
<li><strong>Increase code maintainability:</strong> Keeps code more maintainable throughout the lifetime of the project, especially during the maintenance phase.</li>
</ul>
<h3>Overall Application Architecture:</h3>
<p><strong><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/MVP4.jpg"></a></strong><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/MVP4.jpg"><img class="aligncenter size-medium wp-image-427" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/MVP4-228x300.jpg" alt="mvp-diagram" width="228" height="300" /></a></p>
<ol>
<li><strong>Model:</strong> Model is UI interface for how and what the data are needed to displayed.</li>
<li><strong>View:</strong> Show the representation of model, that can be build in presenter</li>
<li><strong>Presenter:</strong> Build all data for model and pass all data to model in form of view by communicating with services class( or business logic layer)</li>
</ol>
<p style="margin-bottom: 0pt;">Below is the MVP patterns example with service class:</p>
<p style="margin-bottom: 0pt;"><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/MVP-Class3.jpg"><img class="aligncenter size-full wp-image-406" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/MVP-Class3.jpg" alt="" width="185" height="109" /></a></p>
<p style="text-indent: -0.25in; margin: 5pt 0in 0pt 0.5in;">
<p style="margin-bottom: 0pt;"><strong>1. User Interface Layer</strong></p>
<p style="text-indent: 0.5in; margin-bottom: 0pt;">In this section contains actual UI, in .net terms its aspx or ascx pages.</p>
<p><strong>2. Presentation Layer ( MVP :- Code behind + view (interfaces) + Presenter)</strong></p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 1.5pt;">In this layer we have designed as MVP patters so it’s divided in below three parts.</p>
<p style="text-indent: -0.25in; margin: 5pt 0in 0pt 73.5pt;">a.    <strong>View – It is interfaces.</strong> This interface contains signature of all properties and events that needs to implement in code behind page that will be use in presenter class.</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">I.e.</p>
<p><code> </code></p>
<p><code> </code></p>
<p style="margin: 5pt 0in 0pt 1in;">Public Interface Icustomer</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 1in;">ReadOnly Property CustomerName()</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 1in;">WriteOnly Property DisplayMessage()</p>
<p style="margin: 5pt 0in 0pt 1in;">End Interface</p>
<p style="text-indent: -0.25in; margin: 5pt 0in 0pt 73.5pt;">b.      <strong>Code Behind (Model)</strong> &#8211; In this class we need to implement View.(No need to specify any logic). We are just implement properties which is defined in view.</p>
<p><code> </code></p>
<p><code> </code></p>
<p style="text-indent: 1.5pt; margin: 5pt 0in 0pt 1in;">#Region &#8220;Member&#8221;</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 69.85pt;">Dim Presenter As CustomerPresenter</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 33.85pt;">#End Region</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Presnter = New CustomerPresenter(Me)</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Presnter.LoadData()</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">End Sub</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">ReadOnly Property CustomerName() Implements ICustomer.CustomerName</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Get</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Return textCustomerName.Text</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">End Get</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">End Property</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">WriteOnly Property DisplayMessage() Implements ICustomer.DisplayMessage</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Set(ByVal value)</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">Response.Write(value)</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">End Set</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">End Property</p>
<p style="margin: 5pt 0in 0pt 105.85pt;">
<p style="text-indent: -0.25in; margin: 5pt 0in 0pt 73.5pt;"><code> </code><br />
c.    <strong>Presenter -</strong> In this class we are using all those members which we have specified in view and implemented in code behind. Presenter class is responsible for execute methods of business layer.</p>
<p style="text-indent: 2.95pt; margin: 5pt 0in 0pt 70.55pt;"><code>Public Class CustomerPresenter</code></p>
<p><code> </code></p>
<p><code> </code></p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Private iView As ICustomer</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Private SessionProvider As ISessionProvider</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Public Sub New(ByVal view As ICustomer)</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Me.iView = view</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">End Sub</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">&#8216;Public Sub New(ByVal view As ICustomer, ByVal SessionProvider As ISessionProvider)</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">&#8216; Me.iView = view</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">&#8216; Me.SessionProvider = SessionProvider</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">&#8216;End Sub</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Public Sub LoadData()</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">Me.iView.DisplayMessage = Me.iView.CustomerName</p>
<p style="margin: 5pt 0in 0pt 106.55pt;">End Sub</p>
<p style="text-indent: 0.5in; margin: 5pt 0in 0pt 0.5in;">End Class</p>
<h3><span style="font-size: 15px;">Summary:</span></h3>
<ul>
<li>MVP is little prolonged process to implement and understanding in the beginning, but later on it will be very useful as it provides application maintainability on application maintenance phase, increase code re-usability. A good thing about it is a clear distinction of different layers.  For example, all the code is separate from the user interface.</li>
<li>MVP is a strong consideration candidate for large scale projects especially where project maintainability re-usability are the key success criteria. It suits well with automated test cases methods also.</li>
</ul>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/07/a-quick-look-at-model-view-presenter-mvp-architecture/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/07/a-quick-look-at-model-view-presenter-mvp-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smart and Effective Use of SQL Server&#8217;s Pool of Shared Memory</title>
		<link>http://www.gatewaytechnolabs.com/blog/2010/06/smart-and-effective-use-of-sql-servers-pool-of-shared-memory/</link>
		<comments>http://www.gatewaytechnolabs.com/blog/2010/06/smart-and-effective-use-of-sql-servers-pool-of-shared-memory/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 07:47:39 +0000</pubDate>
		<dc:creator>Sarbjeet Singh</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.gatewaytechnolabs.com/blog/?p=273</guid>
		<description><![CDATA[
			
				
			
		
Microsoft SQL Server has an effective pool of shared memory which ideally is used for two purposes .

Data buffer;
Execution plan cache.

It is commonly known that a query executed second time always gives response faster than the first time. In this post I&#8217;m going to discuss what works behind this and how can we make sure [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F06%2Fsmart-and-effective-use-of-sql-servers-pool-of-shared-memory%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.gatewaytechnolabs.com%2Fblog%2F2010%2F06%2Fsmart-and-effective-use-of-sql-servers-pool-of-shared-memory%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Microsoft SQL Server has an effective pool of shared memory which ideally is used for two purposes .</p>
<ol>
<li>Data buffer;</li>
<li>Execution plan cache.</li>
</ol>
<p>It is commonly known that a query executed second time always gives response faster than the first time. In this post I&#8217;m going to discuss what works behind this and how can we make sure that the shared memory is effectively used.</p>
<p><strong>What works behind this?</strong><br />
The shared memory part which is commonly known as execution plan cache (also known as procedure cache) save the execution plans of all the queries executed in SQL Server. When a query is executed this area of memory is looked into to determine if any of the existing execution plan can be re-used for this query. If the plan is not found then the query is parsed, compiled, optimized for execution and then the execution plan of the same is stored in the execution plan cache. <em>That is the reason of queries working faster in subsequent time than the first time.</em></p>
<p><strong>How to make effective use of execution plans</strong><br />
For each query executed in SQL Server an execution plan is saved but its not necessary that the execution plan stored is useful enough that its used for other queries also. To better understand this lets have an look how SQL Server saves the execution plan.</p>
<p>SELECT UseCounts, CacheObjType, ObjType, ST.Text FROM sys.dm_exec_cached_plans<br />
cross apply sys.dm_exec_sql_text(plan_handle) as ST<br />
ORDER BY ST.text</p>
<p><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/adhoc.jpg"><img class="alignnone size-full wp-image-382" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/adhoc.jpg" alt="" width="546" height="160" /></a><br />
﻿﻿<br />
In the above screenshot let&#8217;s concentrate on the area which is in red. These three execution plans are the result of non-parameterized ad-hoc queries executed from the code of application inside an iteration. In this case none of the execution plans are effective, for each query a new execution plan is required. The query in the code was written something like below.</p>
<p>string sql = &#8220;SELECT * FROM URls where urlid=&#8221; + a;<br />
where &#8220;a&#8221; is the varying value of the iteration</p>
<p>Had this query been a parametrized query only one execution plan would have been created and used for all the iteration. Let&#8217;s take an example to understand this better. Now my query would be something like.</p>
<p>string sql = &#8220;SELECT * FROM URls where urlid=@a&#8221;;<br />
SqlCommand cmd = new SqlCommand(sql, myConn);<br />
cmd.Parameters.Add(new SqlParameter(&#8220;@a&#8221;, a));</p>
<p>Now let&#8217;s have a look at the execution plans</p>
<p><a href="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/prepared.jpg"><img class="alignnone size-full wp-image-381" src="http://www.gatewaytechnolabs.com/blog/wp-content/uploads/2010/06/prepared.jpg" alt="" width="715" height="100" /></a></p>
<p>In the above screenshot you would realize that only one execution plan has been created and its &#8220;usecounts&#8221; is 3, that means this plan has been used three time. Reusable execution plans means lesser CPU utilization , lesser utilization of memory for execution plan cache there by leaving more memory available for data buffer.</p>
<p><strong>Conclusion</strong><br />
Though SQL Server maintains the execution plan of each query but making effective use of it is some what in our hands. There should be no piece of code in the application which is making use of ad-hoc queries it should always be parameterized queries. Though I personally prefer to use stored procedure since allowing direct access to the tables can be a security risk.</p>
<div id="pfButton"><a href="http://www.gatewaytechnolabs.com/blog/2010/06/smart-and-effective-use-of-sql-servers-pool-of-shared-memory/?pfstyle=wp" title="Print an optimized version of this web page" style="text-decoration: none;"><img id="printfriendly" style="border:none; padding:0;" src="http://cdn.printfriendly.com/pf-icon-small.gif" alt="Print"/><span style="font-size: 12px; color: rgb(85, 117, 12);">Print Friendly</span></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.gatewaytechnolabs.com/blog/2010/06/smart-and-effective-use-of-sql-servers-pool-of-shared-memory/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

