<?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"
	>

<channel>
	<title>Welcome to GlobalLogic Blogs &#187; Technology</title>
	<atom:link href="http://blogs.globallogic.com/category/technology/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.globallogic.com</link>
	<description>Exponential Innovation</description>
	<pubDate>Mon, 30 Jan 2012 06:04:14 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
	<language>en</language>
			<item>
		<title>JSMS Configuration on Various Platforms</title>
		<link>http://blogs.globallogic.com/jsms-configuration-on-various-platforms</link>
		<comments>http://blogs.globallogic.com/jsms-configuration-on-various-platforms#comments</comments>
		<pubDate>Fri, 27 Jan 2012 12:13:48 +0000</pubDate>
		<dc:creator>farida.khan</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[jsms]]></category>

		<category><![CDATA[sms]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1974</guid>
		<description><![CDATA[Introduction
Its been a tough job configuring this API on various platforms for the project. There was no striaght and simple way I could get from even the Internet.
So writing down my own experience I have followed to configure this SMS API on Windows and Linux Platforms. Hope it would be useful for others who would
need [...]]]></description>
			<content:encoded><![CDATA[<h3><span style="18pt;">Introduction</span></h3>
<p>Its been a tough job configuring this API on various platforms for the project. There was no striaght and simple way I could get from even the Internet.<br />
So writing down my own experience I have followed to configure this SMS API on Windows and Linux Platforms. Hope it would be useful for others who would<br />
need this API to be configured in their projects.</p>
<p>JSMS is a Java API for sending and receiving Short Messages (SMS) and Multimedia Messages (MMS). The API supports a wide range of communication protocols.</p>
<p><strong>1. Supported Protocols</strong></p>
<p>Receiving and Sending of messages by using any GSM Device capable of sending SMS messages and also by using the most common SMSC communication protocols:</p>
<ul>
<li>GSM (GSM devices)</li>
<li>UCP (Universal Computing Protocol)</li>
<li>CIMD2 (Computer Interface to Message Distribution)</li>
<li>SMPP (Short Message Peer-to-Peer)</li>
<li>TAP/IXO (Telocator Alphanumeric Protocol)</li>
<li>MM1 (MMS over GPRS)</li>
<li>MM7 (MMS exchange using SOAP messages over http(s))</li>
</ul>
<p><strong>2. Where to get jSMS?</strong></p>
<p>You can download a copy of the jSMS-API from http:// www.objectxp.com /. The API shipped either as a gzipped tar-archive (UTechnix users) or as ZIP-file (Windows users).</p>
<h3><span style="18pt;">Configuration on Windows Platform</span></h3>
<p><strong>Pre-assumption</strong>: Java is installed on the Windows machine and JAVA_HOME is set.</p>
<p>Follow the below steps:<br />
1.  Unzip the downloaded file to your target directory (using a tool like WinZIP)</p>
<p>2.  Copy javax.comm.properties file in the directory jSMS-&lt;ver&gt;\lib to the                        following locations on windows:<br />
JAVA_HOME\jre\lib<br />
JAVA_HOME\jdk&lt;ver&gt;\jre\lib</p>
<p>3. Make the necessary changes in the jsms.conf file which is at path jSMS-&lt;ver&gt;\bin</p>
<p>4. Copy the license properties that you received via email into the jsms.conf file</p>
<p>5. Change the property connector.serial.port to contain the port that you have the GSM device connected to (e.g. COM1).</p>
<p>6. Copy the following DLL files:</p>
<ul>
<li>win32com.dll from path jSMS-&lt;ver&gt;\lib to c:\WINDOWS\system32 folder</li>
<li>jdunxp.dll from path jSMS-&lt;ver&gt;\lib to c:\WINDOWS\system32 folder</li>
</ul>
<p>Now you are ready to send the SMS from your machine through the connected GSM device.</p>
<p><strong>Testing on Windows:</strong></p>
<p>1. Change directory to jSMS-&lt;ver&gt;\bin and double click the sms.bat file</p>
<p>2. Give the recipient’s mobile number</p>
<p>3. Specify the message to be sent</p>
<p>4. The message should be sent to the recipient</p>
<p>If received you have done it! <img src='http://blogs.globallogic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h3><span style="18pt;">Configuration on Linux Platform</span></h3>
<p><strong>Pre-assumption</strong>: Java is installed on the Linux machine and JAVA_HOME is set.</p>
<p>1. Download the java communications API for linux platform from the URL:         <a title="http://www.oracle.com/technetwork/java/index-jsp-141752.html" href="http://www.oracle.com/technetwork/java/index-jsp-141752.html" target="_blank">http://www.oracle.com/technetwork/java/index-jsp-141752.html</a></p>
<p>2. unpack the download zip file using the command:</p>
<p><em><strong>unzip comm3.0_linux.zip</strong></em></p>
<p>3. Install the library using copy command:</p>
<p><strong><em> cp commapi/lib/libLinuxSerialParallel.so</em></strong></p>
<p><strong><em> JAVA_HOME/jre/lib/ext/libLinuxSerialParallel.so</em></strong></p>
<p>4. Install the comm.jar using the copy command:</p>
<p><strong><em> cp commapi/jar/comm.jar</em></strong></p>
<p><strong><em> JAVA_HOME/jre/lib/ext/comm.jar</em></strong></p>
<p>5. Install the javax.comm.properties using the copy command as below:</p>
<p><strong><em> cp commapi/docs/javax.comm.properties</em></strong></p>
<p><strong><em> JAVA_HOME/jre/lib/javax.comm.properties</em></strong></p>
<p>6. Make the necessary changes in the jsms.conf file which is at path jSMS-&lt;ver&gt;\bin</p>
<p>A. Copy the license properties that you received via email into the jsms.conf file.</p>
<p>B. Change the property connector.serial.port to contain the port that you have the GSM device connected to (e.g. dev/ttsy1).</p>
<p>Now you are ready to send the SMS from your machine through the connected GSM device.</p>
<p><strong>Testing on Linux:</strong></p>
<p>1. Open the terminal navigate to the folder <span>jSMS-&lt;ver&gt;\bin</span></p>
<p>2. Execute the sms.sh file using the below command:</p>
<p><strong><em>sh ./sms.sh</em></strong></p>
<p>3. Give the recipient’s mobile number.</p>
<p>4. Specify the message to be sent.</p>
<p>5. The message should be sent to the recipient</p>
<p>If received you have done it! <img src='http://blogs.globallogic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/jsms-configuration-on-various-platforms/feed</wfw:commentRss>
		</item>
		<item>
		<title>C# Fundamentals - Commonly compared concepts (differences)</title>
		<link>http://blogs.globallogic.com/c-fundamentals-commonly-compared-concepts-differences</link>
		<comments>http://blogs.globallogic.com/c-fundamentals-commonly-compared-concepts-differences#comments</comments>
		<pubDate>Sun, 22 Jan 2012 17:21:47 +0000</pubDate>
		<dc:creator>Bhala Ganpatye</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[C# .NET]]></category>

		<category><![CDATA[C# OOP]]></category>

		<category><![CDATA[Delegate vs. Interface]]></category>

		<category><![CDATA[Interface vs. Abstract Class]]></category>

		<category><![CDATA[Override vs. Overload]]></category>

		<category><![CDATA[Value Type vs. Reference Type]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1953</guid>
		<description><![CDATA[I have been asked many time questions like 


When should I use an abstract class and when I should use an interface?


What is difference between delegate and event?


Although people know few points of differences, it’s worth to consolidate as many as differences as we can. So I am trying to provide most of the points [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">I have been asked many time questions like </span></span></span></p>
<ul>
<li>
<div class="MsoListParagraphCxSpFirst" style="l0 level1 lfo1;"><span lang="EN-US"><span style="small;"><span style="Calibri;">When should I use an abstract class and when I should use an interface?</span></span></span></div>
</li>
<li>
<div class="MsoListParagraphCxSpLast" style="l0 level1 lfo1;"><span lang="EN-US"><span style="small;"><span style="Calibri;">What is difference between delegate and event?</span></span></span></div>
</li>
</ul>
<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Although people know few points of differences, it’s worth to consolidate as many as differences as we can. So I am trying to provide most of the points that can not only compares various concepts, but also helps developers understand concepts better way.</span></span></span></p>
<h2><span lang="EN-US"><span style="medium;"><span style="#17365d;"><span style="Calibri;">Override vs. Overload</span></span></span></span></h2>
<table class="MsoNormalTable" style="0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0" width="600">
<tbody>
<tr style="yes;">
<td style="windowtext 1pt solid;" width="275">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="Calibri;" lang="EN-US"><span style="small;"><span style="Calibri;">Overriding</span></span></span></strong></p>
</td>
<td style="solid windowtext .5pt;" width="275">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="Calibri;" lang="EN-US"><span style="small;"><span style="Calibri;">Overloading</span></span></span></strong></p>
</td>
</tr>
<tr style="1;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The argument list must exactly match as that of the overridden method</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overloaded methods must change the argument list (type and/or numbers of arguments)</span></span></span></p>
</td>
</tr>
<tr style="2;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The return type must exactly match as that of the overridden method</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overloaded methods can change the return type</span></span></span></p>
</td>
</tr>
<tr style="3;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The access level can be same or less restrictive than that of the overridden method. (more restrictive not allowed)</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overloaded methods can change the access modifier. Methods can have difference access modifiers</span></span></span></p>
</td>
</tr>
<tr style="4;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The overriding method must not throw new or broader checked exceptions than those declared by the overridden method. But it can throw narrower or fewer exceptions. Just because an overridden method “takes risks” doesn’t mean that the overriding subclass’ exception takes the same risks. Bottom line: An overriding method doesn’t have to declare any exceptions that it will never throw, regardless of what the overridden method declares.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overloaded methods can declare new or broader checked exceptions.</span></span></span></p>
</td>
</tr>
<tr style="5;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You cannot override a method marked as sealed</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You cannot overload a method just by changing only return type</span></span></span></p>
</td>
</tr>
<tr style="6;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You can override method in derived class only</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">A method can be overloaded in the same class or in a subclass. </span></span></span></p>
</td>
</tr>
<tr style="7;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You can override only non-static method</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You can overload both static and non-static method</span></span></span></p>
</td>
</tr>
<tr style="8;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Runtime polymorphism</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Compile time polymorphism</span></span></span></p>
</td>
</tr>
<tr style="yes;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overriding also applies to property and event</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Overloading also applies to operator</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"> </span></span></p>
<h2><span lang="EN-US"><span style="medium;"><span style="#17365d;"><span style="Calibri;">Interface vs. Abstract Class</span></span></span></span></h2>
<table class="MsoNormalTable" style="0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0" width="600">
<tbody>
<tr style="yes;">
<td style="windowtext 1pt solid;" width="100">
<p class="MsoNormal" style="0in 0in 0pt;"><em><span style="Calibri;" lang="EN-US">Feature</span></em></p>
</td>
<td style="solid windowtext .5pt;" width="200">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="Calibri;" lang="EN-US">Interface</span></strong></p>
</td>
<td style="solid windowtext .5pt;" width="200">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="Calibri;" lang="EN-US">Abstract</span></strong><span style="Calibri;" lang="EN-US"> <strong>class</strong></span></p>
</td>
</tr>
<tr style="1;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Inheritance in class</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">A class may inherit several interfaces.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">A class may inherit only one abstract class.</span></span></span></p>
</td>
</tr>
<tr style="2;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Inheritance in structure</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An Interface can be inherited by structures.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An abstract class cannot be inherited by structures</span></span></span></p>
</td>
</tr>
<tr style="3;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Inheritance to self</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Interface can inherit only interface(s)</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An abstract class may inherit one abstract class and/or multiple interfaces</span></span></span></p>
</td>
</tr>
<tr style="4;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Default implementation</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An interface cannot provide any code, just the signature. Implicit Abstract</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An abstract class can provide complete, default code and/or just the details that have to be overridden.</span></span></span></p>
</td>
</tr>
<tr style="5;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Access Modifiers</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An interface cannot have access modifiers for members. everything is assumed as public</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An abstract class can contain access modifiers for the methods, properties</span></span></span></p>
</td>
</tr>
<tr style="6;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Adding functionality </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Changing member or adding new member breaks the classes implementing interface. So all subclasses must change implementation </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">If we add a new method to an abstract class then we have the option of providing default implementation and therefore all the existing code might work properly.</span></span></span></p>
</td>
</tr>
<tr style="7;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Allowed Members</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">properties, methods, events</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">properties, methods, events, fields, constants, delegates</span></span></span></p>
</td>
</tr>
<tr style="8;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Constructors</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An Interface cannot contain constructors or destructors. </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">An abstract class can contain constructors or destructors. </span></span></span></p>
</td>
</tr>
<tr style="yes;">
<td style="solid windowtext .5pt;" width="100" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;"> </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Contract</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="200" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Common behavior</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"> </span></span></p>
<h2><span lang="EN-US"><span style="medium;"><span style="#17365d;"><span style="Calibri;">Value Type vs. Reference Type</span></span></span></span></h2>
<table class="MsoNormalTable" style="0in 5.4pt 0in 5.4pt;" border="1" cellspacing="0" cellpadding="0" width="600">
<tbody>
<tr style="yes;">
<td style="windowtext 1pt solid;" width="275" valign="bottom">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="EN-GB;"><span style="small;"><span style="Calibri;">Value Type / Struct</span></span></span></strong></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="bottom">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="EN-GB;"><span style="small;"><span style="Calibri;">Reference Type</span></span></span></strong></p>
</td>
</tr>
<tr style="1;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Variables that are based on value types directly contain values. Assigning one value type variable to another copies the contained value. </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The assignment of reference type variables, copies a reference to the object but not the object itself.</span></span></span></p>
</td>
</tr>
<tr style="2;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Value types derive from System.ValueType, which derives from System.Object</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Reference types are derived from System.Object</span></span></span></p>
</td>
</tr>
<tr style="3;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Value types are sealed. you cannot derive a new type from a value type. However, like reference types, structs can implement interfaces.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">You can derive a new type from another reference type or class</span></span></span></p>
</td>
</tr>
<tr style="4;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">A value type cannot contain the null value. However, the nullable types feature does allow for values types to be assigned to null. </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Reference types can be null</span></span></span></p>
</td>
</tr>
<tr style="5;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Each value type has an implicit default constructor that initializes the default value of that type.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Explicit constructor need to be called to hold data</span></span></span></p>
</td>
</tr>
<tr style="6;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">Value type variables directly contain their values which means that the memory is allocated inline in whatever context the variable is declared.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">The memory is allocated on the managed heap. the variable holds only a reference to the location of the object</span></span></span></p>
</td>
</tr>
<tr style="yes;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">There is no separate heap allocation or garbage collection overhead for value-type variables. </span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span lang="EN-US"><span style="small;"><span style="Calibri;">GC plays important role in memory clean up</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"> </span></span></p>
<h2><span lang="EN-US"><span style="medium;"><span style="#17365d;"><span style="Calibri;">Delegate vs. Interface</span></span></span></span></h2>
<table class="MsoTableGrid" style="solid windowtext .5pt;" border="1" cellspacing="0" cellpadding="0" width="600">
<tbody>
<tr style="yes;">
<td style="windowtext 1pt solid;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="EN-GB;"><span style="small;"><span style="Calibri;">Delegate - Usage </span></span></span></strong></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><strong><span style="EN-GB;"><span style="small;"><span style="Calibri;">Interface - Usage</span></span></span></strong></p>
</td>
</tr>
<tr style="1;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">An eventing design pattern is used.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">The class using the interface will want to cast that interface to other interface or class types.</span></span></span></p>
</td>
</tr>
<tr style="2;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">It is desirable to encapsulate a static method.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">The method being implemented is linked to the type or identity of the class: for example, comparison methods.</span></span></span></p>
</td>
</tr>
<tr style="3;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">The caller has no need to access other properties, methods, or interfaces on the object implementing the method.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">There is a group of related methods that may be called.</span></span></span></p>
</td>
</tr>
<tr style="4;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">Easy composition is desired.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">The method being implemented is linked to the type or identity of the class: for example, comparison methods.</span></span></span></p>
</td>
</tr>
<tr style="yes;">
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">A class may need more than one implementation of the method.</span></span></span></p>
</td>
<td style="solid windowtext .5pt;" width="275" valign="top">
<p class="MsoNormal" style="0in 0in 0pt;"><span style="EN-GB;"><span style="small;"><span style="Calibri;">A class only needs one implementation of the method.</span></span></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="0in 0in 10pt;"><span lang="EN-US"><span style="small;"> </span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/c-fundamentals-commonly-compared-concepts-differences/feed</wfw:commentRss>
		</item>
		<item>
		<title>Bringing Android Honeycomb features to lower Android Versions</title>
		<link>http://blogs.globallogic.com/bringing-android-honeycomb-features-to-lower-android-versions</link>
		<comments>http://blogs.globallogic.com/bringing-android-honeycomb-features-to-lower-android-versions#comments</comments>
		<pubDate>Sun, 15 Jan 2012 10:16:24 +0000</pubDate>
		<dc:creator>Huma Shankar</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[Android]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1936</guid>
		<description><![CDATA[ 
Android not only working in a direction to launching newer android versions to support new features, It’s also showing the commitment to bring some of the new enhancement, features and functionality of newly released Android version to lower android versions.
 
Android is trying to achieve the above goal by providing the Android Compatibility libraries. [...]]]></description>
			<content:encoded><![CDATA[<p><!--[if gte mso 9]&gt;    &lt;![endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-IN X-NONE X-NONE                         &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-IN;} --> <!--[endif] --></p>
<p class="MsoNormal"><span style="115%;" lang="EN-IN">Android not only working in a direction to launching newer android versions to support new features, It’s also showing the commitment to bring some of the new enhancement, features and functionality of newly released Android version to lower android versions.</span></p>
<p class="MsoNormal"><!--[if gte mso 9]&gt;    &lt;![endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-IN X-NONE X-NONE                         &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-IN;} --> <!--[endif] --></p>
<p class="MsoNormal"><span style="115%" lang="EN-IN">Android is trying to achieve the above goal by providing the Android Compatibility libraries. </span></p>
<p><!--[if gte mso 9]&gt;    &lt;![endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-IN X-NONE X-NONE                         &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-IN;} --> <!--[endif] --></p>
<p class="MsoNormal"><span style="115%" lang="EN-IN">There are currently following variants are available of this. </span></p>
<p class="MsoListParagraphCxSpFirst" style="-0.25in;"><!--[if gte mso 9]&gt;    &lt;![endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-IN X-NONE X-NONE                         &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--[if gte mso 10]&gt;--><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">V4 <span> </span></span><span lang="EN-IN"><a href="http://developer.android.com/resources/samples/Support4Demos/index.html"><span style="115%;">http://developer.android.com/resources/samples/Support4Demos/index.html</span></a></span><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">V13<span> </span></span><span lang="EN-IN"><a href="http://developer.android.com/resources/samples/Support13Demos/index.html"><span style="115%;">http://developer.android.com/resources/samples/Support13Demos/index.html</span></a></span><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpLast" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">Action Bar Compatibility </span><span lang="EN-IN"><a href="http://developer.android.com/resources/samples/ActionBarCompat/index.html"><span style="115%;">http://developer.android.com/resources/samples/ActionBarCompat/index.html</span></a></span></p>
<p><span style="115%;" lang="EN-IN">These libraries offer the following functionalities for the Application built on android version 1.6 and above. </span></p>
<p><!--[if gte mso 9]&gt;    &lt;![endif]--><!--[if gte mso 9]&gt;  Normal 0     false false false  EN-IN X-NONE X-NONE                         &lt;![endif]--><!--[if gte mso 9]&gt;                                                                                                                                            &lt;![endif]--><!--[if gte mso 10]&gt; &lt;!   /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin-top:0in; 	mso-para-margin-right:0in; 	mso-para-margin-bottom:10.0pt; 	mso-para-margin-left:0in; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri","sans-serif"; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:"Times New Roman"; 	mso-bidi-theme-font:minor-bidi; 	mso-ansi-language:EN-IN;} --> <!--[endif] --></p>
<p class="MsoListParagraphCxSpFirst" style="-0.25in;"><strong><span style="115%;" lang="EN-IN"><span>1.<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span></strong><span style="115%;" lang="EN-IN"><strong>Fragments</strong> </span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">Which are introduced in Android 3.0.<span> </span>As per android documentation “A </span><span lang="EN-IN"><a href="http://developer.android.com/reference/android/app/Fragment.html"><span style="none;">Fragment</span></a></span><span style="115%;" lang="EN-IN"> represents behaviour or a portion of user interface in an </span><span lang="EN-IN"><a href="http://developer.android.com/reference/android/app/Activity.html"><span style="none;">Activity</span></a></span><span style="115%;" lang="EN-IN">. You can combine multiple fragments in a single activity to build a multi-pane UI and reuse a fragment in multiple activities. You can think of a fragment as a modular section of an activity, which has its own lifecycle, receives its own input events, and which you can add or remove while the activity is running (sort of like a &#8220;sub activity&#8221; that you can reuse in different activities)”.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">This helps to write common code which can be used across Smart Phone and Tablets.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><strong><span style="115%;" lang="EN-IN"><span>2.<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">Loaders</span></strong></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">Loaders are also introduced in Android 3.0. This makes it easy to asynchronously load data in an activity or fragment.<span> </span>Loaders have these characteristics:</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">They are available to every Activity and Fragment.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">They provide asynchronous loading of data.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">They monitor the source of their data and deliver new results when the content changes.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><span style="Symbol;" lang="EN-IN"><span>·<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">They automatically reconnect to the last loader&#8217;s cursor when being recreated after a configuration change. Thus, they don&#8217;t need to re-query their data.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><strong><span style="115%;" lang="EN-IN"><span>3.<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">View Pager</span></strong></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">View Pager supports horizontal swiping of the pages and views.</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">You can have a look into the blog post for more details</span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle"><span lang="EN-IN"><a href="http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html"><span style="115%;">http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html</span></a></span><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="-0.25in;"><strong><span style="115%;" lang="EN-IN"><span>4.<span style="7pt &quot;Times New Roman&quot;;"> </span></span></span><span style="115%;" lang="EN-IN">Action Bar</span></strong></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN">This library helps to use the action bar design pattern on Android devices having Android Versions 1.6 and above. </span></p>
<p class="MsoListParagraphCxSpMiddle"><span style="115%;" lang="EN-IN"> </span></p>
<p class="MsoListParagraphCxSpLast"><span style="115%;" lang="EN-IN">The above stated items are the major one; there are other functionality as well which can be achieved using these compatibility libraries like Fragments Transition, Fragments back stack management etc. </span></p>
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/bringing-android-honeycomb-features-to-lower-android-versions/feed</wfw:commentRss>
		</item>
		<item>
		<title>Troubleshooting merge replication &#8212; Mismatch between the replication metadata</title>
		<link>http://blogs.globallogic.com/troubleshooting-merge-replication-mismatch-between-the-replication-metadata</link>
		<comments>http://blogs.globallogic.com/troubleshooting-merge-replication-mismatch-between-the-replication-metadata#comments</comments>
		<pubDate>Tue, 10 Jan 2012 08:21:26 +0000</pubDate>
		<dc:creator>sunil.singh</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[The merge process failed because it detected a mismatch between the replication metadata of the two replicas]]></category>

		<category><![CDATA[Troubleshooting merge replication]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1885</guid>
		<description><![CDATA[Error Message:
The merge process failed because it detected a mismatch between the replication metadata of the two replicas, such that some changes could be lost leading to non-convergence. This could be due to the subscriber not having synchronized within the retention period, or because of one of the replicas being restored to a backup older [...]]]></description>
			<content:encoded><![CDATA[<p>Error Message:</p>
<p><span><em>The merge process failed because it detected a mismatch between the replication metadata of the two replicas, such that some changes could be lost leading to non-convergence. This could be due to the subscriber not having synchronized within the retention period, or because of one of the replicas being restored to a backup older than retention period, or because of the publisher performing more aggressive cleanup on articles of type download-only and articles with partition_options = 3. (Source: MSSQL_REPL, Error number: MSSQL_REPL-2147199363)<br />
Get help: http://help/MSSQL_REPL-2147199363</em></span></p>
<p><em><span>The common generation watermark is invalid at this replica since it does not exist or metadata for changes not yet propagated may have been cleaned up. (Source: MSSQLServer, Error number: 21800)<br />
Get help:<span> </span></span><a title="http://help/21800" href="http://help/21800"><span>http://help/21800</span></a></em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p class="MsoNormal"><span>Let us see how replication works: a subscriber connects to the publisher, submitting its knowledge about which generations have already been sent and received.  If the generations sent and received do not match, then the replication will fails by saying non-convergence can happen. </span></p>
<p class="MsoNormal"><span>If you look in the table, sysmergesubscriptions, you will see four columns: sentgen, sentguid, recgen, and recguid.  These are the columns that tell the last generations synchronized.  Depending on whether you are looking at the publisher or subscriber will determine what the columns actually mean as far as direction.  If you are looking at the publisher, then sentgen and sentguid refer to the last generation sent to the subscriber.  If you are looking at the subscriber, then sentgen and sentguid refer to the last generation sent to the publisher.  If you get the above error message, then it may be that the values do not match between the publisher and subscriber.</span></p>
<p><span>We have to trust either publisher or subscriber for accuracy, So let&#8217;s say that we trust the publisher to be accurate on the sentgen and recgen.  All you need to do is copy the values for sentgen and sentguid into the recgen and recguid columns respectively, and the recgen and recguid into the sentgen and sentguid columns respectively at the subscriber.  Your update statement will look something like:</span><br />
<!--[if !supportLineBreakNewLine]--><br />
<!--[endif]--></p>
<p class="MsoNormal"><span>UPDATE sysmergesubscriptions </span>SET sentgen = 8664, sentguid = ‘DD172177-E223-417C-8BFF-9F72561280EA &#8216;, recgen = 13842769, recguid = 193C40B5-7A23-4A7A-B97E-885EC2A1FFD3&#8242; where subid = pubid and pubid = F6646824-BCCC-443C-875B-0D700F63D075&#8242;</p>
<p class="MsoNormal"><span><br />
<span>In the update statement we have &#8220;where subid = pubid.&#8221;  That&#8217;s because there are two records for every publication at the subscriber, and only the one where the subid equals the pubid is used to track generations.</span></span></p>
<p class="MsoNormal">If synchronization is being taken care by RMO programming then you can also take care of this issue in RMO programming as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/troubleshooting-merge-replication-mismatch-between-the-replication-metadata/feed</wfw:commentRss>
		</item>
		<item>
		<title>Reclaim Your Inbox</title>
		<link>http://blogs.globallogic.com/email</link>
		<comments>http://blogs.globallogic.com/email#comments</comments>
		<pubDate>Mon, 09 Jan 2012 19:36:04 +0000</pubDate>
		<dc:creator>Peter Harrison</dc:creator>
		
		<category><![CDATA[Marketing]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[email corporate communications etiquette business CEO correspondence]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1910</guid>
		<description><![CDATA[Manage your inbox before it manages you&#8230;
Today I had the distinct pleasure of speaking to a group of brilliant local leaders on how to Reclaim Your Inbox presented at the Young Presidents&#8217; Organization Washington DC/Baltimore Chapter Retreat in Maryland on January 9, 2012.
View the full presentation: Reclaim Your Inbox by GlobalLogic CEO Peter Harrison
- - - - -
Below [...]]]></description>
			<content:encoded><![CDATA[<h3><em>Manage your inbox before it manages you&#8230;</em></h3>
<p>Today I had the distinct pleasure of speaking to a group of brilliant local leaders on how to <strong><em><em>Reclaim Your Inbox </em></em></strong>presented at the Young Presidents&#8217; Organization Washington DC/Baltimore Chapter Retreat in Maryland on January 9, 2012.</p>
<p>View the full presentation: <a href="http://blogs.globallogic.com/wp-content/uploads/2012/01/reclaimyourinbox-globallogicceo-peter_harrison.pdf">Reclaim Your Inbox by GlobalLogic CEO Peter Harrison</a></p>
<p style="center;"><strong><a href="http://blogs.globallogic.com/wp-content/uploads/2012/01/reclaimyourinbox-globallogicceo-peter_harrison.pdf"></a>- - - - -</strong></p>
<p><em>Below is a list of GlobalLogic&#8217;s Communications Guidelines for Email. If you have a good email tip or two that&#8217;s missing from this list, I encourage you to share them here by adding your comments below.</em></p>
<p><strong>GlobalLogic&#8217;s Corporate Communications Guidelines - EMAIL:</strong></p>
<ol>
<li>Only send mail TO someone when action is requested or when responding (otherwise CC).</li>
<li>If information is simply FYI then send using CC, not TO which makes it clear no response is required</li>
<li>If you use REPLY ALL, always check that only relevant people remain in TO and CC.</li>
<li>If you send TO more than one person, make sure you clearly define who is expected to do what.</li>
<li>Consider creating a filter and applying a label to separate incoming CC mail.</li>
<li>Do not store processed mail in your Inbox - once you’ve responded/completed a mail move it to another label so you know it is complete.</li>
<li>Try to always respond to or acknowledge all TO mail within 24 hrs.</li>
<li>If you are not getting a response within the timeframe you need, pick up the phone. Not getting an email response from another person is not a reason to miss your own deadlines.</li>
<li>Do not use email for potentially emotional content; use the phone or a meeting instead.</li>
<li>If mail is confidential and not to be forwarded include CONFIDENTIAL in the subject line.</li>
<li>When you need to share attachments with a group:</li>
<li>For completed documents: upload to confluence and include the link in your mail</li>
<li>For working documents: use Google docs and share with the group</li>
<li>Always use the standard e-signature for all emails. Consider adding the PR boilerplate when sending emails for the first time to any person/prospect/partner - standard signature</li>
<li>Please use only the default background provided by Google for all emails. Backgrounds full of color and graphics can make emails difficult to read on mobile devices.</li>
<li>Please consider using HTML for emails as opposed to RTF. RTF makes it difficult to find embedded attachments.</li>
<li>As of now DELETED emails in Gmail are automatically erased from your mailbox’s memory after 3 weeks. Consider using ARCHIVE instead in order to locate your old emails.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/email/feed</wfw:commentRss>
		</item>
		<item>
		<title>Simplifying Agile - The art of writing User Stories</title>
		<link>http://blogs.globallogic.com/simplifying-agile-the-art-of-writing-user-stories</link>
		<comments>http://blogs.globallogic.com/simplifying-agile-the-art-of-writing-user-stories#comments</comments>
		<pubDate>Sun, 08 Jan 2012 13:30:13 +0000</pubDate>
		<dc:creator>Sachin Gupta</dc:creator>
		
		<category><![CDATA[Agile]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[documentation]]></category>

		<category><![CDATA[requirements]]></category>

		<category><![CDATA[template]]></category>

		<category><![CDATA[user stories]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1890</guid>
		<description><![CDATA[When I started my current project as a Functional Analyst last year, I was advised to write user stories in the form of &#8220;As a &#60;user&#62;, I want &#60;goal&#62; so that &#60;reason&#62;”. It is a unique way to document the stories but definitely simplifies various challenges of the requirements documentation.
By learning how to gather requirements [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">When I started my current project as a Functional Analyst last year, I was advised to write user stories in the form of &#8220;As a &lt;user&gt;, I want &lt;goal&gt; so that &lt;reason&gt;”. It is a unique way to document the stories but definitely simplifies various challenges of the requirements documentation.</span></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">By learning how to gather requirements as user stories, I realized how agile plans are always kept up-to-date, contain only the latest and greatest information, and avoid one of the greatest wastes our industry has ever known—premature up-front analysis.</span></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">The key challenges that teams run into when they heavily rely on documentation for their software requirements are that:</span></p>
<ul>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">They can&#8217;t handle changes effectively</span></li>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">They build according to specs instead of what the customer wants</span></li>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">They make bad guess and false assumptions</span></li>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">They waste a lot of time</span></li>
</ul>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">So, Is a requirement really a requirement? If I put it in words of Kent Beck, </span><span style="&quot;Calibri&quot;,&quot;sans-serif&quot;;">one of the 17 original signatories of the Agile Manifesto</span><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">, then the term &#8216;Requirement&#8217; is just plain wrong. </span></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">“<em>Software development has been steered wrong by the term requirement, defined in the dictionary as something that is mandatory or obligatory. The word carries a connotation of absolutism and permanence, inhibitors for embracing change. And the word “requirement” is just plain wrong.</em></span></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;"><em>Out of the thousands of pages used to describe requirements, if you deliver the right 5, 10 or 20 percent, you will likely realize all of the business benefit envisioned for the whole system. So what were the other 80 percent? Not requirements—they weren’t mandatory or obligatory.</em>”</span></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">The problem with gathering requirements as documentation isn’t one of volume—it’s one of communication. </span></p>
<ul>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">First, you can’t have a conversation with a document </span></li>
<li><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">Second, it’s just really easy to misinterpret what someone wrote </span></li>
</ul>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">This leads us to one of the most important principles of agile: </span></p>
<p class="MsoNormal"><strong><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. </span></strong></p>
<p class="MsoNormal"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">So, what we need is something that enables us to have a conversation about a requirement, captures the essence of what our customer wants, and is small enough for planning yet descriptive enough to remind us what we are talking about &#8230;ENTER A USER STORY</span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">Agile user story is a short description of a promise of a conversation. Agile encourages the user stories on index cards </span><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">to remind teams that the initial goal of the requirements-gathering exercise isn’t to get into all the details. It’s to write down a few key words to capture the spirit of the feature and file it away for a later date.</span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">Why just few key words? </span><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">To save us the time and energy of going all in it now and having to redo it all later, we defer diving into the low-level details until later.</span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">User stories have to make sense to business. That’s why we always try to write them in simple terms and try to stay away from any technical jargon. It is better if we put the information in terms that business understands. </span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">A really good user story is one that goes from end to end - slicing through all the layers of the architecture and delivers something of value. The good user stories are Independent, Negotiable, Testable, and Concise that can be Estimated easily. </span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">A few short, well-chosen words are usually enough to remind the team about what a particular user story is about: that brings up our User Story Template in existence </span></p>
<p class="MsoNormal" style="normal;"><strong><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">AS A &lt;USER&gt; I WANT &lt;GOAL&gt; SO THAT &lt;REASON&gt;</span></strong><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="normal;"><span style="&quot;Verdana&quot;,&quot;sans-serif&quot;;">The nice thing about this template is it answers three important questions about the user story: <strong><em>the who, the what, and the why</em></strong>. It gives a little more context and really emphasizes and focuses on the business, which is a good thing.</span></p>
<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/simplifying-agile-the-art-of-writing-user-stories/feed</wfw:commentRss>
		</item>
		<item>
		<title>Maven Integration with PMD &#38; FindBugs</title>
		<link>http://blogs.globallogic.com/maven-integration-with-pmd-findbugs</link>
		<comments>http://blogs.globallogic.com/maven-integration-with-pmd-findbugs#comments</comments>
		<pubDate>Wed, 04 Jan 2012 14:49:19 +0000</pubDate>
		<dc:creator>Rajender Aggarwal</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[findbugs]]></category>

		<category><![CDATA[maven]]></category>

		<category><![CDATA[pmd]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1887</guid>
		<description><![CDATA[Apache Maven is a software  project management and comprehension tool. Based on the concept of a  project object model         (POM), Maven can manage a project&#8217;s build,  reporting and documentation from a central piece of information.
In  this blog, we will look at integration of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://maven.apache.org/">Apache Maven</a> is a software  project management and comprehension tool. Based on the concept of a  project object model         (POM), Maven can manage a project&#8217;s build,  reporting and documentation from a central piece of information.</p>
<p>In  this blog, we will look at integration of Maven with PMD and FindBugs.  Apart from PMS and FindBugs, there are various other tools such as  Surefire and Corbetura that can be integrated with Maven. Lets look at  them &#8230;</p>
<ul>
<li>Maven Surefire Report Plugin : Generates the test results reports (TEST-*.xml) into HTML format.</li>
<li>Maven  Corbetura Report Plugin : The Cobertura tool is a free and easy to use  source code test coverage analyser. It helps you to discover where your  source-code lacks in test coverage.</li>
<li>Maven PMD  Plugin : Runs the PMD code analysis tool on your project&#8217;s source code and generate a site report with its results.</li>
<li>Maven  FindBugs Report Plugin : FindBugs uses static analysis to inspect Java  bytecode for occurrences of bug patterns. FindBugs is better in finding  Threading issues than PMD.</li>
</ul>
<p><span style="bold;">Configuring PMD with Maven</span></p>
<p>At the PMD site there is comprehensive <a href="http://pmd.sourceforge.net/rules/index.html">documentation</a> available on what PMD will report about. In PMD there are rules and  rulesets. Rulesets are groups of rules and other rulesets. By default  PMD provides a ruleset that is packaged with the plugin. To customize  this you need to create your own ruleset like described on the PMD site.</p>
<p>&lt;plugin&gt;<br />
&lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br />
&lt;artifactId&gt;maven-pmd-plugin&lt;/artifactId&gt;<br />
&lt;configuration&gt;<br />
&lt;rulesets&gt;<br />
&lt;ruleset&gt;{Location of PMD Rulse Set File};/ruleset&gt;<br />
&lt;/rulesets&gt;<br />
&lt;/configuration&gt;<br />
&lt;executions&gt;<br />
&lt;execution&gt;<br />
&lt;phase&gt;package&lt;/phase&gt;<br />
&lt;goals&gt;<br />
&lt;goal&gt;pmd&lt;/goal&gt;<br />
&lt;/goals&gt;<br />
&lt;/execution&gt;<br />
&lt;/executions&gt;<br />
&lt;/plugin&gt;<br />
<span style="bold;">Configuring FindBugs with Maven</span></p>
<p>FindBugs  looks for bugs in Java programs. It is based on the concept  of bug  patterns. A bug pattern is a code idiom that is often an error.  Bug  patterns arise for a variety of reasons:</p>
<ul>
<li>Difficult language features</li>
<li>Misunderstood API methods</li>
<li>Misunderstood invariants when code is modified during maintenance</li>
<li>Garden variety mistakes: typos, use of the wrong boolean operator</li>
</ul>
<p>&lt;plugin&gt;<br />
&lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;<br />
&lt;artifactId&gt;findbugs-maven-plugin&lt;/artifactId&gt;<br />
&lt;version&gt;1.2&lt;/version&gt;<br />
&lt;configuration&gt;<br />
&lt;xmlOutput&gt;true&lt;/xmlOutput&gt;<br />
&lt;!&#8211; Optional directory to put FindBugs xdoc xml report &#8211;&gt;<br />
&lt;xmlOutputDirectory&gt;target/site&lt;/xmlOutputDirectory&gt;<br />
&lt;threshold&gt;High&lt;/threshold&gt;<br />
&lt;/configuration&gt;<br />
&lt;/plugin&gt;</p>
<p>To  conclude, integrating and generating reports with Maven is a great way  to monitor the quality of the code. However, to get the real value, one  must think about which reports to choose and how to use them. Adding too  many reports will lead to information overload and may create confusion  over what to fix.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/maven-integration-with-pmd-findbugs/feed</wfw:commentRss>
		</item>
		<item>
		<title>Robotium – Part I</title>
		<link>http://blogs.globallogic.com/robotium-%e2%80%93-part-i</link>
		<comments>http://blogs.globallogic.com/robotium-%e2%80%93-part-i#comments</comments>
		<pubDate>Mon, 02 Jan 2012 12:56:40 +0000</pubDate>
		<dc:creator>deepa.gupta</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1865</guid>
		<description><![CDATA[
An Automation Testing Framework for Android Applications
 “Automated tests may reduce the amount of effort required in agile software development teams, provided they are used in the right way” - by Daniel Knott
Android applications are usually build for various Android devices. Testing the same build on different devices is a tedious job.  An automation tool can [...]]]></description>
			<content:encoded><![CDATA[<p></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;">An Automation Testing Framework for Android Applications</span></strong></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;"><span style="yes;"> </span></span></strong><em><span style="bold;">“Automated tests may reduce the amount of effort required in agile software development teams, provided they are used in the right way” - </span></em><em><span style="Helvetica;">by </span></em><span style="&quot;Georgia&quot;,&quot;serif&quot;;"><a href="https://www.xing.com/profile/Daniel_Knott"><em><span style="Helvetica;">Daniel Knott</span></em></a></span><em><span style="bold;"></span></em></p>
<p class="MsoNormal" style="auto;"><span style="Helvetica;">Android applications are usually build for various Android devices. Testing the same build on different devices is a tedious job.<span style="yes;">  </span>An automation tool can help us to speed up testing process and catch the bugs immediately.<a name="_GoBack"></a></span></p>
<p style="0pt;"><span style="Helvetica;">The </span><span style="&quot;Georgia&quot;,&quot;serif&quot;;"><a href="http://code.google.com/p/robotium/"><span style="Helvetica;">Robotium</span></a></span><span style="Helvetica;"> is a framework that is used to develop powerful and robust black box test cases for Android application. Robotium is freely available online at </span><span style="&quot;Georgia&quot;,&quot;serif&quot;;"><a href="http://code.google.com/p/robotium/"><span style="153;">http://code.google.com/p/robotium/</span></a></span><span style="153;">.</span><span style="Helvetica;"> It is titled as “It’s like Selenium, but for Android”. Robotium framework supports Android Activities, Dialogs, Toasts and Menus, Context menus that are able to</span><span style="Helvetica;"> </span><span style="Helvetica;">simulate user interaction such as touching, clicking, text entry and any other action that is possible on a touch device. <span style="#333333;"></span></span></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;"> </span></strong></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;">What Environment Required?</span></strong></p>
<p class="MsoListParagraphCxSpFirst" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;"><span style="yes;"> </span>Eclipse for building Test project.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">ADT (Android Development Tools)</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">SDK (Software Development Kit)</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">JDK (Java Development Kit)</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Robotium-solo jar file</span></p>
<p class="MsoListParagraphCxSpLast" style="l4 level1 lfo2;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Android apk or Source code to create Test project.</span></p>
<p class="MsoNormal" style="3;"><span style="bold;">Note: Install ADT, SDK and JDK to your system and give a proper path in environment variable.</span></p>
<p class="MsoNormal" style="auto;"><span style="Arial;"> </span></p>
<p class="MsoNormal" style="auto;"><strong><span style="Arial;">How it works?</span></strong></p>
<p class="MsoNormal" style="auto;"><span style="Helvetica;">Robotium is a plugin for eclipse, which is built in Java program and the JUnit test framework. JUnit with Robotium gives us more additional ways of asserting response on device, which makes these tests even more powerful.</span><span style="Arial;"> Following is the workflow for testing am Android application using Robotium.</span></p>
<p class="MsoListParagraphCxSpFirst" style="l1 level1 lfo4;"><span style="Georgia;"><span style="Ignore;">1.<span style="7pt &quot;Times New Roman&quot;;">       </span></span></span><span style="Arial;">Set up environment.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l1 level1 lfo4;"><span style="Georgia;"><span style="Ignore;">2.<span style="7pt &quot;Times New Roman&quot;;">      </span></span></span><span style="Arial;">Create an Android Test Project by referencing it with the actual project APK or Source code. </span></p>
<p class="MsoListParagraphCxSpMiddle" style="l1 level1 lfo4;"><span style="Georgia;"><span style="Ignore;">3.<span style="7pt &quot;Times New Roman&quot;;">      </span></span></span><span style="Arial;">Add Robotium.jar file in the Test Project build path.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l1 level1 lfo4;"><span style="Georgia;"><span style="Ignore;">4.<span style="7pt &quot;Times New Roman&quot;;">      </span></span></span><span style="bold;">Create a java class file (Test Suite) and write all test methods (Test Cases) inside using Robotium solo API.</span><span style="Arial;"></span></p>
<p class="MsoListParagraphCxSpLast" style="l1 level1 lfo4;"><span style="Georgia;"><span style="Ignore;">5.<span style="7pt &quot;Times New Roman&quot;;">      </span></span></span><span style="Arial;">For executing Robotium tests, Run the Test project as ‘Android JUnit Test’ and view Test results in the JUnit explorer window.</span></p>
<p class="MsoNormal" style="16.8pt;"><span style="Arial;">Robotium follows TDD (Test Driven Development) methodology, where Test Cases are written first and actual source code is developed later which enables the Test Cases to pass. </span></p>
<p class="MsoNormal" style="16.8pt;"><span style="Arial;">Robotium test cases (Java class) can also be written prior to starting actual project development, if the UI/layout and flow is finalized, and these test cases can be used any time for testing multiple project releases. For each release we just need to create a Test Project using step 1-4 and add all test cases inside java class file.</span></p>
<p class="MsoNormal" style="auto;"><span style="Arial;">To develop stable and reliable tests, Robotium Solo API is used, which provides various methods that are used to record different graphical elements within Android application, Such as: </span></p>
<ul style="0in;" type="disc">
<li class="MsoNormal"><span style="Helvetica;">clickOnButton(“Register”); </span></li>
<li class="MsoNormal"><span style="Helvetica;">searchText(“Main Menu”); </span></li>
<li class="MsoNormal"><span style="Helvetica;">goBack(); </span></li>
<li class="MsoNormal"><span style="Helvetica;">waitForText(“Registration Successful.”);</span></li>
</ul>
<p class="MsoNormal" style="16.8pt;"><span style="Helvetica;">For more information about Solo APIs, refer to the following URL: </span><span style="&quot;Georgia&quot;,&quot;serif&quot;;"><a href="http://www.jarvana.com/jarvana/view/com/jayway/android/robotium/robotium-solo/1.3.1/robotium-solo-1.3.1-javadoc.jar!/index-all.html"><span style="Helvetica;"><span style="#800080;">http://www.jarvana.com/jarvana/view/com/jayway/android/robotium/robotium-solo/1.3.1/robotium-solo-1.3.1-javadoc.jar!/index-all.html</span></span></a></span><span style="&quot;Georgia&quot;,&quot;serif&quot;;"></span></p>
<p class="MsoNormal" style="16.8pt;"><span style="&quot;Georgia&quot;,&quot;serif&quot;;"> </span></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;">Why Robotium? </span></strong></p>
<p class="MsoListParagraphCxSpFirst" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Powerful Test Cases can be developed, without knowing source code of the application.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">The framework provides various easy methods to simulate multiple Android activities.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Writing Test cases is easy and takes minimal time to complete.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="Arial;">Readability of test cases is greatly improved, compared to standard instrumentation tests.</span><span style="bold;"></span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="Arial;">Test cases are more robust due to the run-time binding to GUI components. </span><span style="bold;"></span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="Arial;">The framework handles multiple Android activities automatically like finds current views, follows current activities.</span><span style="bold;"></span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Test execution is very fast.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="l2 level1 lfo1;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="Arial;">Integrates smoothly with Maven or Ant to run tests as part of continuous integration. </span><span style="bold;"></span></p>
<p class="MsoListParagraphCxSpLast" style="auto;"><strong><span style="Helvetica;"> </span></strong></p>
<p class="MsoNormal" style="3;"><strong><span style="Helvetica;">Limitations </span></strong></p>
<p class="MsoNormal" style="3;"><span style="bold;">Robotium has few limitations, which should be kept in mind while selecting a test application.</span></p>
<p class="MsoListParagraphCxSpFirst" style="l0 level1 lfo3;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">The scope of test cases in Robotium is limited to a single application and does not support for more than one application. Test project is always locked with a target package, which need to be tested and going outside of the package is not allowed.<strong></strong></span></p>
<p class="MsoListParagraphCxSpMiddle" style="auto;"><strong><span style="Helvetica;"> </span></strong></p>
<p class="MsoListParagraphCxSpMiddle" style="l0 level1 lfo3;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="bold;">Android native API’s (Contacts, Widgets etc.) used in the Android application cannot be tested using Robotium. While executing test, if focus is switched to Native application, it will not come back to the Test application and Test will fail.</span></p>
<p class="MsoListParagraphCxSpMiddle" style="0in 0in 0pt 0.5in;"><span style="bold;"> </span></p>
<p class="MsoListParagraphCxSpMiddle" style="l0 level1 lfo3;"><span style="bold;"><span style="Ignore;">·<span style="7pt &quot;Times New Roman&quot;;">         </span></span></span><span style="Arial;">Robotium is not able to handle the flash or web components; it only works with android components. You could send in clicks by using </span><tt><span style="minor-latin;">clickOnScreen()</span></tt><span style="Arial;"> or assert that a certain Activity is shown but that is all. You will not be able to write tests where you verify or work with the web or flash components.</span><span style="bold;"></span></p>
<p class="MsoListParagraphCxSpLast" style="auto;"><span style="bold;"> </span></p>
<p class="MsoNormal" style="3;"><span style="bold;">In the <strong>Part II</strong> I will through more light on creating test projects.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/robotium-%e2%80%93-part-i/feed</wfw:commentRss>
		</item>
		<item>
		<title>Runtime Memory Management Basics</title>
		<link>http://blogs.globallogic.com/runtime-memory-management-basics</link>
		<comments>http://blogs.globallogic.com/runtime-memory-management-basics#comments</comments>
		<pubDate>Sat, 31 Dec 2011 16:55:25 +0000</pubDate>
		<dc:creator>Manish.Rathi1</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Application Memory Management]]></category>

		<category><![CDATA[Memory]]></category>

		<category><![CDATA[Memory Management]]></category>

		<category><![CDATA[Runtime Memory Management]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1859</guid>
		<description><![CDATA[

Memory – One of the most valuable resources of digital world; always remains in high demand just like the Gold in real world. Every active application visible or invisible, certainly require memory for its operations. Due to its nature of limited and high demand, runtime environment has to be very cautious in allocating memory space [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">
<p class="MsoNormal">
<p class="MsoNormal"><span lang="EN-IN">Memory – One of the most valuable resources of digital world; always remains in high demand just like the Gold in real world. Every active application visible or invisible, certainly require memory for its operations. Due to its nature of limited and high demand, runtime environment has to be very cautious in allocating memory space for program’s objects. Runtime employee various techniques/algorithms in order to fulfil the memory demand of various running applications, considering making all of them mutually happy.  <img src='http://blogs.globallogic.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </span></p>
<p class="MsoNormal">It’s probably hard to imagine and directly going the way these runtime manages, better remain in real world and get conceptual understanding.</p>
<p class="MsoNormal">Let’s take a simple use case -</p>
<p class="MsoNormal">Place – Community hall</p>
<p class="MsoNormal"><span lang="EN-IN">Capacity – 1000 persons</span></p>
<p class="MsoNormal"><span lang="EN-IN">Objective – Provide the place for each person entering in hall with most convenient way. Convenience can be subjective so let be specific with following– </span></p>
<p class="MsoListParagraphCxSpFirst">
<ul>
<li><span lang="EN-IN">Minimize the allocation time</span></li>
<li><span lang="EN-IN">Minimize the disturbance for other existing</span></li>
<li><span lang="EN-IN">Smooth capture of empty seats happen due to exit of persons</span></li>
</ul>
<p><!--[if !supportLists]--></p>
<p class="MsoNormal"><span lang="EN-IN"> </span>We have to design a master idea, a virtual program as a solution to above defined use case. Let’s start with simplest one.</p>
<p class="MsoNormal"><strong><span lang="EN-IN">Idea 1</span></strong><span lang="EN-IN">: Random Allocation.</span></p>
<p class="MsoNormal"><span lang="EN-IN">Person entering can occupy any available location in the community hall. No specific seat allocation rule.</span></p>
<p class="MsoNormal">Each time a person enters, he will looks for comfortable place of his choice and occupy. Comfortable location is relative and differs for person to person. Some take front seat, some prefer back, some in center and some might look for seats close to their friends.</p>
<p class="MsoNormal">As there are no rules <strong>Think Time</strong> before occupying seat is relatively <strong>higher</strong>. Each has to think, spend some time his own way.</p>
<p class="MsoNormal"><strong><span lang="EN-IN">Idea 2</span></strong><span lang="EN-IN">: Sequencing – Force them to sit only next available seat in sequential order.</span></p>
<p class="MsoNormal">The moment we apply this rule, <strong>Think Time</strong> reduced drastically, close to zero. Now places are predetermined, person doesn’t have to spend his time in deciding the place. This idea makes things move faster but it leads into another problem.</p>
<p class="MsoNormal"><span lang="EN-IN">Problem - We only considered allocation, and completely ignored the facts of people leaving the hall from any random location. This will create random free seats available, which could be allocated to new person. Our rule does not allow person to sit in empty locations even if they are more preferable/near compare to what next available defined by our rule. Clearly this rule fails to provide the space in least possible time considering empty random locations available.</span></p>
<p class="MsoNormal"><strong><span lang="EN-IN">Idea 3</span></strong><span lang="EN-IN">:  Re-arrange</span></p>
<p class="MsoNormal">Now to address problem with idea 2 we add another rule, Every time seat freed, we move existing persons, such that vacant locations merged into free location available at the end. Of course we haven’t solved the problem of Idea 2, we just avoided the scenario where problem arising.</p>
<p class="MsoNormal">At first, things look fine. No empty location remains since every time we move that to end.</p>
<p class="MsoNormal">Few time later we found ourselves in front of Lion just to avoid barking dogs. We just fall into bigger problem. Doing re-arrangement every time whenever seat gets vacant is overkilling, creating lots of disturbance for the existing mass.</p>
<p class="MsoNormal"><span lang="EN-IN">To handle this we have added few sub-idea rules – </span></p>
<p class="MsoNormal">
<ul>
<li>Do not rearrange every time, do it in interval. Like for every 5<sup>th</sup> vacant seat.</li>
<li>Do this rearrangement in free time, break hours etc.</li>
</ul>
<p class="MsoNormal">Doing all these does not gain much advantage and we have to move away from this rule.</p>
<p class="MsoNormal">We can have hundreds of these rules defined and analysed but it will create blogs virtually impossible to read. I might discover few more rules in next blog, but bigger question to be asked why this all discussion is all about.</p>
<p class="MsoNormal">Now try to map following entities</p>
<p class="MsoNormal"><span lang="EN-IN">Community hall  = Available Memory Area</span></p>
<p class="MsoNormal"><span lang="EN-IN">Capacity 1000 persons  = 1000 memory location, allocation units</span></p>
<p class="MsoNormal">Now re-read the Idea’s with mapped memory entities. You will understand the very basics essence of memory allocation.</p>
<p class="MsoNormal"><span lang="EN-IN">All platform or programming language has their own strategy for memory management having </span><span lang="EN-IN">their own set of benefits and drawbacks. At very broader level they are built around following</span></p>
<p class="MsoNormal"><span lang="EN-IN">– Allocating memory in least possible time with most optimized way<br />
– Freeing memory (Memory Recycling / Reclaiming Free memory)<br />
– Arranging memory (Remove memory fragments)</span></p>
<p class="MsoNormal">As we go through community hall use case, though these activities might look simple but there is lot to be discussed. Hope to write more soon …</p>
<p class="MsoNormal"><span lang="EN-IN"> </span></p>
<p class="MsoNormal">
<p class="MsoNormal">
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/runtime-memory-management-basics/feed</wfw:commentRss>
		</item>
		<item>
		<title>Singleton Design Pattern using C sharp</title>
		<link>http://blogs.globallogic.com/singleton-design-pattern-using-c-sharp</link>
		<comments>http://blogs.globallogic.com/singleton-design-pattern-using-c-sharp#comments</comments>
		<pubDate>Sat, 31 Dec 2011 07:21:26 +0000</pubDate>
		<dc:creator>pradip.pathrikar</dc:creator>
		
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blogs.globallogic.com/?p=1812</guid>
		<description><![CDATA[Design Patterns are recurring solutions to the software design problems you find again and again in real world application development. These patterns are about design and interaction of objects and also serves as the communication platform concerning reusable solutions to commonly faced programming challenges. This post focuses on the main categories of design patterns and [...]]]></description>
			<content:encoded><![CDATA[<p>Design Patterns are recurring solutions to the software design problems you find again and again in real world application development. These patterns are about design and interaction of objects and also serves as the communication platform concerning reusable solutions to commonly faced programming challenges. This post focuses on the main categories of design patterns and the implementation for the  Singleton design pattern using C sharp.</p>
<p>Mainly design patterns are categorized in three parts</p>
<p><strong>1) Creational Patterns</strong></p>
<p>These patterns deals with the creation mechanism of objects, trying to create objects in a manner suitable to the situation. This type of design patterns solve the complexity of creating objects by controlling its object creations.</p>
<p><strong>2) Structural Patterns</strong></p>
<p>Structural Patterns are used to identify and implement the relationships between the entities in easy way.</p>
<p><strong>3) Behavioral Patterns</strong></p>
<p>Behavioral Patterns are self explanatory, behavior means the object methods or functions. Hence these types of patterns identifies the common ways of communications between the objects and thus increase flexibility in carrying out the communication.</p>
<p><strong>Singleton Design Pattern - Creational Pattern</strong></p>
<p>Singleton : Singleton design pattern is one of the Creational Patterns which controls the object creation. The main objective of the Singleton design pattern is that it creates and ensures only ONE object will be created during the life time of the application. Ex. Singleton pattern can be used for  maintaining only one database connection object through out the application, maintaining the static information and the reference count of the object accessed or used by the application.</p>
<p><em>Structure</em></p>
<div id="attachment_1852" class="wp-caption alignnone" style="width: 178px"><a href="http://blogs.globallogic.com/wp-content/uploads/2011/12/singleton_class_diagram.png"><img class="size-full wp-image-1852" src="http://blogs.globallogic.com/wp-content/uploads/2011/12/singleton_class_diagram.png" alt="CSingleton Class Diagram" width="168" height="285" /></a><p class="wp-caption-text">CSingleton Class Diagram</p></div>
<p><em>Implementation: </em><em>Singleton class using C#</em></p>
<pre style="60px;">namespace DesignPatterns
{
    public sealed class CSingleton
    {
        private static volatile CSingleton instance;
        private static volatile int counter = 0 ;
        private static object syncRoot = new object();
        private CSingleton()
        {
        }
        public static int Counter
        {
            get
            {
                return counter;
            }
        }
        public static void Release()
        {
            counter--;
        }
        public static CSingleton Instance
        {
            get
            {
                if (instance == null)
                {
                    lock (syncRoot)
                    {
                        if (instance == null)
                            instance = new CSingleton();
                    }
                }
                counter++;
                return instance;
            }
        }

    }
}</pre>
<ul>
<li>In above example the the class CSingleton is marked as sealed so as to restrict the derivation of this class which could odd instances of this class.</li>
<li>The variable &#8220;instance&#8221; will hold the object to the CSingleton class itself, volatile keyword ensures that the assignment to the instance variable completes before instance variable can be accessed.</li>
<li>Constructor is made as private to prevent creation of the object of CSingleton class by other parts of application.</li>
<li>Counter data member holds count of the references accessed by the client/other part of the application. This member is used to to know how many clients are using this object.</li>
<li>Above approach uses the thread safe implementation using the syncRoot data member, double - check locking is implemented to avoid the thread concurrency problems.</li>
<li>Release method will just decrements the counter by one. Clients should call this method once they are done using CSingleton object. Usually when they don&#8217;t require services of this class anymore.</li>
</ul>
<div><em><br />
</em></div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.globallogic.com/singleton-design-pattern-using-c-sharp/feed</wfw:commentRss>
		</item>
	</channel>
</rss>

