<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Technology and Leadership&#187; Technology</title>
	<atom:link href="http://technologyandleadership.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://technologyandleadership.com</link>
	<description>The intersection of Technology and Leadership</description>
	<lastBuildDate>Sat, 20 Aug 2011 18:20:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Inheritance &#8211; the Ace of the Object Oriented Programming world</title>
		<link>http://technologyandleadership.com/inheritance-the-ace-of-the-object-oriented-programming-world/</link>
		<comments>http://technologyandleadership.com/inheritance-the-ace-of-the-object-oriented-programming-world/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 18:16:16 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[base class]]></category>
		<category><![CDATA[break]]></category>
		<category><![CDATA[child class]]></category>
		<category><![CDATA[derived class]]></category>
		<category><![CDATA[extends]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[parent class]]></category>
		<category><![CDATA[Reusability]]></category>
		<category><![CDATA[reuse]]></category>
		<category><![CDATA[sub class]]></category>
		<category><![CDATA[super]]></category>
		<category><![CDATA[super class]]></category>
		<category><![CDATA[switch case]]></category>
		<category><![CDATA[system.out.format]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=1026</guid>
		<description><![CDATA[The code is just a junkyard if it is not designed for reuse. Re-usability is very simple if you understand inheritance, a very powerful principle of object oriented programming. For this reason I call inheritance the Ace of the object-oriented programming world. Here, I explain inheritance with a simple illustration. From the figure below can [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">The code is just a junkyard if it is not designed for reuse. Re-usability is very simple if you understand <strong>inheritance</strong>, a very powerful principle of object oriented programming. For this reason I call inheritance the Ace of the object-oriented programming world.</p>
<p style="text-align: justify;">Here, I explain inheritance with a simple illustration. From the figure below can you list the properties that are common to all the balloons?</p>
<p><a href="http://technologyandleadership.com/wp-content/uploads/2011/08/balloons1.png"><img class="alignnone size-large wp-image-1029" title="balloons" src="http://technologyandleadership.com/wp-content/uploads/2011/08/balloons1-620x404.png" alt="" width="620" height="404" /></a></p>
<p>&nbsp;</p>
<p align="JUSTIFY"><span style="color: #000000;">The below properties are common to every balloon:</span></p>
<ol>
<li>Color</li>
<li>Size</li>
<li>Price and so on</li>
</ol>
<p style="text-align: justify;">These properties that are common to all classes of a given type say balloon is stored in a class called the <strong>base class or super class or parent class</strong>. <strong>Inheritance is a powerful object oriented programming feature that allows a class to reuse the properties and methods of an already existing class while adding its own functionality.</strong> It&#8217;s the process of creating a new class as an <strong>extension</strong> of an existing class primarily to enhance the code re-usability. The class that extends is called the <strong>derived / sub class</strong> and the class getting extended is called the <strong>super / base class</strong>.</p>
<p align="JUSTIFY"><strong> </strong>Suppose there is a super class called superBalloon. There are different kinds of balloons such as birthday balloons, balloons that represent a theme like sports or Disneyland and so on. For class inheritance java uses the keyword <strong>extends. </strong>Now let&#8217;s write a small java program for the base class &#8220;superBalloon&#8221;.</p>
<p>&nbsp;</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">balloonInherit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> superBalloon
<span style="color: #009900;">&#123;</span>
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * The superBalloon class defines methods and variables common to all balloons such as
	 * size, color and price
	 */</span>
	<span style="color: #666666; font-style: italic;">//commonly used fields in all balloons</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> size<span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> color<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> price<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">int</span> number_of_balloons_purchased<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">double</span> total_cost<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> purchase<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">double</span> price, <span style="color: #000066; font-weight: bold;">int</span> number_of_balloons_purchased<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		total_cost <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>price <span style="color: #339933;">*</span> number_of_balloons_purchased<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p style="text-align: justify;"><strong>A derived class is more specific and can have additional functionality of its own apart from that of the base class.</strong> Thus a birthday balloon is a specialized version of the balloon class having a new field called decoration cost specific to it&#8217;s type to better suit the needs.</p>
<p style="text-align: justify;"><a href="http://technologyandleadership.com/wp-content/uploads/2011/08/bday.png"><img class="alignnone size-full wp-image-1048" title="bday" src="http://technologyandleadership.com/wp-content/uploads/2011/08/bday.png" alt="" width="467" height="570" /></a></p>
<p style="text-align: justify;">We can also <strong>override /replace</strong> the behavior of the base class in the derived class. Here, in the below example the birthday balloon inherits the superBalloon class and defines a new field called decoration cost specific to it&#8217;s kind. We use the <strong>super </strong>keyword to reuse the already existing properties of the base class.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">balloonInherit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> subPartyBalloon <span style="color: #000000; font-weight: bold;">extends</span> superBalloon
<span style="color: #009900;">&#123;</span>
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * Since this is a partyBalloon, an additional new field called decoration cost is added
	 * which is specific to this kind of balloon
	 */</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> args<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">//Create an object for subPartyBalloon class and invoke the purchase method</span>
                subPartyBalloon bDayBalloon <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> subPartyBalloon<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		bDayBalloon.<span style="color: #006633;">purchase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> purchase<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">//Additional property specific to the type partyBalloon</span>
		<span style="color: #000066; font-weight: bold;">double</span> decoration_cost <span style="color: #339933;">=</span> <span style="color: #cc66cc;">2.00</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Reuse the existing properties of the base class using super keyword</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">size</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">number_of_balloons_purchased</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">color</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;red&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//These are the prices of the balloon depending on it's size</span>
		<span style="color: #000000; font-weight: bold;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">size</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">10</span><span style="color: #339933;">:</span>
				<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">price</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5.00</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">:</span>
				<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">price</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10.00</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">30</span><span style="color: #339933;">:</span>
				<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">price</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">15.00</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">break</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">default</span><span style="color: #339933;">:</span>
				<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Invalid size&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Invoke the the purchase methods of the super class to calculate the base_cost</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">purchase</span><span style="color: #009900;">&#40;</span>price,number_of_balloons_purchased<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Since it is a birthday party balloon the additional cost for decoration is added</span>
		total_cost <span style="color: #339933;">=</span> total_cost <span style="color: #339933;">+</span> decoration_cost<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The total cost of %d %s birthday balloons is %.2f&quot;</span>, number_of_balloons_purchased,color,total_cost<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p style="text-align: justify;"><span style="color: #000000;">The switch-case control structure decides the price of the balloon based on the input size. Once a matching size is found it assigns value to the price variable and breaks the execution of the switch-case block. The total cost of the birthday balloons is calculated and the output is as below.</span></p>
<p><strong><span style="color: #008000;">OUTPUT:</span></strong></p>
<p>The total cost of 3 red birthday balloons is 32.00</p>
<p style="text-align: justify;">Now let&#8217;s create a java program for another derived class called subThemeBalloon. A theme based balloon has theme and design as additional fields specific to it&#8217;s kind. For example to represent the theme of Disneyland, a balloon is designed with the theme Disneyland and with the shape Mickey mouse.</p>
<p><a href="http://technologyandleadership.com/wp-content/uploads/2011/08/themebasedBalloons3.png"><img class="alignnone size-large wp-image-1055" title="themebasedBalloons3" src="http://technologyandleadership.com/wp-content/uploads/2011/08/themebasedBalloons3-620x413.png" alt="" width="620" height="413" /></a></p>
<p style="text-align: justify;">The subThemeBalloon class reuses the existing properties of the base class superBalloon using the <strong>super</strong> keyword. It also has three additional new fields viz. theme, design and decoration cost specific to it&#8217;s kind to better suit the needs.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">balloonInherit</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> subThemeBalloon <span style="color: #000000; font-weight: bold;">extends</span> superBalloon
<span style="color: #009900;">&#123;</span>
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * A theme based balloon has theme and design as additional fields. For example to represent
	 * the theme of Disneyland a balloon is designed with the theme Disneyland and with
	 * the shape mickey mouse
	 **/</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">//Create an object of subThemeBalloon class and invoke the purchase method</span>
                subThemeBalloon themeBalloon <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> subThemeBalloon<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		themeBalloon.<span style="color: #006633;">purchase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> purchase<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #666666; font-style: italic;">//Declare three additional properties that are specific to the type themeBalloon</span>
		<span style="color: #003399;">String</span> theme <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Disneyland&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">String</span> design <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Mickey Mouse&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">int</span> decoration_cost <span style="color: #339933;">=</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Reuse the existing properties of the base class using super keyword</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">number_of_balloons_purchased</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">price</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">15.00</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Invoke the purchase method of the base balloon class to calculate base cost using super keyword</span>
		<span style="color: #000000; font-weight: bold;">super</span>.<span style="color: #006633;">purchase</span><span style="color: #009900;">&#40;</span>price, number_of_balloons_purchased<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Add the decoration cost for the balloon</span>
		total_cost <span style="color: #339933;">=</span> total_cost <span style="color: #339933;">+</span> decoration_cost<span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #666666; font-style: italic;">//Print the total cost of the balloon</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">format</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;The total cost of a %s %s balloon is %.2f&quot;</span>, theme, design, total_cost<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p><strong><span style="color: #008000;">OUTPUT:</span></strong></p>
<p>The total cost of a Disneyland Mickey Mouse balloon is 305.00<br />
<strong></strong></p>
<p>&nbsp;</p>
<p>This is all about inheritance. Feel free to post any comments /questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/inheritance-the-ace-of-the-object-oriented-programming-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hosting rails application on heroku</title>
		<link>http://technologyandleadership.com/hosting-rails-application-on-heroku/</link>
		<comments>http://technologyandleadership.com/hosting-rails-application-on-heroku/#comments</comments>
		<pubDate>Mon, 18 Apr 2011 00:46:21 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[keys:add]]></category>
		<category><![CDATA[libreadline5-dev]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[public key]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[readline]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[zlib]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=719</guid>
		<description><![CDATA[Signup for a Heroku account at https://api.heroku.com/signup Then install heroku gem with the below command: sudo gem install heroku Remove ruby 1.9.2, install zlib and openssl package and then re-install ruby as follows: rvm remove 1.9.2 rvm package install zlib rvm package install openssl rvm install 1.9.2 -C --with-zlib-dir=$HOME/.rvm/usr --with-openssl-dir=$HOME/.rvm/usr rvm --default use 1.9.2@rails3tutorial Install [...]]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.08in; }a:link {  } -->Signup for a Heroku account at <a href="https://api.heroku.com/signup">https://api.heroku.com/signup</a></p>
<p>Then install heroku gem with the below command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> heroku</pre></div></div>

<p>Remove ruby 1.9.2, install zlib and openssl package and then re-install ruby as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm remove 1.9.2
rvm package <span style="color: #c20cb9; font-weight: bold;">install</span> zlib
rvm package <span style="color: #c20cb9; font-weight: bold;">install</span> openssl
rvm <span style="color: #c20cb9; font-weight: bold;">install</span> 1.9.2 <span style="color: #660033;">-C</span> <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.rvm<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--with-openssl-dir</span>=<span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>.rvm<span style="color: #000000; font-weight: bold;">/</span>usr
rvm <span style="color: #660033;">--default</span> use 1.9.2<span style="color: #000000; font-weight: bold;">@</span>rails3tutorial</pre></div></div>

<p>Install and compile readline with the below commands:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libncurses5-dev
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> libreadline5-dev
<span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>.rvm<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>ruby-1.9.2-p180<span style="color: #000000; font-weight: bold;">/</span>ext<span style="color: #000000; font-weight: bold;">/</span>readline<span style="color: #000000; font-weight: bold;">/</span>
ruby extconf.rb
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>Associate your Heroku account with the public key.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">heroku keys:add</pre></div></div>

<p>Use create command to create a heroku subdomain for the app:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">heroku create</pre></div></div>

<p>Using git to push the application to the heroku server:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">git</span> push heroku master</pre></div></div>

<p>The open command opens up the url in a new browser window.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">heroku open</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/hosting-rails-application-on-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RVM – Easy installation of &#8216;ruby on rails&#8217; on ubuntu</title>
		<link>http://technologyandleadership.com/rvm-%e2%80%93-easy-installation-of-ruby-on-rails-on-ubuntu/</link>
		<comments>http://technologyandleadership.com/rvm-%e2%80%93-easy-installation-of-ruby-on-rails-on-ubuntu/#comments</comments>
		<pubDate>Sun, 17 Apr 2011 15:50:00 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Easiest rails setup]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[rails setup]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyGems]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=682</guid>
		<description><![CDATA[Ruby Version Manager (RVM) resolves versions conflicts when multiple versions of ruby is installed on the same system. It also enables quick and easy installation of ruby on rails on ubuntu. This article provides solution to the problems faced during the installation of ruby on rails on ubuntu using RVM. Installation of RVM: bash &#60; [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>Ruby Version Manager (RVM)</strong> resolves versions conflicts when multiple versions of ruby is installed on the same system. It also enables quick and easy installation of ruby on rails on ubuntu. This article provides solution to the problems faced during the installation of ruby on rails on ubuntu using RVM.</p>
<p style="text-align: justify;"><strong>Installation of RVM:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">bash</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span>curl <span style="color: #660033;">-s</span> https:<span style="color: #000000; font-weight: bold;">//</span>rvm.beginrescueend.com<span style="color: #000000; font-weight: bold;">/</span>install<span style="color: #000000; font-weight: bold;">/</span>rvm<span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #7a0874; font-weight: bold;">source</span> ~<span style="color: #000000; font-weight: bold;">/</span>.rvm<span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>rvm
rvm reload</pre></div></div>

<p><strong>Install Ruby 1.9.2 with rvm:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm package <span style="color: #c20cb9; font-weight: bold;">install</span> zlib
rvm <span style="color: #c20cb9; font-weight: bold;">install</span> 1.9.2 <span style="color: #660033;">-C</span> <span style="color: #660033;">--with-zlib-dir</span>=<span style="color: #007800;">$rvm_path</span><span style="color: #000000; font-weight: bold;">/</span>usr
rvm <span style="color: #c20cb9; font-weight: bold;">install</span> 1.8.7-p174 <span style="color: #660033;">-C</span> –with-zlib-dir=<span style="color: #007800;">$rvm_path</span><span style="color: #000000; font-weight: bold;">/</span>usr</pre></div></div>

<p>To resolve version conflict, create separate gemsets for each of the two different versions:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm <span style="color: #660033;">--create</span> 1.8.7-p174<span style="color: #000000; font-weight: bold;">@</span>rails2tutorial
rvm <span style="color: #660033;">--create</span> use 1.9.2<span style="color: #000000; font-weight: bold;">@</span>rails3tutorial</pre></div></div>

<p>To use Ruby 1.9.2 by default and Rails 3.0 give the below command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rvm <span style="color: #660033;">--default</span> use 1.9.2<span style="color: #000000; font-weight: bold;">@</span>rails3tutorial</pre></div></div>

<p><strong>Install Rails:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--no-ri</span> <span style="color: #660033;">--no-rdoc</span> <span style="color: #660033;">--version</span>=3.0.1 rails</pre></div></div>

<p>Confirm installation with the below command. This command will display the version of rails installed on the system.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">rails <span style="color: #660033;">-v</span></pre></div></div>

<p><strong>Install RubyGems:</strong><br />
Installation of rvm automatically installs RubyGems<br />
Give the below command to confirm this. This command would display the path in which the gem has been installed.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">which</span> gem</pre></div></div>

<p>Update the system to the latest version with the below command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">gem update –system</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/rvm-%e2%80%93-easy-installation-of-ruby-on-rails-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux shell scripting using GNOME-Shell</title>
		<link>http://technologyandleadership.com/linux-shell-scirpting-using-gnome-shell/</link>
		<comments>http://technologyandleadership.com/linux-shell-scirpting-using-gnome-shell/#comments</comments>
		<pubDate>Fri, 11 Mar 2011 01:45:22 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[$USER]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[GNOME-shell]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installation of GNOME-shell]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=625</guid>
		<description><![CDATA[Shell Scripting for beginners Part1 covered the execution of a Shell Script on WINDOWS platform with a comprehensive illustration. In this article let us practice shell scripting on LINUX platform. This is done using GNOME-shell for scripting and vim editor for modification and saving of shell scripts. Open the terminal:  Go to Applications → Accessories [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="color: #00ae00;"><strong><span style="color: #00ae00;"><a href="http://technologyandleadership.com/category/technology/shell-scripting/">Shell Scripting for beginners Part1</a></span></strong> </span>covered the execution of a Shell Script on WINDOWS platform with a comprehensive illustration. In this article let us practice shell scripting on LINUX platform. This is done using GNOME-shell for scripting and vim editor for modification and saving of shell scripts.</p>
<p><!-- p { margin-bottom: 0.08in; } -->Open the terminal:  <strong>Go to Applications → Accessories → Terminal</strong></p>
<p><strong><br />
</strong></p>
<h2><span style="color: #800000;">Pre-requisite: Installation of GNOME-shell</span></h2>
<p><!-- p { margin-bottom: 0.08in; } --><span style="color: #00ae00;">COMMAND:</span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gnome-shell</pre></div></div>

<p><span style="color: #00ae00;"> </span></p>
<p><span style="color: #00ae00;">OUTPUT: It takes a few seconds<br />
</span></p>
<p><!-- p { margin-bottom: 0.08in; } -->[sudo] password for dell:</p>
<p>Reading package lists&#8230; Done</p>
<p>Building dependency tree&#8230;&#8230;&#8230;&#8230;..</p>
<p><!-- p { margin-bottom: 0.08in; } -->After this install the vim editor using the command</p>
<p><span style="color: #00ae00;"> </span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">vim</span></pre></div></div>

<p><span style="color: #00ae00;"><br />
</span></p>
<h2><span style="color: #00ae00;"><span style="color: #800000;">Creation and execution of a simple Shell Script</span></span></h2>
<p><span style="color: #00ae00;"><span style="color: #800000;"><span style="color: #000000;">Let us start by creating a directory called shellscripts using mkdir command and start working there</span></span></span></p>
<p><span style="color: #00ae00;"><span style="color: #800000;"><span style="color: #000000;">Navigate to home directory using cd ~ command</span></span></span></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> shellscripts
<span style="color: #7a0874; font-weight: bold;">cd</span> shellscripts</pre></div></div>

<p>Now we are inside the shellscripts directory. Now create a new shell script called test.sh using the command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> test.sh</pre></div></div>

<p style="text-align: justify;">After giving vim command it creates a new file called test.sh. Press &#8220;INSERT&#8221; key to start scripting. The shell script starts with a &#8220;shabang&#8221;. In this program we display the username using $USER variable and echo command as below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #c20cb9; font-weight: bold;">clear</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Hello, <span style="color: #007800;">$USER</span>.&quot;</span></pre></div></div>

<p>The screen should look as below:</p>
<p><a href="http://technologyandleadership.com/wp-content/uploads/2011/03/test1.png"><img class="alignnone size-large wp-image-660" title="test" src="http://technologyandleadership.com/wp-content/uploads/2011/03/test1-620x432.png" alt="" width="620" height="432" /></a></p>
<p>Now save the file using ESC+w+q+! command</p>
<p>Grant permissions for execution of test.sh using the chmod command as below:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +x test.sh</pre></div></div>

<p>Execute the shell script using:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>test.sh</pre></div></div>

<p>The output is as below:</p>
<p><a href="http://technologyandleadership.com/wp-content/uploads/2011/03/output.png"><img class="alignnone size-full wp-image-656" title="output" src="http://technologyandleadership.com/wp-content/uploads/2011/03/output.png" alt="" width="333" height="159" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/linux-shell-scirpting-using-gnome-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shell Scripting for beginners with a simple example Part 1</title>
		<link>http://technologyandleadership.com/shell-scripting-for-beginners-with-a-simple-example-part-1/</link>
		<comments>http://technologyandleadership.com/shell-scripting-for-beginners-with-a-simple-example-part-1/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 04:00:11 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[$HOME]]></category>
		<category><![CDATA[bin/sh]]></category>
		<category><![CDATA[chmod]]></category>
		<category><![CDATA[command line interpreter]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[hostname]]></category>
		<category><![CDATA[shebang]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=270</guid>
		<description><![CDATA[This article gives a practical exposure to beginners about shell scripting on UNIX platform. Shell script is a script for the shell command-line interpreter. Shell programming is fun and is used to automate highly repetitive time-consuming manual tasks like environment setup, post processing and configuration value changes that involve file manipulation. We can run shell [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This article gives a practical exposure to beginners about shell scripting on UNIX platform. Shell script is a script for the <strong>shell command-line interpreter</strong>. Shell programming is fun and is used to automate highly repetitive time-consuming manual tasks like environment setup, post processing and configuration value changes that involve file manipulation. We can run shell scripts by installing <strong>Cygwin</strong> and use <strong>Emacs</strong> as the editor.</p>
<p>We point to the interpreter (i.e) the shell in the very first line of the script. This is called <strong>shebang</strong>. <strong>#! bin/sh</strong> is the default shebang if nothing is mentioned.</p>
<h2><span style="color: #800000;">Writing a simple Shell Script:</span></h2>
<p><strong>Step1:</strong>  In the shell command prompt, navigate to your home directory</p>
<p>sh-3.2$ <strong>cd <span style="color: #000080;">$HOME</span></strong></p>
<p>cd means change directory. $HOME variable refers to a directory on the operating system containing the user’s files. It can be represented in short using ~ symbol.</p>
<p><strong>Step2: </strong> In the home directory create a new file named date.sh</p>
<p><strong>Step3:</strong> Modify the access rights on the file so that you can edit/save it using chmod command.</p>
<p>sh-3.2$ <strong><span style="color: #000080;">chmod</span></strong> <span style="color: #008000;"><strong>777</strong> </span>date.sh</p>
<p>Everyone has read, write and execute permissions on the file</p>
<p>sh-3.2$ <strong><span style="color: #000080;">chmod </span><span style="color: #008000;">755</span></strong><span style="color: #008000;"> </span>date.sh</p>
<p>Everyone can read and execute this file but I alone should be able to modify it.</p>
<p><strong>Step 4: </strong>Now let us create a simple shell script to display the date and hostname.</p>
<p>We store the hostname value in a variable called HOST. We use the date function to display date in the format %m-%d%-%Y. And echo command is used for displaying/printing the output on the command line.</p>
<p><strong><span style="color: #800080;">#! /bin/sh</span></strong></p>
<p>HOST=<span style="color: #000080;">$(<strong>hostname</strong>)</span></p>
<p>echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</p>
<p>echo &#8220;Date:$(<strong><span style="color: #000080;">date</span></strong> <strong><span style="color: #008000;">+&#8221;%m-%d-%Y&#8221;</span></strong>)              Hostname:<span style="color: #000080;"><strong>$HOST</strong></span>&#8221;</p>
<p>echo &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</p>
<p><strong>Step 5:</strong> Run this shell script using the command <span style="color: #008000;"><strong>./date.sh</strong></span> from the home directory where you saved it.</p>
<p><strong>OUTPUT:</strong></p>
<p>sh-3.2$ <strong><span style="color: #008000;">./date.sh</span></strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Date:12-14-2010              Hostname:dellwin7-PC</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/shell-scripting-for-beginners-with-a-simple-example-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Key paradigm shift from objects to contracts in the Service-Oriented world</title>
		<link>http://technologyandleadership.com/key-paradigm-shift-from-objects-to-contracts-in-the-service-oriented-world/</link>
		<comments>http://technologyandleadership.com/key-paradigm-shift-from-objects-to-contracts-in-the-service-oriented-world/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 02:07:22 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[code-first]]></category>
		<category><![CDATA[contract]]></category>
		<category><![CDATA[contract-first]]></category>
		<category><![CDATA[distributed]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[Service Oriented]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[technology independent]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[WSDL]]></category>
		<category><![CDATA[XML Schema]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=175</guid>
		<description><![CDATA[There has been a key paradigm shift from object to contract as the building block for a distributed system in the service-oriented world. Contracts are the new building blocks if we need to develop a long lasting distributed system. How focusing on contracts can improve the business objectives and make partners happier is the least [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There has been a key paradigm shift from object to contract as the building block for a distributed system in the service-oriented world. Contracts are the new building blocks if we need to develop a long lasting distributed system. How focusing on contracts can improve the business objectives and make partners happier is the least understood aspect of web services which i am going to explain in this article.</p>
<p style="text-align: justify;"><strong>There are two common  techniques to develop a web service:</strong></p>
<ol style="text-align: justify;">
<li><strong>Code-first</strong></li>
<li><strong>Contract-first</strong></li>
</ol>
<p style="text-align: justify;">Most developers start by writing the service implementation in code and then have a toolkit to produce the WSDL. This approach is called <strong>code-first development</strong>. Code-first is more common today. This is because working directly with WSDL is extremely difficult. We lack proper tool support to work directly with WSDL and hence code-first is more pleasant. In this technique the developer first codes the logic of how the data is treated within his service. Then he produces the WSDL in an automated way using a toolkit. The WSDL thus produced contains language-specific types. When the business partner wants to interact with the service contract, he realizes that his application doesn&#8217;t map nicely to the service contract coded by the developer as it contains language-specific types and he starts looking elsewhere for the service. The key principle of Service Oriented Architecture is to ensure <strong>ease-to-consume</strong> a contract. The Code-first approach is <strong>technology independent and lacks ease-of use</strong>.</p>
<p style="text-align: justify;">The fundamental goal of the <strong>Contract-first model</strong> is to facilitate <strong>interoperability</strong>. The reach of a web service is unlimited. Embracing this new model of contract-first ensures <strong>happier partners</strong>. In this approach, the developer first codes the standard contracts that will be shared with the partners. Here the developer focuses on how the data is moved across service boundaries rather than within the service. He invests a lot of time and energy in contract design. He first codes the XML Schema and WSDL definitions. After everyone agrees on WSDL he implements the code. This approach embraces service orientation and is disconnected from how you treat data within a service. It is focused on connecting the dots within a distributed system as a whole. Ease-of use of the service is under the control of contract definition. The Contract definition is a shared language which is the primary focus of this model. This approach ensures that the service designed is interoperable across a wide range of platforms, operating systems and programming languages. It helps partner collaboration and meets the enterprise goals.</p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/key-paradigm-shift-from-objects-to-contracts-in-the-service-oriented-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top down vs bottom up SOA</title>
		<link>http://technologyandleadership.com/top-down-vs-bottom-up-soa/</link>
		<comments>http://technologyandleadership.com/top-down-vs-bottom-up-soa/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 16:50:44 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[bottom-up]]></category>
		<category><![CDATA[java web services]]></category>
		<category><![CDATA[MDA]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[top-down]]></category>
		<category><![CDATA[WSDL]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=168</guid>
		<description><![CDATA[This article compares the two approaches of web services development - top-down and bottom-up - as the battle between the purist versus the pragmatist, the value generator versus the cost saver and the Business Evangelist vs IT implementer. Web services can be created using two methods: top-down development and bottom-up development. Top-down web services development involves creating [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This article compares the two approaches of web services development - top-down and bottom-up - as the battle between the purist versus the pragmatist, the value generator versus the cost saver and the Business Evangelist vs IT implementer.</p>
<p style="text-align: justify;">Web services can be created using two methods: top-down development and bottom-up development. Top-down web services development involves creating a web service from a WSDL file. By creating the WSDL file first you will ultimately have more control over the web service. When creating a web service using a top-down approach, first you design the implementation of the web service by creating a WSDL file.When creating a web service using a bottom-up approach, first you create a Java bean or EJB bean and then use the web services wizard to create the WSDL file and Web service.</p>
<p><img class="alignnone size-full wp-image-169" title="appraoch" src="http://technologyandleadership.com/wp-content/uploads/2010/01/appraoch.png" alt="appraoch" width="698" height="228" /></p>
<p style="text-align: justify;"><strong><em>Should a top-down business-centric approach or a bottom-up approach be employed given that the Business Unit (BU) is more reactive and sensitive to the realities of IT?</em></strong></p>
<p style="text-align: justify;">The <strong>Model-Driven Architecture (MDA)</strong> provides an approach aimed at achieving <strong>technology independency through full top-down development</strong>. In top-down approach the WSDL is <strong>designed from a business point of view</strong> and is not driven by a service consumer or an existing application. The &#8220;WSDL to Java&#8221; tool generates java code according to JAX-RPC or JAX-WS. These classes can then adapt the existing business logic.</p>
<p style="text-align: justify;">Although bottom-up Web service development may be <strong>faster and easier</strong>, especially if you are new to Web services, the top-down approach is the recommended way of creating a Web service. The bottom up approach generates web services for which the design is driven from an application point of view (developer driven) and will not address the need for other consumers.</p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/top-down-vs-bottom-up-soa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Three Schema Design Approaches</title>
		<link>http://technologyandleadership.com/three-schema-design-approaches/</link>
		<comments>http://technologyandleadership.com/three-schema-design-approaches/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 10:59:25 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[chameleon]]></category>
		<category><![CDATA[heterogeneous]]></category>
		<category><![CDATA[homogeneous]]></category>
		<category><![CDATA[Namespace]]></category>
		<category><![CDATA[XML Schema]]></category>
		<category><![CDATA[XSD]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=151</guid>
		<description><![CDATA[In a project where multiple schemas are created it is critical to decide which namespace design approach is suitable for the project: (1)should we give each schema a different targetNamespace, (2)should we give all the schemas the same targetNamespace or (3)should some of the schemas have no targetNamespace. To make this critical design decision, let [...]]]></description>
			<content:encoded><![CDATA[<p>In a project where multiple schemas are created it is critical to decide which namespace design approach is suitable for the project: (1)should we give each schema a different targetNamespace, (2)should we give all the schemas the same targetNamespace or (3)should some of the schemas have no targetNamespace. To make this critical design decision, let me illustrate the three schema design approaches in this article.</p>
<h2>Heterogeneous Namespace Design</h2>
<p>1. Give each schema a different targetNamespace<br />
2. If required to re-use another schema in the current schema we need to import it</p>
<p><strong>Benefits</strong><br />
1. Maximise the re-use of the types with separate namespaces<br />
2. Namespace mapped to domain specific service<br />
3. It would be easier to model all the domain-specific types in separate files with individual namespaces<br />
4. Easier to understand<br />
<strong>Drawbacks</strong><br />
1. There will be a large number of namespaces to manage<br />
2. There will be a large number of namespaces to import<br />
3. The granularity of the types in import would depend on the types defined and exposed in a particular domain-specific XSD</p>
<h2>Homogenous Namespace Design</h2>
<p>1. Give all schemas the same targetNamespace<br />
2. As the schemas have the same targetNamespace, the method of accessing components is &#8220;include&#8221;.</p>
<p><strong>Benefits</strong><br />
1. No need to either import a service or schemas<br />
<strong>Drawbacks<br />
</strong>1. Need to handle Name collisions<br />
2. Generate code in a single Java package, for a service<br />
3. chances for redundant types<br />
4. does not allow for domain-specific namespaces</p>
<h2>Chameleon Namespace Design</h2>
<p>Give the main schema a targetNamespace and give no targetNamespace to the supporting schemas. The no-namespace schemas will take-on the targetNamepspace of the main schema.</p>
<p><strong>Benefits</strong><br />
1. In this scheme, schemas are able to blend in with the main schemas that use them<br />
2. Ability to provide application-specific namespace to the schema<br />
<strong>Drawbacks</strong><br />
If the schema &lt;include&gt;s multiple no-namespace schemas then there will be a chance of name collisions. In fact, the schema may end up not being able to use some of the no-namespace schemas because their use results in name collisions with other Chameleon components</p>
<p>The most widely used schema design approach is heterogeneous schema design approach. Let me illustrate this with an example.</p>
<p style="text-align: justify;" _mce_style="text-align: justify;"><strong>Step1: </strong>Create a schema file named Books.xsd</p>
<p style="padding-left: 50px;" _mce_style="padding-left: 50px;">

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- to store book information with targetNamespace declared as tns:Books--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:schema</span> <span style="color: #000066;">xmlns:xsd</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">targetNamespace</span>=<span style="color: #ff0000;">&quot;tns:Books&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">elementFormDefault</span>=<span style="color: #ff0000;">&quot;unqualified&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:complexType</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Book&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Author&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Title&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Price&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:double&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
           <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Quantity&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:integer&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:schema<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

</p>
<pre style="text-align: justify; padding-left: 150px;" _mce_style="text-align: justify; padding-left: 150px;" lang="XML"><!--l version="1.0--></pre>
<p><strong>Step2:</strong> Create another schema file Sales.xsd</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!-- to store the sales information with targetNamespace declared as tns:Sales--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:schema</span> <span style="color: #000066;">xmlns:xsd</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">targetNamespace</span>=<span style="color: #ff0000;">&quot;tns:Sales&quot;</span></span>
<span style="color: #009900;">            <span style="color: #000066;">elementFormDefault</span>=<span style="color: #ff0000;">&quot;unqualified&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:complexType</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Sales&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Customer&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Region&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
             <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;TransactionStatus&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
        <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:schema<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p><strong>Step3:</strong> Import the two schema files in Catalog.xsd file </p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">&lt;!--using the Heterogeneous namespace design approach--&gt;</span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:schema</span> <span style="color: #000066;">xmlns:xsd</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> <span style="color: #000066;">xmlns:b</span>=<span style="color: #ff0000;">&quot;tns:Books&quot;</span> <span style="color: #000066;">xmlns:s</span>=<span style="color: #ff0000;">&quot;tns:Sales&quot;</span> <span style="color: #000066;">xmlns:ns1</span>=<span style="color: #ff0000;">&quot;tns:Catalog&quot;</span> <span style="color: #000066;">targetNamespace</span>=<span style="color: #ff0000;">&quot;tns:Catalog&quot;</span> <span style="color: #000066;">elementFormDefault</span>=<span style="color: #ff0000;">&quot;unqualified&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:import</span> <span style="color: #000066;">namespace</span>=<span style="color: #ff0000;">&quot;tns:Books&quot;</span> <span style="color: #000066;">schemaLocation</span>=<span style="color: #ff0000;">&quot;Books.xsd&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:import</span> <span style="color: #000066;">namespace</span>=<span style="color: #ff0000;">&quot;tns:Sales&quot;</span> <span style="color: #000066;">schemaLocation</span>=<span style="color: #ff0000;">&quot;Sales.xsd&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Catalog&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Payment&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;CustomerID&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:integer&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;PaymentType&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Currency&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
							<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ShippingAddress&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;xsd:string&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
						<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
					<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Book&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;b:Book&quot;</span> <span style="color: #000066;">maxOccurs</span>=<span style="color: #ff0000;">&quot;unbounded&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
				<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;xsd:element</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Sales&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;s:Sales&quot;</span> <span style="color: #000066;">maxOccurs</span>=<span style="color: #ff0000;">&quot;unbounded&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
			<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:sequence<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
		<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:complexType<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:element<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/xsd:schema<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/three-schema-design-approaches/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Introduction to XML Web Services</title>
		<link>http://technologyandleadership.com/introduction-to-xml-web-services/</link>
		<comments>http://technologyandleadership.com/introduction-to-xml-web-services/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 08:35:51 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[SOAP]]></category>
		<category><![CDATA[UDDI]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WSDL]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=80</guid>
		<description><![CDATA[Web services take web applications to the next level. By using Web services, your application can publish its function or message to the rest of the world. With web services, your accounting department&#8217;s Win 2k server&#8217;s billing system can connect with your IT supplier&#8217;s UNIX server.Web services can offer application-components like: currency conversion, weather reports, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Web services take web applications to the next level. By using Web services, your application can <strong>publish its function or message</strong> to the rest of the world. With web services, your accounting department&#8217;s Win 2k server&#8217;s billing system can connect with your IT supplier&#8217;s UNIX server.Web services can offer application-components like: currency conversion, weather reports, or even language translation as services. There are things applications need very often. So why make these over and over again?</p>
<p style="text-align: justify;"><strong><em>Web services are units of programmable application logic located on web servers that can be accessed remotely using standard internet protocols and data formats such as XML, HTTP and SOAP.</em></strong></p>
<p style="text-align: justify;">Web services are <strong>platform-independent</strong> and <strong>language-independent</strong>, since they use standard XML languages. This means that my client program can be programmed in C++ and running under Windows, while the Web Service is programmed in Java and running under Linux.</p>
<p style="text-align: justify;">Web Services are published, found, and used through the Web. The basic Web services platform is <strong>XML + HTTP.</strong></p>
<p style="padding-left: 30px;"><img title="WSstandards" src="http://technologyandleadership.com/wp-content/uploads/2009/12/WSstandards4.png" alt="WSstandards" width="423" height="314" /></p>
<p>Web services platform elements are:</p>
<ul>
<li><strong>SOAP</strong> (Simple Object Access Protocol)</li>
<li><strong>UDDI </strong>(Universal Description, Discovery and Integration)</li>
<li><strong>WSDL</strong> (Web Services Description Language)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/introduction-to-xml-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Web Services in 5 Days</title>
		<link>http://technologyandleadership.com/xml-web-services-in-5-days/</link>
		<comments>http://technologyandleadership.com/xml-web-services-in-5-days/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 06:20:11 +0000</pubDate>
		<dc:creator>Aruna</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[DTD]]></category>
		<category><![CDATA[SAX]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML Schema]]></category>
		<category><![CDATA[XSD]]></category>

		<guid isPermaLink="false">http://technologyandleadership.com/?p=54</guid>
		<description><![CDATA[Introduction to XML XML is the universal format for data interchange.  It is supported by all major operating systems, programming languages and development platforms.  It is the standard platform for building interoperable distributed applications.  The ability to invoke cross platform communications makes the reach of XML Technology unlimited and its use in Web Services compelling. [...]]]></description>
			<content:encoded><![CDATA[<h2><img title="XML in 5 Days - A Hands On Approach" src="http://technologyandleadership.com/wp-content/uploads/2009/12/header.jpg" alt="XML in 5 Days - A Hands On Approach" width="474" height="384" /></h2>
<h2>Introduction to XML</h2>
<p><strong>XML is the universal format for data interchange.</strong>  It is supported by all major operating systems, programming languages and development platforms.  It is the <strong>standard platform for building interoperable distributed applications.  </strong></p>
<p><strong>The ability to invoke cross platform communications makes the reach of XML Technology unlimited and its use in Web Services compelling. </strong></p>
<p>Web Services are the building blocks for constructing distributed Web-based applications. They are <strong>units of programmable application logic located on web servers that can be accessed remotely using standard internet protocols and data formats such as XML, HTTP and SOAP.</strong> Web services use XML-based messaging to send and receive data, which enables heterogeneous applications to interoperate with each other.</p>
<h2>Basic concepts of XML</h2>
<p> XML represents structured content rather than visual display. A well-formed XML document contains an end tag for every begin tag. Well-formed XML documents can be modeled as trees. The tree has a single root node containing one or more child nodes. A node without a child is called leaf node. XML Document Object Model (XML DOM) is required to work with XML data.</p>
<h3>Document Object Model (DOM) </h3>
<p>Document Object Model (DOM) is a representation of the XML document in memory.  It is used to read, write, and manipulate an XML document. <strong>DOM loads the entire XML document into memory. </strong></p>
<h3>Simple API for XML (SAX) </h3>
<p>Simple API for XML (SAX) is used to read data from XML documents. SAX parser reads the contents sequentially and generates events as it reads the XML document<strong>.  It does not load the entire XML document into memory. SAX is good for reading large XML Documents.</strong></p>
<p><strong>Limitations of SAX:</strong>  <strong>SAX does not maintain any data structures that are required to perform complex searches. They cannot be used to modify the XML document. </strong></p>
<h3>Document Type Definition (DTD)</h3>
<p>Document Type Definitions (DTD) outlines elements, attributes &amp; relationships allowed in an XML document. DTDs are written in their own syntax rather than XML syntax.</p>
<h3>XML Schema Document (XSD)</h3>
<p><strong>XML Schema Documents describe and validate the structure of XML documents.</strong>  They restrict the value of elements and attributes in an XML document. They are written in XML syntax. An XML document that adheres to XML schema is called <strong>Valid XML document</strong>. The XML Schema documents have suffix xsd.</p>
]]></content:encoded>
			<wfw:commentRss>http://technologyandleadership.com/xml-web-services-in-5-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

