<?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>Digicorp</title>
	<atom:link href="http://dev.digi-corp.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dev.digi-corp.com</link>
	<description>&#62;&#62; Developer Blog</description>
	<lastBuildDate>Wed, 06 Jan 2010 09:07:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CO2 Net : A Concept of Future Networking</title>
		<link>http://dev.digi-corp.com/2010/01/co2-net-a-concept-of-future-networking/</link>
		<comments>http://dev.digi-corp.com/2010/01/co2-net-a-concept-of-future-networking/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 09:07:17 +0000</pubDate>
		<dc:creator>Nilesh</dc:creator>
				<category><![CDATA[Concept/Idea]]></category>
		<category><![CDATA[co2 net]]></category>
		<category><![CDATA[concept networking]]></category>
		<category><![CDATA[free internet]]></category>
		<category><![CDATA[future of network]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1867</guid>
		<description><![CDATA[It was a nice normal working Tuesday at Digicorp.
We were a bit busy and a bit relaxed as it was nearly end of the day, around 5:15 PM or something. I was digging my mind to crack a complex feature in Unisite calendar module. and suddenly my colleague Vishal Parmar jumped to me and asked [...]]]></description>
			<content:encoded><![CDATA[<p>It was a nice normal working Tuesday at <a href="http://www.digi-corp.com" target="_blank">Digicorp</a>.</p>
<p>We were a bit busy and a bit relaxed as it was nearly end of the day, around 5:15 PM or something. I was digging my mind to crack a complex feature in <a href="http://www.unisite.com" target="_blank">Unisite</a> calendar module. and suddenly my colleague Vishal Parmar jumped to me and asked me Nilesh what if Internet because usual part and normal part of every computer, just like a disk-drive or any other part. and he was looking at me with his a bit childish face.. and thinking as he has cracked some kinda joke and waiting for the response from me.</p>
<p>&#8230;&#8230;&#8230;&#8230;and kboom I got a small spark in my brain&#8230;&#8230;</p>
<p>and we guyz literally fall in to all new kind of discussion, and I got the idea that vishal was thinking right that Internet should be a part of every computer, or mobile or any device which falls in to digital categories. and it should be also provided free as well, but the problem is its not possible as our current Internet is hanging on a tree of massive cabling of OFC, conductive and satellite etc . and all this costs so Internet too.</p>
<p>but then I came up with an idea a Network using Naturally available and spread resource <img src='http://dev.digi-corp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and I had selected Co2 ( Carbon Dioxide )   as my network resource.</p>
<p>The idea is straight simple using few component</p>
<p><span style="text-decoration: underline;"><strong>CO2 Net</strong></span></p>
<ul>
<li><strong>Build small New gen modem (Device) which will send / receive,</strong></li>
<li><strong>and the device will send / receive using the molecular structure of Co2 of the earth&#8217;s atmosphere, and the signals will travel across the atmosphere by riding the Co2 enabling any capable device to reCapture / receive,</strong></li>
<li><strong>A small authentication will be bounded to each packet exhausted in the Co2, so the right candidate can only receive them</strong></li>
</ul>
<p>That&#8217;s it.</p>
<p>I know the idea might look silly at first, but think and you will find possibilities.</p>
<p>waiting to welcome your responses.</p>
<p>cheers</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2010/01/co2-net-a-concept-of-future-networking/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Find HTML Editor in QTP</title>
		<link>http://dev.digi-corp.com/2009/12/find-html-editor-in-qtp/</link>
		<comments>http://dev.digi-corp.com/2009/12/find-html-editor-in-qtp/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:01:00 +0000</pubDate>
		<dc:creator>mehul.brahmbhatt</dc:creator>
				<category><![CDATA[QA]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[FCK Editor]]></category>
		<category><![CDATA[HTML Editor]]></category>
		<category><![CDATA[QTP]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1790</guid>
		<description><![CDATA[Follow below steps to read and write contents from an HTML Editor if you are testing using QTP
Step 1: QTP by default can not find an HTML Editor so you have to add HTML Editor in object repository. It will add HTML Editor as a frame.
See below image for an example

Step 2:  Below is an [...]]]></description>
			<content:encoded><![CDATA[<p>Follow below steps to read and write contents from an HTML Editor if you are testing using QTP</p>
<p><strong>Step 1:</strong> QTP by default can not find an HTML Editor so you have to add HTML Editor in object repository. It will add HTML Editor as a frame.</p>
<p>See below image for an example</p>
<p><img class="alignnone size-full wp-image-1791" src="http://dev.digi-corp.com/wp-content/uploads/2009/10/HTML-Editor.gif" alt="HTML Editor" width="767" height="370" /></p>
<p><strong>Step 2</strong>:  Below is an example of how to write contents in an HTML Editor. Write below line once you have added HTML Editor as an object<em>.</em></p>
<p><em>Browser(&#8221;NewRelease&#8221;).Page(&#8221;Registration&#8221;).Frame(&#8221;Frame_2&#8243;).Object.write &#8220;Testing of add news page.&#8221;</em></p>
<p><strong>Step 3:</strong> Below is an example of how to read contents from an HTML Editor.</p>
<p><em>fName = browser(&#8221; New Release&#8221;).Page(“ Registration &#8220;).Frame(&#8221;Frame_2&#8243;).WebElement(&#8221;testing&#8221;).Object.innerText</em></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/12/find-html-editor-in-qtp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paypal shopping cart integration using HTML for Beginners</title>
		<link>http://dev.digi-corp.com/2009/11/paypal-shopping-cart-integration-using-html/</link>
		<comments>http://dev.digi-corp.com/2009/11/paypal-shopping-cart-integration-using-html/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 07:49:08 +0000</pubDate>
		<dc:creator>devdatt.mehta</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1760</guid>
		<description><![CDATA[In online payment paradigm Paypal is one of the best and popular online payment services. Through this article I will share my experience with you about integration of online payment services.
Novice developer may find this post very useful.
I have used following methods for the online payment integration in my shopping cart.
In development process you need [...]]]></description>
			<content:encoded><![CDATA[<p>In online payment paradigm Paypal is one of the best and popular online payment services. Through this article I will share my experience with you about integration of online payment services.</p>
<p>Novice developer may find this post very useful.</p>
<p>I have used following methods for the online payment integration in my shopping cart.</p>
<p>In development process you need to create paypal testing account for that create paypal sandbox account for the testing purpose.</p>
<p>Step 1: https://developer.paypal.com/<br />
Step 2: Create new account<br />
Step 3: Paypal will send you activation link in your email inbox.<br />
Step 4: Login in sandbox<br />
Step 5: Create Test Accounts for buyer and seller accounts</p>
<p>Go to the Test Account page in paypal. Basically you need to type of account for your site integration<br />
1.Buyer Account<br />
2.Merchant Account.</p>
<p>Select country &#8220;United States&#8221;.<br />
If you want to create buyer account choose Account Type: Buyer<br />
Fill the form accordingly. Keep your login and password some where.<br />
Click on &#8220;Show Advanced Options&#8221;.<br />
Choose what card you want to use when will do online purchase for testing.<br />
Set Account Balance.</p>
<p>Create seller account in same way as above.</p>
<p>Paypal gives you many ways to integrate your site with but here I will explain one method for the integration.</p>
<p>Simple Integration<br />
==================<br />
In simple integration with your site you need to know some predefined html variable created by paypal.</p>
<p>Not all the HTML variables I shown here but some of the important that I showed here out of other it is depend on your merchant account and situation.</p>
<p>Ref: https://cms.paypal.com/us/cgi-bin/?&amp;cmd=_render-content&amp;content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables</p>
<p>set following html variable as hidden in your Buy Now button page in your shopping cart page.</p>
<p>Replace all the value as per given instructions under the value attribute.<br />
&lt;FORM name=&#8221;redirectoPaypal&#8221; METHOD=&#8221;POST&#8221; ACTION=&#8221;https://www.sandbox.paypal.com/cgi-bin/webscr&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;CMD&#8221; value=&#8221;_xclick&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;amount&#8221; value=&#8221;shopping cart total amount of selected items&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;item_name&#8221; value=&#8221;shopping cart item description or name&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;item_number&#8221; value=&#8221;selected item number&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;quantity&#8221; value=&#8221;selected item quantity&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;currency_ code&#8221; value=&#8221;USD&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;invoice&#8221; value=&#8221;invoice number&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;business&#8221; value=&#8221;your merchant paypal login id&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;return&#8221; value=&#8221;site url for success page&#8221; /&gt;<br />
&lt;INPUT TYPE=&#8221;hidden&#8221; name=&#8221;cancel_return&#8221; value=&#8221;site url for cancel paypal payment page&#8221; /&gt;<br />
&lt;/FORM&gt;</p>
<p>more explanation of html variables.<br />
&#8220;CMD&#8221; is use for shopping cart do not change it.<br />
&#8220;business&#8221; in testing set seller account id here after complete testing change to real merchant account id.<br />
&#8220;return&#8221; is page url of your site paypal will redirect on this page with some extra variable such as transaction id. just debug with var_dump($_GET)<br />
and use.<br />
&#8220;cancel_return&#8221; is page url of your site. paypal will redirect on this page if user will denied to confirm the payment.</p>
<p>put above code in your page and test it.<br />
when your set-up working successfully. change the action url to &#8220;https://www.paypal.com/cgi-bin/webscr&#8221; for live.</p>
<p>API Integration<br />
================<br />
coming soon&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/11/paypal-shopping-cart-integration-using-html/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Different Type of Monkey Testing</title>
		<link>http://dev.digi-corp.com/2009/10/different-type-of-monkey-testing/</link>
		<comments>http://dev.digi-corp.com/2009/10/different-type-of-monkey-testing/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 12:13:02 +0000</pubDate>
		<dc:creator>jignesh.patel</dc:creator>
				<category><![CDATA[QA]]></category>
		<category><![CDATA[monkey testing]]></category>
		<category><![CDATA[monkey testing types]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1456</guid>
		<description><![CDATA[Monkey Testing
Monkey testing is used with fully automated testing tool. This tool doesn’t know how to use any application, so it performs mouse clicks on the screen or keystrokes on the keyboard randomly. The test monkey is technically known to conduct random testing, which is in the category of black-box testing. Below are different types [...]]]></description>
			<content:encoded><![CDATA[<h2><span style="color: #800000"><span style="text-decoration: underline;"><strong>Monkey Testing</strong></span></span></h2>
<p>Monkey testing is used with fully automated testing tool. This tool doesn’t know how to use any application, so it performs mouse clicks on the screen or keystrokes on the keyboard randomly. The test monkey is technically known to conduct random testing, which is in the category of black-box testing. Below are different types of monkey testing.</p>
<ul>
<li>Dumb monkeys</li>
<li>Semi-smart monkeys</li>
<li>Smart monkeys</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Dumb Monkey Testing</strong></span></p>
<p>The initial and the lowest level of testing service is called Dumb Monkey Testing, which is run without specific test in mind and often by a person with no or very limited education in testing.</p>
<p>But Dumb Monkey Tester does not mean a person of no intelligence at all, it rather means absence of any planning in the testing process.</p>
<p>Dumb Monkey software testing services:</p>
<ul>
<li>Guesstimate about      required time and staff</li>
<li>No formal planning and      acceptance criteria</li>
<li>Click-through an      application or a system</li>
<li>Very fast results from      a done work</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Semi-Smart Monkey Testing</strong></span></p>
<p>Having some experience and improved testing skills the Dumb Monkey reaches the next stage in evolution: Semi-Smart Monkey Tester, who is the most effective when working in small groups.</p>
<p>Semi-Smart Monkey software testing services:</p>
<ul>
<li>Initial level of      planning and acceptance criteria</li>
<li>Guesstimate about      required time and staff</li>
<li>Reading requirements      before test run</li>
<li>Semi-technical bug      reports, logs recording</li>
<li>Initial level of      regression testing</li>
</ul>
<p><span style="text-decoration: underline;"><strong>Smart Monkey Testing</strong></span></p>
<p>Smart Monkey is a crown of monkeys testing evolution. Having the army of Smart Monkeys it is possible to finalize vast testing projects, use tools and initial testing theory, bug trackers. Usually Smart Monkey area of activity is limited by his/her testing environment.</p>
<p>Smart monkeys are valuable for load and stress testing; they will find a significant number of bugs, but are also very expensive to develop.</p>
<p>Smart Monkey software testing services:</p>
<ul>
<li>Repetitive planning      and estimations</li>
<li>Attempts to analyze      requirements before test run</li>
<li>Creating test      scenarios</li>
<li>Issues Tracking      Systems usage</li>
<li>Initial level of      regression testing</li>
<li>Finding memory or      resource bugs</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/10/different-type-of-monkey-testing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create Virtual Machine in VMware Workstation</title>
		<link>http://dev.digi-corp.com/2009/10/create-virtual-machine-in-vmware-workstation/</link>
		<comments>http://dev.digi-corp.com/2009/10/create-virtual-machine-in-vmware-workstation/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 11:34:45 +0000</pubDate>
		<dc:creator>mehul.brahmbhatt</dc:creator>
				<category><![CDATA[vmware]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[vmware workstation]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1353</guid>
		<description><![CDATA[






Vmware Workstation makes it simple to create and run multiple virtual machines on your desktop or laptop computer. You can convert an existing physical PC into a VMware virtual machine, or create a new virtual machine from scratch. Each virtual machine represents a complete PC, including the processor, memory, network connections and peripheral ports.  [...]]]></description>
			<content:encoded><![CDATA[<p><!--   		BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small } --></p>
<table style="height: 2644px;" border="0" cellspacing="0" width="535" rules="none">
<col width="86"></col>
<col width="785"></col>
<tbody>
<tr>
<td height="156" align="left"></td>
<td align="left">Vmware Workstation makes it simple to create and run multiple virtual machines on your desktop or laptop computer. You can convert an existing physical PC into a VMware virtual machine, or create a new virtual machine from scratch. Each virtual machine represents a complete PC, including the processor, memory, network connections and peripheral ports.  VMware Workstation lets you use your virtual machines to run Windows, Linux and a host of other operating systems side-by-side on the same computer. You can switch between operating systems instantly with a click of a mouse, share files between virtual machines with drag-and-drop functionality and access all the peripheral devices you rely on every day.</td>
</tr>
<tr>
<td height="25" align="left"></td>
<td align="left">Steps to Create a Virtual Machine</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">1.</td>
<td align="left">Create a Virtual Machine</td>
</tr>
<tr>
<td height="25" align="left"></td>
<td style="text-align: left">Open a File menu and select a new Virtual Machine or you can directly click on the virtual machine from home tab of Vmware Workstation.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"><img class="alignnone size-full wp-image-1389" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/v6.gif" alt="v6" width="518" height="369" /></td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">2</td>
<td align="left">.Now select a type of the configuration ( Typical )</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">a) Typical (Recommended): It creates workstation with recommended option. For Example: It will automatically select recommended workstation, memory, processor and network connection.</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">b) Custom (Advanced): You can manage your custom settings from this type. For example: User can set number of processor, select memory of virtual machine and network connection.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">3</td>
<td align="left">.Guest Operating System Installation</td>
</tr>
<tr>
<td height="71" align="left"></td>
<td align="left">a) Installer disc image file (iso): User needs to select an iso image of the respective operating system which he needs to install on virtual machine. User has to select this option if he wants to install operating system.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left">b) I will install operating system later: If user do not want to install operating system for now then he can select this option. It will create a blank operating system in virtual machine and user can later install the operating system..</td>
</tr>
<tr>
<td height="25" align="right">4.</td>
<td align="left">Guest Operating System</td>
</tr>
<tr>
<td height="71" align="left"></td>
<td align="left">User has to select an operating system type from this option.  For example User select Microsoft Windows, Linux and Sun Solaris etc. Based on selected operating system type it will display respective version of the operating system. User can also select it and go ahead.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">5.</td>
<td align="left">Name the Virtual Machine</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">User has to enter name of the virtual machine and needs to give location to save the selected operating system image, System will save the image of operating system on the given location.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">6.</td>
<td align="left">Specify Disc Space</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">User has to specify disk space to create a virtual machine. He has to give disc size in GB. Recommended size for Operating System window XP is 9 GB.</td>
</tr>
<tr>
<td height="24" align="left"></td>
<td align="left"></td>
</tr>
<tr>
<td height="25" align="right">7.</td>
<td align="left">Final Step: Ready to Create Virtual Machine</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">It will display preview of all the details which you had selected. For example Virtual Machine Name, Location, Version, Os, Hard Disk, Memory etc.</td>
</tr>
<tr>
<td height="48" align="left"></td>
<td align="left">Before Finish, You can also customize Hard ware settings if required otherwise you can finish the step. User can customize memory, CD / DVD, Display and Processor etc.</p>
<p><img class="size-full wp-image-1358 alignleft" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/v3.gif" alt="v3" width="504" height="373" /></p>
<p><!--   		BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small } --></p>
<table style="height: 584px;" border="0" cellspacing="0" width="537" rules="none">
<col width="785"></col>
<tbody>
<tr>
<td width="785" height="48" align="left">Once all the customization completed then user can finish the step and it will create a virtual machine as per given details.</p>
<p><img class="size-full wp-image-1366 alignleft" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/v9.gif" alt="v9" width="500" height="408" /></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/10/create-virtual-machine-in-vmware-workstation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Map, Camera, iPod Library and Facebook Connect with iPhone</title>
		<link>http://dev.digi-corp.com/2009/09/google-map-camera-ipod-library-and-facebook-connect-with-iphone/</link>
		<comments>http://dev.digi-corp.com/2009/09/google-map-camera-ipod-library-and-facebook-connect-with-iphone/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 07:45:41 +0000</pubDate>
		<dc:creator>pratik.joshi</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Camera]]></category>
		<category><![CDATA[Encoding Image]]></category>
		<category><![CDATA[Facebook Connect]]></category>
		<category><![CDATA[Google Map]]></category>
		<category><![CDATA[iPod Library]]></category>
		<category><![CDATA[MKMapView]]></category>
		<category><![CDATA[MKUserLocation]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1275</guid>
		<description><![CDATA[
Displaying Google map
The iPhone SDK 3.0 offers a class of map view in MapKit framework. You just need to declare an object of MKMapView and add it to your current view.
MKMapView *mapview=[[MKMapView alloc]initWithFrame:(CGRectMake(0, -20, 320, 320))];
[self.view addSubview:mapview];
Now, to display the user location on map, I was trying to insert a pin annotation on map. Soon, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-1350" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/iphone_home.gif" alt="iphone_home" width="300" height="495" /></p>
<p><strong>Displaying Google map</strong></p>
<p>The iPhone SDK 3.0 offers a class of map view in MapKit framework. You just need to declare an object of MKMapView and add it to your current view.</p>
<p style="padding-left: 30px;"><span style="color: #993300">MKMapView *mapview=[[MKMapView alloc]initWithFrame:(CGRectMake(0, -20, 320, 320))];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">[self.view addSubview:mapview];</span></p>
<p>Now, to display the user location on map, I was trying to insert a pin annotation on map. Soon, I realized that was wrong approach. User location is meant for changing. It will be updated many time.</p>
<p>The solution for this was to use the MKUserLocation class object. The object of this class will return “Blue dot” of built-in Google map application on iPhone. It will also show animated circle with radius of probable range of user location.</p>
<p style="padding-left: 30px;"><span style="color: #993300">MKUserLocation *ulocation=[[MKUserLocation alloc]init];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">[mapview setShowsUserLocation:TRUE];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">[mapview addAnnotation:ulocation];</span></p>
<p>That&#8217;s it. You don&#8217;t need to worry any more about the current location of user. The ulocation object will change its co-ordinates and display the dot whenever the position is updated.</p>
<p><img class="alignnone size-full wp-image-1348" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/iPhoneMap.png" alt="iPhoneMap" width="470" height="254" /></p>
<p><strong>Sending encoded image</strong></p>
<p>You can send images to web service either by mail or by encoding it to string. I have used base64 encoding method to encrypt the image taken from iPhone camera and to send it to web service.</p>
<p>Generally, the image taken from iPhone camera is of very large size (800 kb to 2 mb). So, it may take very long time to encode the image.</p>
<p>I found another way to do the same thing. After taking the picture, you can display the image taken in full view of screen (320*480). Then take the screenshot at that stage and fetch the new image for encoding. In this way, you can make your encoding faster as this was the same picture taken using camera.</p>
<p>I have used following process to take the screenshot.</p>
<p style="padding-left: 30px;"><span style="color: #993300">UIWindow *screenWindow = [[UIApplication sharedApplication] keyWindow];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">UIGraphicsBeginImageContext(screenWindow.frame.size);</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">[screenWindow.layer renderInContext:UIGraphicsGetCurrentContext()];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">UIGraphicsEndImageContext();</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">NSData *screenshotPNG = UIImagePNGRepresentation(screenshot);</span></p>
<p>Now, since you have the image in screenshotPNG, you can encode it using your base64 method.</p>
<p style="padding-left: 30px;"><span style="color: #993300">NSString *dstring=[[NSString alloc]init];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">dstring=[self base64StringFromData:screenshotPNG length:[screenshotPNG length]];</span></p>
<p><strong> </strong></p>
<p><strong>Playing a specific song</strong></p>
<p>With iPhone SDK 3.0, we have the access to iPod library on iPhone. The apple documentation “<a href="http://developer.apple.com/iphone/library/documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html">iPodLibraryAccess Guide</a>” covers most of the part needed for understanding this functionality. Here, I will describe how to play a specific song stored on iPhone.</p>
<p>Let&#8217;s assume our song name is in songtitle which is NSString. To begin, we need objects of</p>
<p style="padding-left: 30px;"><span style="color: #993300">MPMusicPlayerController and a MPMediaQuery.</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">MPMusicPlayerController* iPodMusicPlayer;</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">MPMediaQuery *everything = [[MPMediaQuery alloc] init];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">everything=[MPMediaQuery songQuery];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">NSArray *itemsFromGenericQuery = [everything items];</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">for (MPMediaItem *song in itemsFromGenericQuery)</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">{</span></p>
<p style="padding-left: 60px;"><span style="color: #993300">NSString *mysong = [song valueForProperty: MPMediaItemPropertyTitle];</span></p>
<p style="padding-left: 60px;"><span style="color: #993300">if([mysong isEqualToString:songtitle])</span></p>
<p style="padding-left: 60px;"><span style="color: #993300">{</span></p>
<p style="padding-left: 90px;"><span style="color: #993300">iPodMusicPlayer=[MPMusicPlayerController iPodMusicPlayer];</span></p>
<p style="padding-left: 90px;"><span style="color: #993300">[iPodMusicPlayer setNowPlayingItem:song];</span></p>
<p style="padding-left: 90px;"><span style="color: #993300">[iPodMusicPlayer play];</span></p>
<p style="padding-left: 90px;"><span style="color: #993300">break;</span></p>
<p style="padding-left: 60px;"><span style="color: #993300">}</span></p>
<p style="padding-left: 30px;"><span style="color: #993300">}</span></p>
<p><span style="color: #993300"> </span></p>
<p><strong>Using Facebook Connect on iPhone</strong></p>
<p><a href="http://wiki.developers.facebook.com/index.php/Facebook_Connect_for_iPhone">Facebook Connect </a>used in iPhone lets user connect to their facebook account. I am facing one problem in maintaining session of facebook. The sample application provided with facebook sdk allows user to stay logged-in even if iPhone application is terminated. So, the user will not have to enter facebook account username and password next time.</p>
<p>We can know the status of user if he is logged in by using -</p>
<p style="padding-left: 30px;"><span style="color: #993366;">(void)dialogDidSucceed:(NSURL*)url  and – (void)sessionDidLogout:(FBSession*)session method from FBLoginDialog.m.</span></p>
<p>Whenever user logsin using facebook account, the session will stored using NSUserDefaults. We can know this by tracking -(void)save; method in FBSession.m file.</p>
<p>The save method in FBSession.m  stores 4 objects in userdefaults: FBUserId, FBSessionKey, FBSessionSecret and FBSessionExpires.</p>
<p>I am facing problem here. Whenever I try to resume previous session, using -(BOOL)resume; method in FBSession.m, I get correct userid, but rest of the values will be nil. i.e.session key, sesison secret and session expirary date are nil. So, I get one fatal error at that time saying: “attempt to insert nil value (key: session_key)”  I am still trying to find out the solution for that.</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/09/google-map-camera-ipod-library-and-facebook-connect-with-iphone/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Efficient Usage Of FCKEditor</title>
		<link>http://dev.digi-corp.com/2009/09/efficient-usage-of-fckeditor/</link>
		<comments>http://dev.digi-corp.com/2009/09/efficient-usage-of-fckeditor/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 10:46:24 +0000</pubDate>
		<dc:creator>amit.shah</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1420</guid>
		<description><![CDATA[Table of Contents 

 Introduction
 What is FCKEditor?
 When Should We Use FCKEditor? 
 The features that attracts the user to use it 
 What are improvement needs in it?
 Integrate FCKEditor    Step by Step
 How to apply Themes
 How to apply Language
 Conclusion 
 Bibliography 
 References 
 History

Introduction
There are many editors available in [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Table of Contents </strong></p>
<ul>
<li> <span style="text-decoration: underline;">Introduction</span></li>
<li> <span style="text-decoration: underline;">What is FCKEditor?</span></li>
<li> <span style="text-decoration: underline;">When Should We Use FCKEditor? </span></li>
<li> <span style="text-decoration: underline;">The features that attracts the user to use it </span></li>
<li> <span style="text-decoration: underline;">What are improvement needs in it</span>?</li>
<li> <span style="text-decoration: underline;">Integrate FCKEditor    Step by Step</span></li>
<li> <span style="text-decoration: underline;">How to apply Themes</span></li>
<li> <span style="text-decoration: underline;">How to apply Language</span></li>
<li> <span style="text-decoration: underline;">Conclusion </span></li>
<li> <span style="text-decoration: underline;">Bibliography </span></li>
<li> <span style="text-decoration: underline;">References </span></li>
<li> <span style="text-decoration: underline;">History</span></li>
</ul>
<p><strong>Introduction</strong></p>
<p>There are many editors available in the market. Each editor has its own features, benefits and drawbacks. FCKEditor is top one of them in Open Source category. In this article, I will explain some of good features.</p>
<p><strong>What is FCKEditor?</strong></p>
<p>FCKEditor   is HTML text editor brings to the web much of the power of desktop editors like MS Word. FCKEditor is powerful tool which provides the html editing, theme to suit your web interface, multiple language supports, selection of tools to be displayed as per requirement, image upload, flash file upload and many more. It&#8217;s <strong>lightweight</strong> and doesn&#8217;t require any kind of installation on the client computer.</p>
<p><strong>The features that attracts the user to use it</strong></p>
<ol>
<li>Open source</li>
<li>User friendly and easy      to integrate</li>
<li>Toolbar selection      facility</li>
<li>Support of multiple      language</li>
<li>Support of skin to      suite web page UI</li>
<li>Light weight</li>
<li>Image and flash file      upload</li>
</ol>
<p><strong>The improvement which could be done</strong></p>
<ol>
<li>Inbuilt facility to      select theme at client side</li>
<li>Inbuilt facility to      select language at client side</li>
<li>More font type and font      size to improve user interface</li>
</ol>
<p><strong>Integrate FCKEditor Step by Step</strong></p>
<ol>
<li>Download FCKEditor  source code from following link: <a href="http://sourceforge.net/projects/fckeditor/files/FCKeditor/2.6.4.1/FCKeditor_2.6.4.1.zip/download">http://sourceforge.net/projects/FCKEditor      /files/FCKEditor /2.6.4.1/FCKEditor _2.6.4.1.zip/download </a></li>
<li style="text-align: left;">Create new/ Open existing web project/ website <img class="aligncenter size-full wp-image-1428" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/1.CreateWbsite1.png" alt="1.CreateWbsite" width="500" height="537" /></li>
<li>Copy FCKEditor source code folder and paste it to website root directory. <img class="aligncenter size-full wp-image-1424" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/2.Pastfckeditor.png" alt="2.Pastfckeditor" width="500" height="537" /></li>
<li>Copy FCKEditor  FredCK.FCKEditor V2.dll file from source code and paste it to website <strong>Bin</strong> folder <img class="aligncenter size-full wp-image-1425" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/3.DllPaste.png" alt="3.DllPaste" width="500" height="537" /></li>
<li>You have to register FCKEditor      to use it in your page. There are two way to register it. Manual: Following script will register it.  You have add this script in every page you want to use FCKEditor. <img class="aligncenter size-full wp-image-1426" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/4.PlaceFckeditor.png" alt="4.PlaceFckeditor" width="500" height="311" />From Toolbar: : You can Otherwise, you can browse FCKEditor by right click on Toolbar &gt;&gt; Choose Items. A dialog box will appear as shown in following image. Select .Net Framework Components &gt;&gt; Click on Browse button located at right hand bottom. Choose the .dll of FCKEditor from the bin directory of your application. An item called FCKEditor will be added to your Toolbar. Now you are ready to drag and drop editor in your page. If you place editor in your page, it will also add same code in your web page as we have done in manual method. <img class="aligncenter size-full wp-image-1422" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/ChooseFckEditorfrom.PNG" alt="ChooseFckEditorfrom" width="500" height="421" /></li>
<li>Run <!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-hansi-font-family:Calibri;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;} --> <!--[endif]--><span>website, you can see the FCKEditor in your browser with default theme and default English language. <img class="aligncenter size-full wp-image-1427" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/5.RunFCKEditor.png" alt="5.RunFCKEditor" width="500" height="516" /></span></li>
</ol>
<p><strong>How to apply Theme?</strong></p>
<p>FCKEditor   having a great themeing feature. User can apply the theme in two ways. One way is dynamically and another statically. The site of FCKEditor provides 3 themes to be downloading. There are many third party open source themes available to download. I have shared few themes with this article.</p>
<p>[1]. Default Theme</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1430" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/DefaultTheme.png" alt="DefaultTheme" width="500" height="313" />[2]. Office2003 Theme</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1431" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/Office2003Theme.png" alt="Office2003Theme" width="500" height="317" /></p>
<p style="text-align: center">[3]. Silver Theme<img class="aligncenter size-full wp-image-1432" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/SiverTheme.png" alt="SiverTheme" width="500" height="315" /></p>
<p>Now, how can assign default theme and apply dynamic theme?</p>
<p>Answer is here:</p>
<p>First of all you can set default theme from fckconfig.js, look at below image:</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1435" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/1.setdefaultTheme.png" alt="1.setdefaultTheme" width="500" height="384" /></p>
<p>You can also set the language from .aspx /html /php page where you have declare FCKEditor  .</p>
<p>Just set the SkinPath Property.</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1436" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/2.applytheme.png" alt="2.applytheme" width="500" height="486" /></p>
<p>Now run the application you can view the office2003 theme in FCKEditor as you have set in above page.</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1434" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/3.ThemePreview.png" alt="3.ThemePreview" width="500" height="307" /></p>
<p><strong>How to apply Language?</strong></p>
<p>FCKEditor   provides a great multiple language support feature. User can able to change the language dynamically or set default language as per website language.</p>
<p>FCKEditor provides 56 languages that is you can use as per your requirement.</p>
<p>Now, how can assign default language or apply dynamic language?</p>
<p>Answer is here:</p>
<p>First of all you can set default language from fckconfig.js, look at below image:</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1439" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/1.configsetting.png" alt="1.configsetting" width="500" height="333" /></p>
<p>You can also set the language from .aspx /.html /.php page where you have declare FCKEditor.</p>
<p style="text-align: center">Just set the DefaultLanguage Property.<img class="aligncenter size-full wp-image-1437" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/2.Setlanguage.png" alt="2.Setlanguage" width="500" height="624" /></p>
<p>Now run the application you can view the Arabic language in FCKEditor as you have set in above page.</p>
<p style="text-align: center"><img class="aligncenter size-full wp-image-1438" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/3.LanguagePreview.png" alt="3.LanguagePreview" width="500" height="294" /></p>
<p><strong>Conclusion</strong></p>
<p>FCKEditor   is very simple, easy to integrate and can be used in almost all the web application as html editor/ rich textbox editor.</p>
<p><strong>Bibliography</strong></p>
<p><a href="http://ckeditor.com/">FCKEditor</a></p>
<p><strong>References</strong></p>
<p><a href="http://ckeditor.com/">FCKEditor</a></p>
<p><strong>History</strong></p>
<p>4<sup>th</sup> September, 2009: initial post</p>
<div style="overflow: hidden; width: 1px; height: 1px;"><!--[if !mso]&gt; &lt;!  v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} --> <!--[endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-US X-NONE X-NONE              MicrosoftInternetExplorer4              &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--  /* Font Definitions */  @font-face 	{font-family:Wingdings; 	panose-1:5 0 0 0 0 0 0 0 0 0; 	mso-font-charset:2; 	mso-generic-font-family:auto; 	mso-font-pitch:variable; 	mso-font-signature:0 268435456 0 0 -2147483648 0;} @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:roman; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face 	{font-family:Calibri; 	panose-1:2 15 5 2 2 2 4 3 2 4; 	mso-font-charset:0; 	mso-generic-font-family:swiss; 	mso-font-pitch:variable; 	mso-font-signature:-1610611985 1073750139 0 0 159 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0in; 	margin-right:0in; 	margin-bottom:10.0pt; 	margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-fareast-font-family:"Times New Roman"; 	mso-bidi-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	mso-ascii-font-family:Calibri; 	mso-hansi-font-family:Calibri;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.0in 1.0in 1.0in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;}  /* List Definitions */  @list l0 	{mso-list-id:1457062260; 	mso-list-type:hybrid; 	mso-list-template-ids:1319153846 67698703 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} @list l0:level1 	{mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-.25in; 	font-family:"Courier New";} ol 	{margin-bottom:0in;} ul 	{margin-bottom:0in;} --><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:&quot;Table Normal&quot;; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-qformat:yes; 	mso-style-parent:&quot;&quot;; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;} --> <!--[endif]--></p>
<ol style="margin-top: 0in" type="1">
<li class="MsoNormal"><span style="font-size: 12pt;line-height: 115%">Run<br />
</span></li>
<li class="MsoNormal"><span style="font-size: 12pt;line-height: 115%"> </span></li>
<li class="MsoNormal"><span style="font-size: 12pt;line-height: 115%">website, you can      see the FCKEditor in your browser with default theme and default English      language. </span></li>
</ol>
<p><span><!--[if gte vml 1]&gt;                    &lt;![endif]--><!--[if !vml]--><img src="/DOCUME%7E1/AMIT%7E1.SHA/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image002.jpg" alt="" width="624" height="449" /><!--[endif]--></span></div>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/09/efficient-usage-of-fckeditor/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>iPhone Application Deployment Steps</title>
		<link>http://dev.digi-corp.com/2009/09/iphone-application-deployment-steps/</link>
		<comments>http://dev.digi-corp.com/2009/09/iphone-application-deployment-steps/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 07:24:10 +0000</pubDate>
		<dc:creator>vivek.navadia</dc:creator>
				<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Code Signing]]></category>
		<category><![CDATA[Entitlements]]></category>
		<category><![CDATA[iPhone Deployment]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1218</guid>
		<description><![CDATA[Following steps may help you deploying your application successfully on the device.

Download      your .mobileprovision and .cer certificates from developer.apple.com      website.
Add      the certificates to your keychain in Mac.
Add      your mobile provision certificate in Xcode project. Drag [...]]]></description>
			<content:encoded><![CDATA[<p>Following steps may help you deploying your application successfully on the device.</p>
<ul>
<li>Download      your .mobileprovision and .cer certificates from developer.apple.com      website.</li>
<li>Add      the certificates to your keychain in Mac.</li>
<li>Add      your mobile provision certificate in Xcode project. Drag the certificate      to Xcode in left pane of window and drop there.</li>
<li>Select the Project and go to Edit <strong>Project Settings</strong></li>
</ul>
<p><img class="alignnone size-full wp-image-1412" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/1_New.jpg" alt="1_New" width="456" height="325" /></p>
<ul>
<li>Select <strong>Build</strong> Tab</li>
<li>Select      Configuration as <strong>Release</strong></li>
<li>Go      to code signing</li>
<li>Add      your certificate in <strong>Any iPhone OS Device</strong> section</li>
<li>When      you add certificate in for Code Signing Identity, then it must be in list      of Any iPhone OS Device option.</li>
</ul>
<p><img class="alignnone size-full wp-image-1416" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/2.jpg" alt="2" width="466" height="512" /></p>
<ul>
<li>Follow      same steps for <strong>Debug</strong> configuration also.</li>
<li>Do      same change for <strong>Debug</strong> and <strong>Release</strong> configuration      in <strong>Edit Active Target “Project Name”</strong> setting also</li>
</ul>
<p><img class="alignnone size-full wp-image-1417" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/3.jpg" alt="3" width="459" height="323" /></p>
<ul>
<li>Edit      the <strong>ProjectName</strong>-info.plist file in resources group and change      the company name with yourcompany name on which you have registered your      certificate in following value com.<strong>digicorp</strong>.${PRODUCT_NAME:rfc1034identifier}      and save the project.</li>
</ul>
<p><img class="alignnone size-full wp-image-1418" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/4.jpg" alt="4" width="453" height="319" /></p>
<ul>
<li>To      solve invalid entitlement issue first right click on application and add      new file</li>
<li>Under      the iPhone OS select <strong>Code Signing</strong></li>
<li>Select      the <strong>Entitlements</strong></li>
<li>Make      sure it is saved as <strong>Entitlements.plist</strong></li>
</ul>
<p><img class="alignnone size-full wp-image-1415" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/5.jpg" alt="5" width="449" height="334" /></p>
<ul>
<li>Now      uncheck the box of get-task-allow property in <strong>Entitlements.plist</strong></li>
</ul>
<p><img class="alignnone size-full wp-image-1414" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/6.jpg" alt="6" width="438" height="308" /></p>
<ul>
<li>Set      the <strong>Any iPhone OS Device</strong> with saved entitlements      certificate under Code Signing Entitlements for Debug and Release      configuration.</li>
</ul>
<p><img class="alignnone size-full wp-image-1413" src="http://dev.digi-corp.com/wp-content/uploads/2009/08/7.jpg" alt="7" width="456" height="507" /></p>
<ul>
<li>Set      the device OS for which you want to deploy your application from top left      bar of <strong>Xcode window</strong>.</li>
<li>Save      the <strong>Project</strong> and Build it.</li>
</ul>
<p>It will successfully deploy your <strong>application</strong> on device.</p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/09/iphone-application-deployment-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CLR Stored Procedure in Linq based n-tier architecture</title>
		<link>http://dev.digi-corp.com/2009/09/clr-stored-procedure-in-linq-based-n-tier-architecture/</link>
		<comments>http://dev.digi-corp.com/2009/09/clr-stored-procedure-in-linq-based-n-tier-architecture/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 06:38:11 +0000</pubDate>
		<dc:creator>virat.kothari</dc:creator>
				<category><![CDATA[asp.net]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[clr]]></category>
		<category><![CDATA[clr stored procedure]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[n-tier]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[virat]]></category>
		<category><![CDATA[virat kothari]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1472</guid>
		<description><![CDATA[

Download Source Code &#8211; 143.73 KB
Download SQL Script &#8211; 2.29 KB

Table of contents

Introduction
Define Tiers for the Application
Role of Tiers
Implementing CLR Stored Procedure in LINQ based n-tier Architecture Step by Step
Steps to Create Architecture
Using the code
Conclusion
Points of Interest
History

Introduction
This article is a sequence of my previous article about “CLR Stored Procedure &#38; creating it step by step”. [...]]]></description>
			<content:encoded><![CDATA[<div>
<ul class="Download">
<li><a title="Click to download demo" href="http://dev.digi-corp.com/wp-content/uploads/2009/09/ClrInNTierArchitecture.zip" target="_self">Download Source Code &#8211; 143.73 KB</a></li>
<li><a title="Click to download script" href="http://dev.digi-corp.com/wp-content/uploads/2009/09/Script.zip" target="_self">Download SQL Script &#8211; 2.29 KB</a></li>
</ul>
<h2><span style="color: #333399">Table of contents</span></h2>
<ol>
<li>Introduction</li>
<li>Define Tiers for the Application</li>
<li>Role of Tiers</li>
<li>Implementing CLR Stored Procedure in LINQ based n-tier Architecture Step by Step</li>
<li>Steps to Create Architecture</li>
<li>Using the code</li>
<li>Conclusion</li>
<li>Points of Interest</li>
<li>History</li>
</ol>
<h2><span style="color: #333399">Introduction</span></h2>
<p>This article is a sequence of my previous article about “<a title="Creating CLR Stored Procedures Step by Step" href="http://www.codeproject.com/KB/cs/CLR_Stored_Procedure.aspx" target="_blank">CLR Stored Procedure &amp; creating it step by step</a>”. In my previous article I have explained CLR Stored Procedure, benefits &amp; drawbacks of it and also how to implement it. CLR Stored Procedure is very powerful and gives better results while executing complex logic, intense string operation or string manipulations, cryptography, accessing system resources and file management, etc. Development of any project in n-tier architecture is different taste and having its own benefits and drawbacks. Microsoft has launched LINQ i.e. Language Integrated Query with .net framework 3.0. LINQ can be implemented in variety of ways for e.g. LINQ with SQL, LINQ with objects, LINQ with dataset and LINQ with xml etc. I have implemented simple n-tier architecture few years back in my company. It is suitable for both web as well as desktop applications. It is a centralized n-tier architecture i.e. all the objects are resides at the same place in the target system. I don’t claim this as best but I have implemented this architecture as I want at least following benefits out of it.</p>
<ol>
<li>It must be secure, easy to implement and easy to deploy</li>
<li>It must be tiered based and at least 3 tiered so that if we change code of any tier, we need to deploy dll of that tier only.</li>
<li>Single architecture for web and desktop application with standard application performance</li>
<li>Parallel development should be possible i.e. one developer can work with database, another can work with business logic and one more can work with user interface and so on</li>
<li>No in-line SQL queries</li>
<li>It must not be complex so that new developer can easily set on development without undergoing long training and existing developers can be easily migrated to and from any of the projects as basic development architecture of all the projects will remain same</li>
</ol>
<h2><span style="color: #333399">Define Tiers for the Application</span></h2>
<p align="baseline">Now, let me explain various tiers of the architecture. Any good architecture will consist at least 3 important tiers viz. 1) User Interface or Presentation Layer 2) Business Logic Layer 3) Data Layer. The architecture which I am going to explain have 5 tiers. Any architecture having more than 3 tiers is called n-tier architecture. Following image will clarify it.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/Architecture.png"><img class="alignnone size-large wp-image-1484" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/Architecture-865x1024.png" alt="Architecture" width="533" height="631" /></a></p>
<p>Following is the image showing architecture in our application. It contains following 4 tiers (see image) and 1 database so total 5 tiers.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/SolutionExplorer.png"><img class="alignnone size-full wp-image-1496" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/SolutionExplorer.png" alt="SolutionExplorer" width="533" height="948" /></a></p>
<h2><span style="color: #333399">Role of Tiers</span></h2>
<p>Let me explain each of above tier in brief.</p>
<ol>
<li><strong>Tier – 1: Presentation Layer:</strong> This layer will be responsible for various activities between Users and application. All the user interface related logic will reside at this layer. That means web forms or Win forms will reside here. This layer does not have direct access to the database or Data Access Layer. So, all the data goes in or comes out to Presentation Layer will be through the Business Logic Layer only. <em>A reference of Business Logic Layer will be added to this layer.</em> A separate project will be there for this layer.</li>
<li><strong>Tier – 2: Business Logic Layer:</strong> Business Logic Layer will perform all the Business Logics of the application. Business logic consists of two things viz., Core business logic and Data access logic. Data access logic is been segregated to different layer to provide more security and data encapsulation to the application. There will be a separate class for each table of the database to provide better management, in this layer. This class will have various methods. Business logic will be applied to data coming from or going to Presentation Layer and Data Access Layer. <em>A reference of Data Access Layer will be added to this layer</em>. A separate project will be there for this layer.</li>
<li><strong>Tier – 3: Data Access Layer:</strong> This layer is a part of Business logic but is separated from core business logic. All the data related operations between application and database will be performed over here. This layer will be created using “LINQ”. One LINQ to SQL class will be created over here and all the needed database tables or Stored Procedures will be dragged and dropped over here. This layer will have minimum manual coding. A separate project will be there for this layer.</li>
<li><strong>Tier – 4: CLR Stored Procedure Layer:</strong> This layer will be responsible for defining various CLR Stored Procedures. There will be a separate class for each table of the database to provide better management, in this layer. This layer is not directly associated with Presentation Layer, Business Logic Layer or Data Access Layer. CLR Stored Procedure will be deployed to SQL server. A separate project will be there for this layer. To know, what is CLR Stored Procedure and how to create it refer my article “<a title="Creating CLR Stored Procedures Step by Step" href="http://www.codeproject.com/KB/cs/CLR_Stored_Procedure.aspx" target="_blank">CLR Stored Procedure and Creating It Step by Step</a>”.</li>
<li><strong>Tier – 5: Database: </strong>This is core data and other objects to maintain and access it. For e.g. SQL server database. Core data is data in various tables and objects to maintain &amp; access such data are various tables, Stored Procedures, CLR Stored Procedures, Views and Functions etc.</li>
</ol>
<p>Physically there are 5 layers but logically they are 4 layers as assembly of CLR Stored Procedure will be the part of Database at the time of deployment.</p>
<p>To add reference of one project to another project is very simple. Just right click on the project &gt;&gt; Click on Add Reference. A dialog box will be displayed. Select &#8220;Projects&#8221; tab and select appropriate project in the list of projects. Click &#8220;OK&#8221; button. We can not add circular reference within project for e.g. In our case, Presentation Layer refers to Bussiness Layer and Business Layer refers to Data Access Layer. Now, we can not add reference of Presentation Layer to Data Access Layer as it will create circular reference.</p>
<h2><span style="color: #333399">Implementing CLR Stored Procedure in LINQ based n-tier Architecture Step by Step</span></h2>
<p>Let us implement CLR Stored Procedure in LINQ based n-tier architecture. I have listed all SQL statements used for creating database, creating table, inserting dummy records in the table, etc. in the script attached with this article.</p>
<p><strong>Application Development Specification</strong></p>
<ul>
<li>IDE: Visual Studio 2008</li>
<li>Framework: 3.5 with SP 1</li>
<li>Language: C# 3.0</li>
<li>Database: Microsoft SQL Server 2005 Express edition</li>
<li>Operating system: Windows XP with SP 2</li>
</ul>
<h2><span style="color: #333399">Steps to Create Architecture</span></h2>
<p>1. Open Microsoft Visual Studio 2008 &gt;&gt; Create New Project. A dialog box will be opened. Select, Visual C# &gt;&gt; Windows on left side “Project Types” panel. Select, “Windows Forms Application” on right side “Templates” panel. Give proper name to project, solution and select location to save this solution. This project will be our presentation layer. Following image will make it clear.</p>
<p align="baseline"><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/1.PNG"><img class="alignnone size-full wp-image-1481" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/1.PNG" alt="1" width="534" height="387" /></a></p>
<p align="baseline">A default form with the name “Form1” will be created with the project. Rename it to “Demo”. Design it as shown in following image. There is a Label control for heading, one Data Grid View control, a Group Box control to hold various buttons viz., Get Data, Insert Random Record, Delete Selected Record, Clear Grid and Exit. Following image will make it clear.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/BlankDemoForm.PNG"><img class="alignnone size-full wp-image-1485" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/BlankDemoForm.PNG" alt="BlankDemoForm" width="536" height="357" /></a></p>
<p align="baseline">
<p align="baseline">2.    Right click on Solution, click on Add &gt;&gt; New Project. A dialog box will be opened. Select, Database Projects &gt;&gt; Microsoft SQL Server &gt;&gt; SQL CLR on left side “Project Types” panel. Select, “SQL Server Project” on right side “Templates” panel. Give proper name to project and select location to save this solution. This project will be our CLR Stored Procedure Layer. Follow the steps I have explained in my article “<a title="CLR Stored Procedure and Creating It Step by Step" href="http://www.codeproject.com/KB/cs/CLR_Stored_Procedure.aspx" target="_blank">CLR Stored Procedure and Creating It Step by Step</a>” to add CLR Stored Procedure in this project. Following image will make it clear.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/SQLServerProject.PNG"><img class="alignnone size-full wp-image-1497" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/SQLServerProject.PNG" alt="SQLServerProject" width="533" height="367" /></a></p>
<p align="baseline">
<p align="baseline">Right click on the project &gt;&gt; Select Add &gt;&gt; Add New Items. A dialog box will be displayed as shown in following image. Select Visual C# Items from left &#8220;Categories&#8221; panel. Select Stored Procedure from right side &#8220;Templates&#8221; panel. Give proper name to it.</p>
<p align="baseline"><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/AddClrSP.PNG"><img class="alignnone size-full wp-image-1483" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/AddClrSP.PNG" alt="AddClrSP" width="532" height="344" /></a></p>
<p align="baseline">
<p align="baseline">3.    Right click on Solution, click on Add &gt;&gt; New Project. A dialog box will be opened. Select, Visual C# &gt;&gt; Windows on left side “Project Types” panel. Select, “Class Library” on right side “Templates” panel. Give proper name to project and select location to save this solution. This project will be our Business Logic Layer. I have added two classes to this project i.e. 1) “ConvertToDataTable” and 2) “CustomerSalesInformation”. “ConvertToDataTable” class has various methods to convert array of objects to DataTable or DataSet. CustomerSalesInformation class consist various methods to Insert a record, Delete a record and Get records from database. Following image will make it clear.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/BusinessLayer.PNG"><img class="alignnone size-full wp-image-1488" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/BusinessLayer.PNG" alt="BusinessLayer" width="534" height="368" /></a></p>
<p align="baseline">
<p>4.    Once again, Right click on Solution, click on Add &gt;&gt; New Project. A dialog box will be opened. Select, Visual C# &gt;&gt; Windows on left side “Project Types” panel. Select, “Class Library” on right side “Templates” panel (same as step 3). Give proper name to project and select location to save this solution. This project will be our Data Access Layer.</p>
<p align="baseline">
<p align="baseline">5.    Right click on “DataAccessLayer” project, Select Add &gt;&gt; New Item option from the menu. A dialog box shown in following image will be displayed. Select on Visual C# Items in left side “Categories” panel and “Linq to SQL Classes” in right panel “Templates”.</p>
<p align="baseline"><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/LinqToSqlDal.PNG"><img class="alignnone size-full wp-image-1493" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/LinqToSqlDal.PNG" alt="LinqToSqlDal" width="537" height="348" /></a></p>
<p align="baseline">
<p align="baseline">6.    Open Server explorer and click on “Connect to database” button given at<br />
top-middle of the server explorer window. It will start a new wizard to<br />
connect to the database. Now drag and drop Stored Procedures<br />
“CustomerSalesInformationDelete” and<br />
“CustomerSalesInformationInsertRandomRecord”. Do <strong>NOT</strong> drag and drop<br />
“CustomerSalesInformationGet” right now as we need to change it. I have<br />
added “AccessData” class to add various useful methods and variables to<br />
be used on Business Logic Layer. Write now I have declared one private<br />
object of “LinqToSqlDataContext” and exposed it using property “Call”.<br />
Following images will make it clear. Change the connection string I<br />
have statically wrote while declaring object of “LinqToSqlDataContext”.</p>
<p align="baseline"><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/Dbml.PNG"><img class="alignnone size-large wp-image-1491" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/Dbml-1024x621.PNG" alt="Dbml" width="532" height="330" /></a></p>
<p>7.    I have suggested not to drag and drop “CustomerSalesInformationGet” because it is a Stored Procedure which does not contain any SELECT query. That is why if you drag and drop it in .dbml file, the return type of the method of the said Stored Procedure will be “int” instead of ISingleResult and so it will not produce any result which we are expecting from this Stored Procedure. You can see this in .cs file of dbml. The work around I am going to explain is not the standard way but it works fine. Let me know if you find any better option. Following are the steps of the work around.</p>
<blockquote><p><strong>Step 1:</strong> Go to query analyzer and drop the Stored Procedure “CustomerSalesInformationGet” which was automatically created at the time of deploying CLR stored procedure, using following SQL statement.</p></blockquote>
<blockquote>
<pre>DROP PROCEDURE [dbo].[CustomerSalesInformationGet]</pre>
</blockquote>
<blockquote><p><strong>Step 2:</strong> Create new stored procedure with the same name as stored procedure created at the time of deploying CLR stored procedure, using following SQL statements.</p>
<pre>CREATE PROCEDURE [dbo].[CustomerSalesInformationGet]
AS
BEGIN
	SELECT * from CustomerSalesInformation
END</pre>
</blockquote>
<blockquote><p><strong>Step 3:</strong> Now come to the Visual Studio and refresh the “Stored Procedure” element of the tree view. You can simply right click on the element and click on “Refresh” option of the menu or cliking on refresh icon at the top-left of Server Explorer. Now drag and drop “CustomerSalesInformationGet” stored procedure to the .dbml file. This will create a method for the said stored procedure with the return type “ISingleResult”. You can verify this in .cs file of dbml. So this will return the result per our expectation.</p>
<p><strong>Step 4:</strong> Once again go to query analyzer and drop the manually created stored procedure “CustomerSalesInformationGet” using following SQL statement.</p>
<pre>DROP PROCEDURE [dbo].[CustomerSalesInformationGet]</pre>
</blockquote>
<blockquote><p><strong>Step 5:</strong> Now come to the Visual Studio and Right click on “ClrStoredProcedureLayer” project and click on “Deploy” option of the menu. This will deploy CLR stored procedure to the database once again. Now do NOT drag and drop this stored procedure to the dbml file otherwise we have to repeat this whole work around.</p></blockquote>
<p>8.    You have to change connection at two places while using my sample source code.</p>
<blockquote><p>1.    In the “AccessData.cs” file where we have declared an object of “LinqToSqlDataContext”. Following will clarify this.</p></blockquote>
<blockquote>
<pre>private static LinqToSqlDALDataContext objLinqToSqlDALDataContext = _
new LinqToSqlDALDataContext("Data Source=OM\\SQLEXPRESS;Initial Catalog=DbForClrDemo;User ID=sa;Password=airborne");</pre>
</blockquote>
<blockquote><p>2.    In the “CLRStoredProcedureLayer” project. Right click on the said project in solution explorer and click on “Properties”. A screen like following image will be displayed. Select “Database” tab and change the connection string at “Connection String” option where a textbox and Browse button is given.</p>
<p><a title="Changing connection string in CLR Stored Procedure project" href="CLR_SP_Linq_n-tier/ChangeConnectionInClrProject.png" target="_blank"></a><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/ChangeConnectionInClrProject.png"><img class="alignnone size-full wp-image-1489" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/ChangeConnectionInClrProject.png" alt="ChangeConnectionInClrProject" width="492" height="304" /></a></p></blockquote>
<p align="baseline">
<p align="baseline">9.    Save the whole solution. Right click on the solution in solution explorer and click on “Build” option. Now, you can run the application by hitting F5. A dialog box will be opened as shown in following image. Click on “Get Data” button, it will retrieves records from the database and loads in to the grid. “Insert Random Record” will insert random record in the table and once again retrieves records from the database and loads in to the grid. “Delete Selected Record” deletes the selected record. “Clear Grid” button clears the records from the grid. “Exit” button will close and exit the application. Following is the demo of the same.</p>
<p><a href="http://dev.digi-corp.com/wp-content/uploads/2009/09/DemoFormWithData.PNG"><img class="alignnone size-full wp-image-1492" src="http://dev.digi-corp.com/wp-content/uploads/2009/09/DemoFormWithData.PNG" alt="DemoFormWithData" width="531" height="354" /></a></p>
<h2><span style="color: #333399">Using the Code</span></h2>
<ol>
<li>Download the zip files for source code and sql script  and extract them</li>
<li> Create Database and tables using &#8220;Script to create Database and Table.sql&#8221;. Also, insert records in the table using same file</li>
<li>Change connections at 2 places in application as explained in Step 8</li>
<li>Run the demo.</li>
<li>When you hit &#8220;Get Data&#8221; button for the first time, it will take little time to fetch data from database. Now, hit &#8220;Clear Grid&#8221; button and hit &#8220;Get Data&#8221; button once again, you will realize the speed. Also, try to hit &#8220;Insert Random Record&#8221; button continuously for many time. It inserts record to the database and fills the grid at every hit, but still see the speed of it.</li>
<li>This will give little slow performance in web application than windows application.</li>
</ol>
<h2><span style="color: #333399">Conclusion</span></h2>
<p>Clr Stored Procedures can be efficiently implemented in n-tier architecture</p>
<h2><span style="color: #333399">Suggestion</span></h2>
<p>Refer my another article &#8220;<a title="Creating CLR Stored Procedures Step by Step" href="http://www.codeproject.com/KB/cs/CLR_Stored_Procedure.aspx" target="_blank">CLR Stored Procedure and Creating It Step by Step</a>&#8221;</p>
<h2><span style="color: #333399">Points of Interest</span></h2>
<ol>
<li>Exploring IMultipleResult in LINQ.</li>
</ol>
<h2><span style="color: #333399">History</span></h2>
<ol>
<li>08<sup>th</sup> September, 2009: Initial release</li>
</ol>
<p><!-- End Article --></div>
<div style="overflow: hidden; width: 1px; height: 1px;">using System;<br />
using System.Windows.Forms;<br />
using BusinessLayer;</p>
<p>namespace ClrInNTierPresentationLayer<br />
{<br />
/// &lt;summary&gt;<br />
/// Represents demo form for the application<br />
/// &lt;/summary&gt;<br />
public partial class frmDemo : Form<br />
{<br />
#region Constructor</p>
<p>/// &lt;summary&gt;<br />
/// Constructor of the application<br />
/// &lt;/summary&gt;<br />
public frmDemo()<br />
{<br />
InitializeComponent();<br />
}</p>
<p>#endregion</p>
<p>#region Event Handler</p>
<p>#region Buttons</p>
<p>/// &lt;summary&gt;<br />
/// Handles Click event of the button<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;sender&#8221;&gt;&lt;/param&gt;<br />
/// &lt;param name=&#8221;e&#8221;&gt;&lt;/param&gt;<br />
private void btnGetData_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
FillDataGridView();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>/// &lt;summary&gt;<br />
/// Handles Click event of the button<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;sender&#8221;&gt;&lt;/param&gt;<br />
/// &lt;param name=&#8221;e&#8221;&gt;&lt;/param&gt;<br />
private void btnInsertRandomRecord_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
CustomerSalesInformation.CustomerSalesInformationInsertRandomRecord();<br />
FillDataGridView();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>/// &lt;summary&gt;<br />
/// Deletes selected record from the database<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;sender&#8221;&gt;&lt;/param&gt;<br />
/// &lt;param name=&#8221;e&#8221;&gt;&lt;/param&gt;<br />
private void btnDeleteSelectedRecord_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
if (dgvData.Rows.Count &gt; 0)<br />
{<br />
if (MessageBox.Show(&#8221;Are you sure to delete selected record?&#8221;, &#8220;Confirmation&#8221;, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)<br />
{<br />
CustomerSalesInformation.CustomerSalesInformationDelete(Convert.ToDouble(dgvData.CurrentRow.Cells["ID"].Value.ToString()));<br />
FillDataGridView();<br />
}<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>/// &lt;summary&gt;<br />
/// Handles Click event of the button<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;sender&#8221;&gt;&lt;/param&gt;<br />
/// &lt;param name=&#8221;e&#8221;&gt;&lt;/param&gt;<br />
private void btnClearGrid_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
dgvData.DataSource = null;<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>/// &lt;summary&gt;<br />
/// Handles Click event of the button<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;sender&#8221;&gt;&lt;/param&gt;<br />
/// &lt;param name=&#8221;e&#8221;&gt;&lt;/param&gt;<br />
private void btnExit_Click(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
Application.Exit();<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>#endregion</p>
<p>#endregion</p>
<p>#region Private Methods</p>
<p>/// &lt;summary&gt;<br />
/// Fills the data in the DataGridView<br />
/// &lt;/summary&gt;<br />
private void FillDataGridView()<br />
{<br />
try<br />
{<br />
//Filling the grid with data<br />
dgvData.DataSource = CustomerSalesInformation.CustomerSalesInformationGet();</p>
<p>//Formating the columns of the grid<br />
dgvData.Columns[0].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;<br />
dgvData.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;<br />
dgvData.Columns[2].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;</p>
<p>dgvData.Columns[2].DefaultCellStyle.Alignment = DataGridViewContentAlignment.TopRight;<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message, &#8220;Error&#8221;, MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
}</p>
<p>#endregion<br />
}<br />
}</p></div>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/09/clr-stored-procedure-in-linq-based-n-tier-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to integrate Amazon Web Services in your Web Application?</title>
		<link>http://dev.digi-corp.com/2009/09/how-to-integrate-amazon-web-services-in-your-web-application/</link>
		<comments>http://dev.digi-corp.com/2009/09/how-to-integrate-amazon-web-services-in-your-web-application/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 10:48:42 +0000</pubDate>
		<dc:creator>archit.patel</dc:creator>
				<category><![CDATA[Amazon]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[AWS]]></category>

		<guid isPermaLink="false">http://dev.digi-corp.com/?p=1293</guid>
		<description><![CDATA[What is Amazon Web Services (AWS)?
Amazon Web Services (AWS) has provided companies of all sizes with an infrastructure web services platform in the cloud. With AWS you can requisition compute power, storage, and other services–gaining access to a suite of elastic IT infrastructure services as your business demands them.
Amazon Web Services provides a number of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>What is Amazon Web Services (AWS)?</strong><br />
Amazon Web Services (AWS) has provided companies of all sizes with an infrastructure web services platform in the cloud. With AWS you can requisition compute power, storage, and other services–gaining access to a suite of elastic IT infrastructure services as your business demands them.</p>
<p>Amazon Web Services provides a number of benefits for IT organizations which are:cost effective,dependable,flexible.</p>
<p><strong>How  to integrate amazon in your site?</strong><br />
-&gt; You need to get an access_key_id.<br />
-&gt; Authorized your Product API or Access_key.</p>
<p><strong>How to get an access_key_id?</strong><br />
To get an access_key you have to create aws account from the below link:<br />
<a href="https://aws-portal.amazon.com/gp/aws/developer/registration/index.html">https://aws-portal.amazon.com/gp/aws/developer/registration/index.html</a></p>
<p>After submitting the form you will get a mail from amazon. In that mail you will find a link link:<br />
<a href="https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&amp;action=access-key">https://aws-portal.amazon.com/gp/aws/developer/account/index.html?ie=UTF8&amp;action=access-key</a></p>
<p>From this link you will get your access key and private key. Store your public key(access key) and private key(secret key) in your config file. Using this access_key you can access all amazon  books and its details  in your page.</p>
<p><strong>How to make your Product API or Access_key Authorized?</strong><br />
You need to create a two demo files and one function file using below code</p>
<p style="padding-left: 30px;">1) Function file-  aws_signature.php<br />
2) Example file- example1.php<br />
3) Example file- example2.php</p>
<p><strong>1)Make one file named as aws_signature.php</strong><br />
&lt;?php<br />
function aws_signature($location, $params, $public_key, $private_key)<br />
{<br />
$private_key=&#8221;your secret key&#8221;;<br />
$method = &#8220;GET&#8221;;<br />
$hostname = &#8220;ecs.amazonaws.&#8221;.$location;<br />
$uri = &#8220;/onca/xml&#8221;;</p>
<p>// additional parameters<br />
$params["Service"] = &#8220;AWSECommerceService&#8221;;<br />
$params["AWSAccessKeyId"] = $public_key;</p>
<p>// GMT timestamp<br />
$params["Timestamp"] = gmdate(&#8221;Y-m-d\TH:i:s\Z&#8221;);</p>
<p>// API version<br />
$params["Version"] = &#8220;2009-03-31&#8243;;</p>
<p>// sort the parameters<br />
ksort($params);</p>
<p>// create the query<br />
$query = array();<br />
foreach ($params as $param=&gt;$value)<br />
{<br />
$param = str_replace(&#8221;%7E&#8221;, &#8220;~&#8221;, rawurlencode($param));<br />
$value = str_replace(&#8221;%7E&#8221;, &#8220;~&#8221;, rawurlencode($value));<br />
$query[] = $param.&#8221;=&#8221;.$value;<br />
}<br />
$query = implode(&#8221;&amp;&#8221;, $query);<br />
$string_to_sign = $method.&#8221;\n&#8221;.$hostname.&#8221;\n&#8221;.$url.&#8221;\n&#8221;.$query;<br />
$signature = base64_encode(hash_hmac(&#8221;sha256&#8243;, $string_to_sign, $private_key, True));</p>
<p>// create request<br />
$request = &#8220;http://&#8221;.$hostname.$url.&#8221;?&#8221;.$query.&#8221;&amp;Signature=&#8221;.$signature;<br />
// do request<br />
$request=str_replace(&#8221; &#8220;,&#8221;+&#8221;,$request);<br />
$response = @file_get_contents($request);<br />
if ($response === False)<br />
{<br />
return False;<br />
}<br />
else<br />
{<br />
// parse XML<br />
$parsed_xml = simplexml_load_string($response);<br />
if ($parsed_xml === False)<br />
{<br />
return False; // no xml<br />
}<br />
else<br />
{<br />
return $parsed_xml;<br />
}<br />
}<br />
//Note:You can use  $parsed_xml as you requested array.You will get all the records from this array.<br />
?&gt;</p>
<p><strong>2)Make one file named as example1.php</strong><br />
//To get the data for particular ISBN.<br />
&lt;?php<br />
include(‘aws_signature.php’);<br />
$isbn=&#8221;your book isbn value&#8221;;<br />
include(&#8217;aws_signature.php&#8217;);<br />
$public_key = &#8220;your public key&#8221;;<br />
$private_key = &#8220;your private key&#8221;;</p>
<p>//You can select response group from this site:http://docs.amazonwebservices.com/_<br />
AWSECommerceService/2008-03-03    /DG/index.html?ItemLookup.html</p>
<p>//Operation is ItemLookup for Particular item page.<br />
$parsed_xml = aws_signature(&#8221;com&#8221;,  array(&#8221;Operation&#8221;=&gt;&#8221;ItemLookup&#8221;,&#8221;ResponseGroup&#8221;=&gt;&#8221;VariationSummary,_<br />
SalesRank,Medium,Reviews,ItemAttributes,Offers,Images&#8221;,&#8221;ItemId&#8221;=&gt;$isbn),   $public_key, $private_key);<br />
?&gt;</p>
<p><strong>3)Make one file named as example2.php</strong><br />
//To get all books from amazon without knowing any book isbn value.<br />
&lt;?php<br />
include(&#8217;aws_signature.php&#8217;);<br />
$public_key = &#8220;YOur public key&#8221;;<br />
$private_key = &#8220;your private key&#8221;;<br />
$new_keyword=&#8221;Your keyword&#8221;;</p>
<p>//Operation is ItemSearch for all books.<br />
$parsed_xml = aws_signature(&#8221;com&#8221;,   array(&#8221;Operation&#8221;=&gt;&#8221;ItemSearch&#8221;,&#8221;SearchIndex&#8221;=&gt;&#8221;Books&#8221;,&#8221;ResponseGroup&#8221;=&gt;&#8221;VariationSummary,_<br />
SalesRank,Medium,Reviews,ItemAttributes,Offers,Images&#8221;,&#8221;Keywords&#8221;=&gt;$new_keyword),  $public_key, $private_key);<br />
?&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://dev.digi-corp.com/2009/09/how-to-integrate-amazon-web-services-in-your-web-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
