
<?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>From inspiration to realization &#187; Concept</title>
	<atom:link href="http://www.kensodev.com/category/concept/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kensodev.com</link>
	<description>Professional web/RIA development blog</description>
	<lastBuildDate>Sun, 05 Sep 2010 05:44:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Memory management in flex&#160;applications</title>
		<link>http://www.kensodev.com/2010/08/22/memory-management-in-flex-applications/</link>
		<comments>http://www.kensodev.com/2010/08/22/memory-management-in-flex-applications/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 05:24:33 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Event Listener]]></category>
		<category><![CDATA[Flex memory]]></category>
		<category><![CDATA[Memory management]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=569</guid>
		<description><![CDATA[lately there is alot of buzz about flex application performance, keeping your memory low and just in general, keeping everything managed under your fingers and not just counting on the flex framework to manage your memory. flex has a garbage collector but it&#8217;s a bit special on the way it handles memory so I thought [...]]]></description>
			<content:encoded><![CDATA[<p><span>lately there is <span>alot</span> of buzz about flex application performance, keeping your memory low and just in general, keeping everything managed under your fingers and not just counting on the flex framework to manage your memory.</span></p>
<p>flex has a garbage collector but it&#8217;s a bit special on the way it handles memory so I thought I would layout some general rules on how to keep memory low.</p>
<p><span>first thing we need to understand is that any application we will build in our careers will be using some amount of memory, and because memory is not infinite we should keep our applications memory as low as possible.</span></p>
<p>I always say the best way to describe memory management is to &#8220;be smart&#8221; meaning, always have memory in mind, never let it go and by doing this your application will keep lean and thin all the time</p>
<p><span>by taking up too much memory you can get into allot of trouble, you can make your users hate the application because it is running slowly and making their computer run slowly. also, the application can simply crash.</span></p>
<p><span>I hear from programmers in my consulting that computers are getting more and more memory and you can see laptops coming with 4G of memory out of the box and so on, but actually we are also seeing a movement towards mobile devices such as mobile phones etc. these mobile devices do no allow us to use too much memory because it&#8217;s limited resource.</span></p>
<h2><span>Memory leaks</span></h2>
<p><span>memory leaks is a big issue in flex programming and it&#8217;s generally speaking divided into 2 parts, first when our application is using memory in parts we didn&#8217;t want it to use and the other part is when we didn&#8217;t handle the cleaning part efficiently enough.</span></p>
<p>Flash handles memory management through something called &#8220;references&#8221;, just to make things clear before we begin, the only way an object is cleaned by the garbage collector, is be not having any reference from that object to another object, that way you can make sure the object will be &#8220;picked up&#8221; by the garbage collector.</p>
<h3>Event Listeners</h3>
<p>Event listeners are by-far the most mis-used mis-understood part of flex applications, I have seen people/developers using those without even understanding what is actually happening behind the scenes and when (and if) those are cleaned up in memory.</p>
<p>I will try to explain<br />
let&#8217;s take this peace of code</p>
<pre class="brush: as3;">
//objectX
objectY.addEventListener(some_event, some_function)
</pre>
<p>We have two objects (ObjectX, ObjectY), Object Y has a reference to a function in objectX just by passing the function, now, if your application has a reference to objectY, object X will not get cleaned because it has a reference to a function.</p>
<p>There is actually something called weak event listeners, by default the event listeners are &#8220;strong&#8221; meaning every event listener is a function, if you specify the event listener is &#8220;weak&#8221; then the event listener does not count as a reference.</p>
<h3>Static Variables</h3>
<p>Static variables are never cleaned in the entire session of a flex application, meaning if you set the variable&#8217;s value with an object, this object will never get cleaned.</p>
<p>If you want to make sure the object is cleaned you should null out the variable.</p>
<pre class="brush: as3;">
// static variable
public static var _foo:Foo;
//setting the value
_foo = new Foo();
//clean
_foo = null;
</pre>
<h3>Dictionaries</h3>
<p>Dictionaries are another big problem and source of misunderstanding in flex applications.</p>
<p>Dictionaries are key-value collections, meaning you have a collection that is built in the form of a key and a value attached to it.</p>
<p>You can use objects as your key and your value, for example let&#8217;s say we have two objects (ObjectX, ObjectY), you add an entry to the dictionary where ObjectX is the key and ObjectY is the value.</p>
<p>By default the values in dictionaries are &#8220;strong&#8221; and you can specify a &#8220;weak&#8221; key, by doing this, you can actually make sure that if nothing else has a reference to ObjectX, it will get cleaned by the garbage collection, BUT, ObjectY will not get cleaned even though the key for it got cleaned from the dictionary.</p>
<p>There are many questions on this issue from flex experts to adobe, those questions generally start with a WHYYYYYY????</p>
<p>I would also like to understand why but this is the situation and we have to deal with it, in the Flex-Show podcast Aaron says that if you iterate through the values of the dictionary, then all values that don&#8217;t have a key (it was cleaned remember?) gets cleaned immediately.</p>
<p>I never encountered this behavior but Aaron knows what he is talking about, so I trust him <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (Thanks Aaron).</p>
<h2>Conclusion</h2>
<p>I think those are the main three issues in flex applications, there are a few more but if you handle those three you should be fine and your application will actually be pretty lean (at least in memory management).</p>
<p>** this post was inspired by Aaron&#8217;s talk on the podcast, I enjoyed it so much I decided to make a post on the issue.</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Memory management in flex applications - From inspiration to realization" data-url="http://www.kensodev.com/2010/08/22/memory-management-in-flex-applications/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/08/22/memory-management-in-flex-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>keep your mxml files neat with View&#160;Helpers</title>
		<link>http://www.kensodev.com/2010/08/19/keep-your-mxml-files-neat-with-view-helpers/</link>
		<comments>http://www.kensodev.com/2010/08/19/keep-your-mxml-files-neat-with-view-helpers/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 16:00:53 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[As3]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[Consulting]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=558</guid>
		<description><![CDATA[I have been working with flex and consulting about flex development for quite some time now, I guess about 3 years of consulting and 4 years of hands-on development. I have seen flex applications written in many ways, mxml files, as files, namespaces and more. I guess there is no &#8220;right&#8221; way to do so, [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with flex and consulting about flex development for quite some time now, I guess about 3 years of consulting and 4 years of hands-on development.</p>
<p>I have seen flex applications written in many ways, mxml files, as files, namespaces and more.</p>
<p>I guess there is no &#8220;right&#8221; way to do so, or at least not just one &#8220;right&#8221; way.</p>
<p>these past few months I have started working with mxml files in a way I think is very convenient, it keeps my mxml file very lean and clean, all of the view code is in a separate action-script file which inherits from a base class.</p>
<p style="text-align: center;">I want to show you this, first, this is the sample project, this is what it looks like in flash builder:<br />
<a title="Screen shot 2010-08-19 at 5.26.08 PM by KensoDev, on Flickr" href="http://www.flickr.com/photos/51960246@N07/4907663294/"><img class="aligncenter" src="http://farm5.static.flickr.com/4142/4907663294_69ebd7233a.jpg" alt="Screen shot 2010-08-19 at 5.26.08 PM" width="385" height="349" /></a></p>
<p>as you can see, there is the main application, an mxml component, the BaseViewHelper class and that is just about it.</p>
<p>now, let&#8217;s have a look at the BaseViewHelper class<br />
note: this is a stripped down version of the class, it has many additions in my project, like a way to add validations, clean and dirty modes for the model and more, this is just to see the way I work, you can add your own additions to it.</p>
<pre class="brush: as3;">
package com.kensodev.core
{
	import mx.core.UIComponent;

	public class BaseViewHelper
	{
		private var _view:UIComponent;

		public function BaseViewHelper()
		{

		}

		public function init():void
		{

		}

		public function set view(v:UIComponent):void
		{
			_view = v;
		}

		public function get view():UIComponent
		{
			return _view;
		}
	}
}
</pre>
<p>as you can see, I kept it very simple, it has a view getter and setter to set the view it handles, it has an init function (for creation complete events).</p>
<p>now, let&#8217;s see an mxml component and how does the helper fits, but first let&#8217;s see a view helper which inherits from the BaseViewHelper class.</p>
<pre class="brush: as3;">

package com.kensodev.views.helpers
{
	import com.kensodev.core.BaseViewHelper;
	import com.kensodev.views.MyViewComponent;

	public class MyViewComponentHelper extends BaseViewHelper
	{
		public function MyViewComponentHelper()
		{
			super();
		}

		public function get myView():MyViewComponent
		{
			return MyViewComponent(this.view);
		}

		public override function init():void
		{
			//TODO Auto-generated method stub
			super.init();
		}

		public function myButton_clickHandler(event:MouseEvent):void
		{
			// TODO Auto-generated method stub
		}
	}
}
</pre>
<p>This is a helper file for the MyViewComponent, now, here&#8217;s the source code for implementing the helper inside each View component</p>
<pre class="brush: as3;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Canvas xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
		   width=&quot;400&quot;
		   height=&quot;300&quot;
		   creationComplete=&quot;helper.init()&quot;
		   xmlns:helper=&quot;com.kensodev.views.helpers.*&quot;&gt;

	&lt;mx:Script&gt;
		&lt;![CDATA[

		]]&gt;
	&lt;/mx:Script&gt;

	&lt;helper:MyViewComponentHelper view=&quot;{this}&quot; id=&quot;helper&quot; /&gt;

	&lt;mx:Button id=&quot;myButton&quot; click=&quot;helper.myButton_clickHandler(event)&quot;

&lt;/mx:Canvas&gt;
</pre>
<p>as you can see, the file is very clean, it has only data relevant to understand the structure of the component (which is all you need in mxml), all of the logic files &#8220;seats&#8221; behind the scenes.</p>
<p>there is a naming conventions for views and view helpers<br />
its<br />
view_name<br />
view_nameHelper<br />
this way, when you navigate your way through the code, you can always see what you are looking for with ease like so:</p>
<p style="text-align: center;"><a title="Screen shot 2010-08-19 at 5.36.53 PM by KensoDev, on Flickr" href="http://www.flickr.com/photos/51960246@N07/4907684584/"><img class="aligncenter" src="http://farm5.static.flickr.com/4137/4907684584_169980e5f0.jpg" alt="Screen shot 2010-08-19 at 5.36.53 PM" width="500" height="399" /></a></p>
<p>I hope you take inspiration with this way, I assure you I did, it&#8217;s a very useful way to manage large projects with many views and view helpers.</p>
<p>the source code of the example project is on git here.</p>
<p><a href="http://github.com/KensoDev/view-helper-example" target="_blank">http://github.com/KensoDev/view-helper-example</a></p>
<p>******</p>
<p>update:</p>
<p>after a discussion with <a href="http://www.twitter.com/douglasknudsen">@douglasknudsen</a> I want to make things clear, this is not the ViewHelper implementation of cairngorm Mvc framework, it&#8217;s something you should (or can) write on your own just to make things organized and clean.</p>
<p>I am using it regardless to the MVC framework I am using which is RobotLegs B.T.W</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="keep your mxml files neat with View Helpers - From inspiration to realization" data-url="http://www.kensodev.com/2010/08/19/keep-your-mxml-files-neat-with-view-helpers/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/08/19/keep-your-mxml-files-neat-with-view-helpers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Should all developers be (active) members of the virtual&#160;community?</title>
		<link>http://www.kensodev.com/2010/08/03/should-all-developers-be-members-of-the-virtual-community/</link>
		<comments>http://www.kensodev.com/2010/08/03/should-all-developers-be-members-of-the-virtual-community/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 16:12:25 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=544</guid>
		<description><![CDATA[usually when I post in my blog, I make comments, raise decisions, write code or something like that, it&#8217;s never a question. This post, above anything else is a question and a try to spark a debate from my fellow developers and software craftsman out there. Earlier this week I started working on a very [...]]]></description>
			<content:encoded><![CDATA[<p>usually when I post in my blog, I make comments, raise decisions, write code or something like that, it&#8217;s never a question.</p>
<p>This post, above anything else is a question and a try to spark a debate from my fellow developers and software craftsman out there.</p>
<p>Earlier this week I started working on a very interesting project for an international company creating test suites for devices and applications, the suite is cross platform and can run on any machine both windows and Linux and test any device, from mobile phones to DVD&#8217;s to diving sensors.</p>
<p>the client side is written in flex and pure AS3, the server and services are written in Java and Perl scripts.</p>
<p>What is my point?</p>
<p>My point is that this company has some pretty strong developers, all know a thing or 2 on software developement, both in Java and Flex.</p>
<p>Another thing, usually when I get invited to consult and develop for a company saying &#8220;we have a flex application&#8221; I do see an application but it&#8217;s horrible, un-scalable, mxml+code in the same file, services calls in mxml and more.</p>
<p>in this company, that wasn&#8217;t the case, the application is actually pretty solid, stable and gone over more then a couple of QA steps inside the company and clients.</p>
<p>You can imagine that the developers over there can contribute a thing or two to the community.</p>
<p>OK, so far so good, what am I saying here?</p>
<p>From conversations I had with the developers I found out something amazing, none of them has a twitter account, none of them has a blog and none, absolutely none contributed to an open source project, not even a line of code, not even opened a case in the WIKI.</p>
<p>so, what do you think?<br />
Should all developers be active members of the community?<br />
Should every developer have a profile and answer questions on the amazing <a href="http://www.stackoverflow.com">StackOverflow</a><a href="http://www.stackoverflow.com">.com</a>?<br />
Should every developer write a blog?</p>
<p>Love to hear your thoughts on this&#8230;</p>
<p>another thing, when you interview programmers, do you care about these issues?</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Should all developers be (active) members of the virtual community? - From inspiration to realization" data-url="http://www.kensodev.com/2010/08/03/should-all-developers-be-members-of-the-virtual-community/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/08/03/should-all-developers-be-members-of-the-virtual-community/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Git export (like SVN&#160;export)</title>
		<link>http://www.kensodev.com/2010/06/09/git-export-like-svn-export/</link>
		<comments>http://www.kensodev.com/2010/06/09/git-export-like-svn-export/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 16:16:15 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Tips and tricks]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=467</guid>
		<description><![CDATA[I have been working with git for a while now on my Ruby on Rails projects and client side (css, Html and JS) projects, I haven&#8217;t moved completely in flex projects and other projects but I do plan to in the near future, mainly becuase of the reason that you can integrate GIT into flash [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with git for a while now on my Ruby on Rails projects and client side (css, Html and JS) projects, I haven&#8217;t moved completely in flex projects and other projects but I do plan to in the near future, mainly becuase of the reason that you can integrate GIT into flash builder 4.</p>
<p>But, that is not the point.</p>
<p>This week I was working with a company on a client side project, I had to email them the files every time and the .git folders inside the project were heavy and unnecessary.</p>
<p>If you worked with SVN in the future you probably know the export command, after searching for a bit in git help I found how you can do it in git with ease.</p>
<p>This is the command you should use</p>
<pre class="brush: bash;">
git checkout-index -a -f --prefix=/path/to/your/folder/
</pre>
<p>The ending forward slash is very important, do not forget to use it please.</p>
<p>a screenshot of my shell.</p>
<p><a rel="attachment wp-att-468" href="http://www.kensodev.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-7.13.54-PM.png"><img class="aligncenter size-medium wp-image-468" title="Git export to folder (shell)" src="http://www.kensodev.com/wp-content/uploads/2010/06/Screen-shot-2010-06-09-at-7.13.54-PM-300x182.png" alt="" width="300" height="182" /></a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Git export (like SVN export) - From inspiration to realization" data-url="http://www.kensodev.com/2010/06/09/git-export-like-svn-export/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/06/09/git-export-like-svn-export/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can you give quality service to your&#160;clients</title>
		<link>http://www.kensodev.com/2010/02/19/how-can-you-give-quality-service-to-your-clients/</link>
		<comments>http://www.kensodev.com/2010/02/19/how-can-you-give-quality-service-to-your-clients/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 13:11:55 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[freelancing]]></category>
		<category><![CDATA[Product design]]></category>
		<category><![CDATA[Project management]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=349</guid>
		<description><![CDATA[As you know, I am a freelancer, and as a freelancer I work face-to-face with my clients and I always have to find better ways to give quality service. As a freelancer, all of the client&#8217;s communication and service is up to you, you need to provide them with the best platform to work on, [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-350" href="http://www.kensodev.com/wp-content/uploads/2010/02/iStock_000009671781XSmall.jpg"><img class="alignleft size-thumbnail wp-image-350" title="Client support crossword" src="http://www.kensodev.com/wp-content/uploads/2010/02/iStock_000009671781XSmall-150x150.jpg" alt="" width="150" height="150" /></a>As you know, I am a freelancer, and as a freelancer I work face-to-face with my clients and I always have to find better ways to give quality service.</p>
<p>As a freelancer, all of the client&#8217;s communication and service is up to you, you need to provide them with the best platform to work on, with you, along side with the existing team inside the company (in-case you are working with them).</p>
<p>So, because I believe I have that kind of platform I thought I&#8217;d share (as I always do) with you, how I work with my clients, although there are tools and services in this post, it&#8217;s not about them, it&#8217;s about how you can use them, seeing the customer&#8217;s needs in the center of your concerns.</p>
<p><span id="more-349"></span></p>
<p>I as a freelancer very often work as a team leader inside a company, sometimes as the architect and sometimes as the development director, sometimes both and I even love working as a lead developer.</p>
<p>So, my service must be customizable around who I am at the moment and what does the client expect of me to be.</p>
<p>Let us begin&#8230;</p>
<h3>SVN &#8211; Source control system</h3>
<p>First, whether the company is working with a source control or not, I always bring my source control system with me, I work with SVN (or GIT).<br />
I use <a href="http://www.beanstalkapp.com" target="_blank">beanstalk</a>, you can read about it in a previous post I wrote <a href="http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/" target="_blank">here</a>.</p>
<p>You probably ask yourself the same question everyone is asking me, why not use a regular SVN server hosted in a farm or something, well, my answer is always the same, beanstalk are giving me an all around solution for my needs for example:</p>
<h4><strong>TimeLine</strong></h4>
<p>All of the team commits can be seen inside a timeline very similar to facebook, to me as the leader or the architect it&#8217;s very easy to know in the morning what has been accomplished yesterday and by who.</p>
<div id="attachment_351" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-351" href="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.31.46-PM.png"><img class="size-medium wp-image-351" title="beanstalk svn timeline" src="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.31.46-PM-300x175.png" alt="" width="300" height="175" /></a><p class="wp-caption-text">Beanstalk svn timeline</p></div>
<p>As you can see, I can see very clearly who are the team members on this specific project, what are the change-sets they are responsible for and the file that have been changed during the work Yesterday or last month for that matter.</p>
<p>Also, I can use webhooks to do whatever I want, I can use email notifications for every commit (very useful) and many other more very useful features.</p>
<h3>Project management system</h3>
<p>I work with <a href="http://www.basecamphq.com">basecamp</a> to manage all of the project aspects.</p>
<p>What do I manage:</p>
<ul>
<li>deadlines</li>
<li>to-do&#8217;s</li>
<li>messages</li>
<li>chat</li>
<li>files</li>
<li>source</li>
</ul>
<p>I&#8217;ll explain the source line <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Every commit from beanstalk posts a message on the board at basecamp dashboard, meaning I can comment (beanstalk added a feature similar to that recently) on a team member commit and give him feedback on it.</p>
<p>Everything is kept inside the &#8220;project&#8221; context, I&#8217;ll five you an example, because at beanstalk you can see the source changes, very easily I can review the code in the web browser, that means when a team member writes bad code or code I expect to be cleaner or even if he didn&#8217;t comment his code enough ( I have clear rules on that) i simple message him the second I see it and he gets an email about it.</p>
<p>Another use I have for this feature is commenting out new features in the system, If I (or another team member) added a new code to the system, I usually post a comment to the commit and say what I added and what are the usage for it, this clarifies the usage for the team and there are no questions.</p>
<p>If the team is not clear how they can use a feature I added they go to the message and there they will see example source code and comments about that feature.</p>
<div id="attachment_353" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-353" href="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.43.32-PM.png"><img class="size-medium wp-image-353" title="basecamp dashboard" src="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.43.32-PM-300x180.png" alt="" width="300" height="180" /></a><p class="wp-caption-text">Basecamp project dashboard</p></div>
<p>In the screenshot above you can see a project dashboard. This is for a specific project, you as the owner of the account have a dashboard for all the project you are running in the system.</p>
<p>With the morning coffee, you can review what you have to do urgently and what can wait another day, making choices based on data is always better then choices based on your memory or anything else for that matter.</p>
<h3>Backup</h3>
<p>If I could create a shouting voice in this title I would, your client&#8217;s code, data, files and everything you have at your possession is very important you your client, so you should provide a descent backup service for him.</p>
<p>The client must know, no data is being lost, no matter if your laptop caught fire, stolen, broken or any other natural or synthetic disaster that can be caused in our daily crazy life on this world <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I my self have a double backup.</p>
<p>I use a free software called syncback to backup all of the data to an external HD.</p>
<p>Also, I use a remote backup using Mozy.com.</p>
<p>So, every night, my computer backs up twice, once to a close location (HD) and one to a remote location (Cloud service).</p>
<p>Of course, using SVN is having sort of a backup for the code, but I so another backup just in case, of course for all the other stuff that are not code like images, documents or anything else.</p>
<h3>Sync</h3>
<p>Keeping in sync with your client is very important, I&#8217;m talking from the files point of view right now.<br />
I use dropbox on my computer and have dropbox installed for every team member, this way if we have a design document or a mockup or anything else, the file is being updated for everyone at the same time.</p>
<p>So, every time you talk to your team or a member of your team, you are talking about the same thing, you actually look at the same file exactly, so if a team member has a comment he can write it down and everyone will see it the next time they open the file.</p>
<p>This is a very helpful feature dropbox has and I love using it.</p>
<div id="attachment_354" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-354" href="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.57.06-PM.png"><img class="size-medium wp-image-354" title="Dropbox share folder on a mac" src="http://www.kensodev.com/wp-content/uploads/2010/02/Screen-shot-2010-02-19-at-2.57.06-PM-300x198.png" alt="" width="300" height="198" /></a><p class="wp-caption-text">Dropbox shared folder</p></div>
<h3>Time tracking</h3>
<p>I almost entirely work on an hourly basis with my clients, so I have to use a reliable system to track my time.</p>
<p>When working on an hourly basis you must be very careful not to work on a client X project on client&#8217;s Y dime.</p>
<p>For that, I use <a href="http://www.toggl.com" target="_blank">toggl.com</a>, this service is another cloud service to track your time, the clear advantage of that service is that it has a desktop based widget, you begin to track time, if for some reason you left your computer during that time, the widget will inform you on that error when you get back.</p>
<p>That way, a client only pays for time you actually worked, he is more comfortable with working this way.</p>
<p>You can also set custom rates for each client, you can export reports in PDF format and more, the client has a public report, meaning he can see at real time what you are working on and how much time you spent on this mission.</p>
<div id="attachment_355" class="wp-caption aligncenter" style="width: 310px"><a rel="attachment wp-att-355" href="http://www.kensodev.com/wp-content/uploads/2010/02/client_report.png"><img class="size-medium wp-image-355" title="Client report" src="http://www.kensodev.com/wp-content/uploads/2010/02/client_report-300x228.png" alt="" width="300" height="228" /></a><p class="wp-caption-text">Toggl client report</p></div>
<p>If you use the paid account those reports are available to the client, also you can brand it with your logo so when the client&#8217;s print it out it will look nice as well.</p>
<h3>iPhone</h3>
<p>I recently bought an iPhone, so here are some thought on how I use it to give a quality service.</p>
<p>Mail &#8211;&gt; always available, whether I&#8217;m traveling or I&#8217;m out of my home office.</p>
<p>ToDo&#8211;&gt; always synced</p>
<p>Calendatr -&gt; synced</p>
<p>Dropbox -&gt; synced</p>
<p>many many more feature such as to do lists (app store) and many more, I used blackberry and Nokia E71 before, I must say I really feel I am more productive when using the iPhone and more in touch with everything when I travel around.</p>
<div id="attachment_356" class="wp-caption aligncenter" style="width: 230px"><a rel="attachment wp-att-356" href="http://www.kensodev.com/wp-content/uploads/2010/02/apple-iphone.jpg"><img class="size-medium wp-image-356" title="apple iphone" src="http://www.kensodev.com/wp-content/uploads/2010/02/apple-iphone-220x300.jpg" alt="" width="220" height="300" /></a><p class="wp-caption-text">iPhone</p></div>
<p>That&#8217;s it for now <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>part-2 coming soon&#8230;</p>
<p>I&#8217;d love to see your comments</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="How can you give quality service to your clients - From inspiration to realization" data-url="http://www.kensodev.com/2010/02/19/how-can-you-give-quality-service-to-your-clients/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/02/19/how-can-you-give-quality-service-to-your-clients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beanstalk blog mentioned my&#160;post</title>
		<link>http://www.kensodev.com/2010/02/03/beanstalk-blog-mentioned-my-post/</link>
		<comments>http://www.kensodev.com/2010/02/03/beanstalk-blog-mentioned-my-post/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:48:21 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[beanstalk]]></category>
		<category><![CDATA[could service]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=341</guid>
		<description><![CDATA[Well, remmember my post &#8220;SVN on steroids&#8221;? It hit waves around twitter and facebook and got very popular over the weekend I wrote it. I was also mentioned in their blog so here&#8217;s a link Thank you guys for the mention and thank you for this really amazing product I use daily. Tweet]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-342" href="http://www.kensodev.com/wp-content/uploads/2010/02/2297346285_fc2599bcaa.jpg"><img class="alignleft size-thumbnail wp-image-342" title="Beanstalkapp" src="http://www.kensodev.com/wp-content/uploads/2010/02/2297346285_fc2599bcaa-150x150.jpg" alt="" width="150" height="150" /></a>Well, remmember my post <a href="http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/">&#8220;SVN on steroids&#8221;</a>?</p>
<p>It hit waves around twitter and facebook and got very popular over the weekend I wrote it.</p>
<p>I was also mentioned in their blog so here&#8217;s a <a href="http://blog.beanstalkapp.com/2010/01/21/svn-on-steriods-using-beanstalk-and-basecamp/">link </a></p>
<p>Thank you guys for the mention and thank you for this really amazing product I use daily.</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Beanstalk blog mentioned my post - From inspiration to realization" data-url="http://www.kensodev.com/2010/02/03/beanstalk-blog-mentioned-my-post/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/02/03/beanstalk-blog-mentioned-my-post/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SVN on steroids using beanstalk and integrating&#160;basecamp</title>
		<link>http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/</link>
		<comments>http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 18:35:59 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[beanstalk]]></category>
		<category><![CDATA[Blogging]]></category>
		<category><![CDATA[cloud services]]></category>
		<category><![CDATA[hosted SVN]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Service]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Trick]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=321</guid>
		<description><![CDATA[Well, if you consider yourself a professional and care about what you do in your day to day work you probably use some sort of version control system. Whether you are using GIT or SVN, both self hosted or in the cloud. Me, I&#8217;m a huge fan of cloud services and moving things and services [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-322" href="http://www.kensodev.com/wp-content/uploads/2010/01/iStock_000006154797XSmall.jpg"><img class="alignleft size-thumbnail wp-image-322" title="Code" src="http://www.kensodev.com/wp-content/uploads/2010/01/iStock_000006154797XSmall-150x150.jpg" alt="" width="150" height="150" /></a>Well, if you consider yourself a professional and care about what you do in your day to day work you probably use some sort of version control system.</p>
<p>Whether you are using GIT or SVN, both self hosted or in the cloud.</p>
<p>Me, I&#8217;m a huge fan of cloud services and moving things and services into the cloud, managing my entire work (almost) in the cloud, from my email (GMail) to my backup service (Mozy) and now, SVN.</p>
<p>I will tell you about my solution in this post along with screenshots of what it looks like</p>
<p><span id="more-321"></span></p>
<p>Just to give you an idea, I&#8217;m talking about a solution on steroids, the sort of solutions that makes you feel like: &#8220;how the  hell did I do this up until now&#8221;, this solution will work amazing for you if you are working in a team or working alone.</p>
<p>I do both, and I absolutely love this solution.</p>
<p>Like I said in the title, the solution is based on 2 cloud services</p>
<p>1. Beanstalkapp (link) &#8211; hosted SVN with an amazing web interface, user management and more<br />
2. Basecamp (link) &#8211; hosted project management system from 37Signals.</p>
<p>The concept of the solution is simple, see what&#8217;s being done, by who, when and why, all this inside the context of a webpage with a link from the project management system back to the SVN and vice versa.</p>
<p>Also, you are able to track time being &#8220;wasted&#8221; on a mission, everything from within the comfort of the environment convenient to you.</p>
<p>You won&#8217;t need to change anything in your habits, if you are used to using a command line, you will use the same command line with some extra commands to track time and do other things.</p>
<p>So, let&#8217;s dig into just how you can do this:</p>
<p>First, open an account in beanstalk, the pricing range is convenient and I found myself rising from the trial period to my current account in no time.</p>
<p>Second, go and open an account in basecamp (this is not a must, just an extra).</p>
<p>In basecamp, find your account details and grab your API token (you can regenerate a new one at any time you want)</p>
<p>ok, we are set to go.</p>
<p>When you log in into beanstalk you will see the repositories tab on the top, when you click it, you can see all of your repositories.<br />
it&#8217;s important to understand, each of your clients/users will see different things in this tab, meaning there&#8217;s a permission system, if you give access to a client he will see his projects only.</p>
<p><a rel="attachment wp-att-323" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled.png"><img class="aligncenter size-medium wp-image-323" title="Repositories - Beanstalk" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-300x192.png" alt="" width="300" height="192" /></a></p>
<p>Now, click &#8220;Create Repository&#8221;<br />
This screen will come up</p>
<p><a rel="attachment wp-att-324" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-1.png"><img class="aligncenter size-medium wp-image-324" title="Open new repository - Beanstalk" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-1-300x192.png" alt="" width="300" height="192" /></a></p>
<p>Select a repository name (you will not be able to change this in the future so select it wisely)</p>
<p>After you give a name, you will be redirected to the next phase in the wizard, here, you can import your working copy (if you have one).<br />
This is actually a very important feature for me, all of my SVN was self hosted and I wanted to keep the repo consistent and be able to revert back to older revisions of files and more.</p>
<p><a rel="attachment wp-att-325" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-2.png"><img class="aligncenter size-medium wp-image-325" title="Open new repository - phase 2" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-2-300x192.png" alt="" width="300" height="192" /></a></p>
<p>After you import (or not) you will be redirected to giving permissions to clients/users.<br />
you can skip this phase if you don&#8217;t need it or you don&#8217;t know yet, you can change the permissions at any time in the future.</p>
<p>You can also select (of course) the type of permissions the user has.</p>
<p><a rel="attachment wp-att-326" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-3.png"><img class="aligncenter size-medium wp-image-326" title="Create repository - permissions" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-3-300x192.png" alt="" width="300" height="192" /></a></p>
<p>That&#8217;s it, your repository (first one) is setup.<br />
now, you can click the activity page and you will see just a blank (or something else if you imported data) page.</p>
<p>This is your activity page and it will get filled with each commit user does.</p>
<p>On the right side, you can see a textInput where you can copy and paste he repository URL for this repository.<br />
This url is the one you type into the SVN tool you are using, whether you are using the command line or Versions (mac) or even tortoise SVN (windows).</p>
<p><a rel="attachment wp-att-327" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-4.png"><img class="aligncenter size-medium wp-image-327" title="Repository page - Activity" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-4-300x192.png" alt="" width="300" height="192" /></a></p>
<p>Cool, so let&#8217;s create a connection to basecamp now.</p>
<p>Let&#8217;s click the setup tab in the top.<br />
We will get this screen</p>
<p><a rel="attachment wp-att-328" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-5.png"><img class="aligncenter size-medium wp-image-328" title="Integration setup" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-5-300x192.png" alt="" width="300" height="192" /></a></p>
<p>As you can see, basecamp is my option of choice but you you can select any service they have to offer, from twitter to freckle and many more.</p>
<p>What&#8217;s next.</p>
<p>type your basecamp url, paste in your API token.</p>
<p><a rel="attachment wp-att-329" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-7.png"><img class="aligncenter size-medium wp-image-329" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-7-300x192.png" alt="" width="300" height="192" /></a></p>
<p>After you type in the details and click next you will be able to select a project from you project management system.</p>
<p>After you select a project you&#8217;ll be able to select the category to which every commit message will be transmitted to.<br />
I always select &#8220;code&#8221;</p>
<p>I&#8217;ll explain a bit.<br />
When you commit a revision and type a message, this message will be posted to the &#8220;messages&#8221; section in basecamp.<br />
The messages section contains every message users post, so the code revisions and every other message is in once place, for me this is amazing also because I can reply to a message.<br />
When a programmer from you team posts a commit message you can reply, giving him anything from a feedback to rejects.</p>
<p>Also, you have a link from basecamp to the changeset in beanstalk.<br />
you don&#8217;t have to exit, login and look for the latest change, it&#8217;s just a click of a button away.</p>
<p>Let&#8217;s see how it looks.<br />
When I commit a revision it looks like this:</p>
<p><a rel="attachment wp-att-330" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-9.png"><img class="aligncenter size-medium wp-image-330" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-9-300x192.png" alt="" width="300" height="192" /></a></p>
<p>and this is where I go after I click the link inside basecamp</p>
<p><a rel="attachment wp-att-331" href="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-10.png"><img class="aligncenter size-medium wp-image-331" src="http://www.kensodev.com/wp-content/uploads/2010/01/untitled-10-300x192.png" alt="" width="300" height="192" /></a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="SVN on steroids using beanstalk and integrating basecamp - From inspiration to realization" data-url="http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2010/01/20/svn-on-steroids-using-beanstalk-and-integrating-basecamp/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The .net myth balloon&#160;exploding</title>
		<link>http://www.kensodev.com/2009/11/12/the-net-myth-balloon-exploding/</link>
		<comments>http://www.kensodev.com/2009/11/12/the-net-myth-balloon-exploding/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 17:50:41 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[myth]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=291</guid>
		<description><![CDATA[If you are reader s of this blog occasionally or if you are subscribers to my Rss you probably know that I do alot of .net coding side-by-side with other technologies both on server side and on client side. Also, you probably know that I do love to code .net and create amazing application with [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-290" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000008504500XSmall.jpg"><img class="alignleft size-thumbnail wp-image-290" title="bursting the .net rumors bubble" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000008504500XSmall-150x150.jpg" alt="bursting the .net rumors bubble" width="150" height="150" /></a>If you are reader s of this blog occasionally or if you are subscribers to my Rss you probably know that I do alot of .net coding side-by-side with other technologies both on server side and on client side.</p>
<p>Also, you probably know that I do love to code .net and create amazing application with these technologies and frameworks ms are putting out into the market for years now.</p>
<p>Frankly, I&#8217;ve seen the myth&#8217;s about .net being written about, talked about and the buzz is out there. .net is being trashed talked at about every open source community out there. recently I started coding with Ruby On Rails and I was absolutely shocked by the myth&#8217;s that are going on in that online community of developers.</p>
<p>So, in this post I will take each point and act as a myth buster <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  it&#8217;s going to be interesting&#8230;</p>
<p><span id="more-291"></span>Before I begin writing the myth&#8217;s and bursting them one at a time I want to say that in my opinion it is totally Microsoft&#8217;s blame, most of them come from earlier versions of .net when MS did a few (or more) mistakes and the myth&#8217;s stuck since then.</p>
<h3>If I code asp.net my code will only fit IE and will not be in the new standards</h3>
<p>You probably guessed it but this myth is not true, it exists since the beginning of time with .net 1.1 and the controls you dragged and dropped into the HTML which created ugly HTML.</p>
<p>Since then .net has grown, nowadays you can write you own HTML, every control that exists in web-Forms like the grid or data-list are now creating totally customizable code which you can write css for and have your own way of work with.</p>
<p>.net mvc did even better, you can write you own templates, even the default code generated by the templates is OK, it&#8217;s not great but it&#8217;s not ugly as well, comparing it to the code the Scaffolding feature of ROR created it&#8217;s pretty much the same stuff.</p>
<p>If you know what you want to create and you don&#8217;t use Controls when clean lean and mean HTML is needed your code will be clean, readable, validated and you&#8217;ll love it.</p>
<h3>.net is SLOW</h3>
<p><a rel="attachment wp-att-292" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000006457005XSmall.jpg"><img class="size-full wp-image-292 alignleft" title="slow" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000006457005XSmall.jpg" alt="slow" width="153" height="101" /></a></p>
<p>this one actually makes me laugh every time, .net code is compiled (if you want) and if you know what you are doing the code is super fast, super efficient and in tests I&#8217;ve made and in test<a href="http://twitter.com/misfitgeek"> @misfitgeek</a> published on his blog .net wins in most cases.</p>
<p>You can argue both ways here really, you can say the tests were made on ms servers and not on linux but that doesn&#8217;t change the fact that even if there is a difference it won&#8217;t be noticeable to your client&#8217;s.</p>
<p>If you keep your code clean on server side, if you intelligently dividing you calls to the database so you won&#8217;t access it 200 time on page load (seen that happening I swear) then your code will be fast.</p>
<p>The ability to work side by side with SQL (all versions) is also an advantage with speed.</p>
<h3>I have to work with an expensive IDE</h3>
<p><a rel="attachment wp-att-293" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000008650446XSmall.jpg"><img class="alignleft size-thumbnail wp-image-293" title="expensive" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000008650446XSmall-150x150.jpg" alt="expensive" width="150" height="150" /></a></p>
<p>Well, this is also a very ugly myth meant to discourage the use of .net. Today MS released an amazing IDE that is totally free of charge it is called Visual Web Developer Express and it is a free version of Visual Studio (with some features missing).</p>
<p>You can work with this IDE on small or on huge and complex websites, it does not limit you to the level that you can&#8217;t do something, some things are harder than with Visual Studio but it&#8217;s definitely possible.</p>
<p>I&#8217;ve used this IDE for about a year and I enjoyed working with it very much, when comparing it to other environments and languages which IDE&#8217;s cost hundreds of dollars it wins every time.</p>
<p>B.T.W, Visual studio and Visual Web Developer are in my opinion the total best IDE&#8217;s out there, the experience of development and debugging is absolutely amazing and easy.</p>
<h3>I can&#8217;t be agile with .net</h3>
<p>hmm&#8230; if someone will explain this myth to me I&#8217;ll think i&#8217;ll bust it in a second <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> , you can, you can, we can, yes! we can!</p>
<p>you can be agile when developing .net just as much like when you are using ruby or php or any other language or framework.</p>
<h3>with .net development is slow</h3>
<p>HA, .net development is not slow for a very long time now, with .net MVC, nHibernate, code generation templates, LINQ you can be super fast, super efficient coder.</p>
<p>just take a look at the new MVC screencasts on the asp.net website by microsoft, sure, the screencasts never show the best practice and rush to coding just to explain the point but, you can code just as fast with Interfaces, TDD and every other best practice you may know.</p>
<p>Imagine yourself as a commander in the army, when you go to a mission you have to choose the soldiers carefully right?</p>
<p>right</p>
<p>well, net is now exactly like that, if you go to a mission and select the right troops your coding experience will be best, if you don&#8217;t you can expect problems, it&#8217;s the same in ROR, PHP and others&#8230;</p>
<h3>Conclusion</h3>
<p>There are more, some of them aren&#8217;t worth taking the time to answer some I don&#8217;t even remember but every myth can by busted especially with the rapid and ever developing .net.</p>
<p>if you have a comment, feel free&#8230;</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="The .net myth balloon exploding - From inspiration to realization" data-url="http://www.kensodev.com/2009/11/12/the-net-myth-balloon-exploding/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2009/11/12/the-net-myth-balloon-exploding/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Stop chasing that green&#160;light</title>
		<link>http://www.kensodev.com/2009/11/04/stop-chasing-that-green-light/</link>
		<comments>http://www.kensodev.com/2009/11/04/stop-chasing-that-green-light/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 18:29:34 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=269</guid>
		<description><![CDATA[Well, after a long while of thinking about it, I finally saw this post. Matt Cutts, probably the only guy in the world that can discuss the google algorithm finally breaks the silence about it and go out into the open and saying this&#8230; DO NOT break you head struggling with getting your code to [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-270" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000009156726XSmall.jpg"><img class="alignleft size-thumbnail wp-image-270" title="Green light" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000009156726XSmall-150x150.jpg" alt="Green light" width="150" height="150" /></a>Well, after a long while of thinking about it, I finally saw this <a href="http://www.seroundtable.com/archives/020778.html" target="_blank">post</a>.</p>
<p><a href="http://www.mattcutts.com/blog/">Matt Cutts</a>, probably the only guy in the world that can discuss the google algorithm finally breaks the silence about it and go out into the open and saying this&#8230;</p>
<p>DO NOT break you head struggling with getting your code to validate, I will exaplain some more about my opinion in this post</p>
<p><span id="more-269"></span></p>
<p>Well, I&#8217;m a clean code kinda guy, I like to write clean lean code both on server side and on client side, although I do not put all my efforts into getting that green light from the W3C validation.</p>
<h3>WHY?</h3>
<p>Well, it&#8217;s mainly because I believe (and now my beliefs are backed by Google) that valid code does not push you forward not in search results and not even in client flowing to your website.</p>
<p>I&#8217;ve seen websites in the last 10 months or so that are build with tables but validate, these sites had the W3C valid icon on the footer and that is just plain stupid.</p>
<h3>WHY?</h3>
<p>Because semantic code, not using tables for building the website, creating the proper tag for the right place and more are more important for me. (and for you)</p>
<p>Accesibility is a bigger issue in my opinion, I would love to see labels being coupled with a inputs and fieldset surrounding logical parts of your forms and more.</p>
<h3>SO?</h3>
<p>Well, first let&#8217;s say that I&#8217;m not saying you should not validate your code, you should pass it through the validator, even to just check that the images you have are with alt tags and that you don&#8217;t have duplicate tags and stuff like that.</p>
<h3>Balancing&#8230;</h3>
<p><a rel="attachment wp-att-271" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000003501724XSmall.jpg"><img class="aligncenter size-full wp-image-271" title="Balance" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000003501724XSmall.jpg" alt="Balance" width="410" height="293" /></a></p>
<p>You should really balance the amount of time you invest in getting your code to validate, take some of that time and put it into actually writing semantic code.</p>
<p>Think about the accesibility of your website.</p>
<p>What I do every single time is: I&#8217;m using firefox to disable the css and js of my website, I take the time to see whether my website still remains in logical structure that I intended it to be.</p>
<p>I check to see if I have the links in the right place, If I can navigate my way through the website using the keyboard.</p>
<p>When I have the demand, I also check the website blind-folded (literally), I check the website with a screen-reader and listen to it.</p>
<p>If I would have invested all of my time to see that green light I promise you some of these checkpoints and tests would have been unlooked.</p>
<p>I&#8217;d love to hear you opinion on this, feel free to comment or even reply to me via <a href="http://www.twitter.com/KensoDev">Twitter</a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Stop chasing that green light - From inspiration to realization" data-url="http://www.kensodev.com/2009/11/04/stop-chasing-that-green-light/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2009/11/04/stop-chasing-that-green-light/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scaling a real life messaging&#160;application</title>
		<link>http://www.kensodev.com/2009/11/03/scaling-a-real-life-messaging-application/</link>
		<comments>http://www.kensodev.com/2009/11/03/scaling-a-real-life-messaging-application/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 23:11:09 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[messaging]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[WebOrb]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/?p=258</guid>
		<description><![CDATA[Sometimes in life you get to a point that your servers are not enough, the users are attacking (good attack ) you application and the servers simply can&#8217;t handle the load. Well, this was exactly the case with a client of mine, the client is a forex company, they had 2K concurrent users and they [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="attachment wp-att-259" href="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000009154776XSmall.jpg"><img class="alignleft size-thumbnail wp-image-259" title="server farm" src="http://www.kensodev.com/wp-content/uploads/2009/11/iStock_000009154776XSmall-150x150.jpg" alt="server farm" width="150" height="150" /></a>Sometimes in life you get to a point that your servers are not enough, the users are attacking (good attack <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ) you application and the servers simply can&#8217;t handle the load.</p>
<p>Well, this was exactly the case with a client of mine, the client is a forex company, they had 2K concurrent users and they currently in the process of redesigning the client application and plan to grow up to 20K concurrent users.</p>
<p>This is a classic job for me, this is what I do, it&#8217;s a different company with different needs, so, in this post I will give you the solution I gave the company without revealing details about the company of course<span id="more-258"></span></p>
<h3>What do you need to deal with?</h3>
<p><a rel="attachment wp-att-261" href="http://www.kensodev.com/wp-content/uploads/2009/11/planning_the_software_needs1.jpg"><img class="alignnone size-full wp-image-261" title="planning the software needs" src="http://www.kensodev.com/wp-content/uploads/2009/11/planning_the_software_needs1.jpg" alt="planning the software needs" width="550" height="366" /></a></p>
<p>As always, I started with a pen and a paper, sitting down with the company&#8217;s CTO, understanding the need of the software from the hardware.</p>
<p>This is a most important stage for me, learning to listen to the guys that hired you for the consulting is not always easy but let me tell you this, they know their product better then you, even if the design is not the best, even if it has flaws they know it better then you will ever do in the short time you are there for consulting.</p>
<p>OK, after that being said, let&#8217;s continue&#8230;</p>
<p>So, the software needs are like so:</p>
<ul>
<li>messaging from server to client</li>
<li>latency is out of the question</li>
<li>custom load balancing based on decision (20% load is OK or 80%???)</li>
<li>amount of messages &#8211;&gt; 2-4 messages a second per client</li>
</ul>
<p>As you probably understand, these demands are huge for a 20K concurrent users application. I accepted the challenge and went to designing the solution.</p>
<h3>planning</h3>
<p>This application is based on high volumes, the volumes can vary at times. because this is a forex based application there are times that the messaging is dead meaning there is not much movement and there is time that the application should supply 2-4 messaged a second to each client.</p>
<p>And another surprise: the data is personal so you cannot use a shared cached object. delightful</p>
<p>Let&#8217;s attack it each section at a time shall we?</p>
<h4>Messaging from client to server (push)</h4>
<p>I chose to use MSMQ based application, basically you push messages into a queue of messages, the messages are then pulled from the queue by the appropriate application or in our case (as you will see next) appropriate server.</p>
<h4>custom load balancing based on decision</h4>
<p>Well, this is a tricky one, usually what you do in the client application is hard-code a server URI inside your code, this means if you want to make proper scaling you should create different versions of the application for each server right? WRONG!</p>
<p>The solution is like so&#8230;</p>
<p>Inside the server cluster there will be a &#8220;decision server&#8221;, this server will manager all the other servers in the cluster.<br />
Each time a user is trying to connect, the application first tries to connect to that &#8220;decision server&#8221;, this server looks at it&#8217;s DB (you built) and sees the load on each server, the server then decides based on the allowed load which server he should lead you too and simply gives you the URI, the application takes this URI returned as a string and connects.</p>
<p>No Worries, I will explain more, but this is exciting ain&#8217;t it?? <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h4>amount of messages &#8211;&gt; 2-4 messages a second per client</h4>
<p>Well, we will see about that in a second.</p>
<h3>The solution (Explained)</h3>
<p><a rel="attachment wp-att-262" href="http://www.kensodev.com/wp-content/uploads/2009/11/messaging_server_for_blog.png"><img class="aligncenter size-medium wp-image-262" title="messaging diagram" src="http://www.kensodev.com/wp-content/uploads/2009/11/messaging_server_for_blog-300x258.png" alt="messaging diagram" width="300" height="258" /></a></p>
<p>So, let&#8217;s explain this for you.</p>
<h4>The decision server</h4>
<p>The decision server is just an HTTP service connected to an SQL server (can be express), this SQL server holds the servers it has in the cluster and a connection count.</p>
<p>The connection count is calculated to decide on the load, this is just simple math and based on experience with the system, the system can learn and the system admin can teach it.</p>
<p>If the server failed after 2000 connection then this is 100% load, the admin sets the system for 40% that, or whatever other number he wants.</p>
<p>hmm&#8230; interesting right.</p>
<p>Right, this is a custom service and so simple it&#8217;s unbelivable, now, you are probably wondering but this is one server handling all the load right?</p>
<p>Well, no, this server is kicked into action only the first time a user connects to the system per session, after the decision server returned the URI to the users, the user will never get to that server again unless he disconnects and tries to connect again.</p>
<h4>The messaging server</h4>
<p>The messaging server is based on WebOrb.net excellent messaging application, this application can conenct to a queue of messages, whether the queue is local o remote.</p>
<p>This is actually a pretty intuitive ready solution for you, you don&#8217;t have to custom program anthing, the WebOrb application is pretty solid and handlers a large amount of connections per server</p>
<h4>The client</h4>
<p>The client application is stupid, it has no logic to select the server, it connects to the server (decision) and get a URI, after that URI is in the application it holds it in cache or as a static variable so it won&#8217;t have to go back to the service for it.</p>
<h4>Single point of failure?</h4>
<p>As you notices (or not) there is a single point of failure in the system right?</p>
<p>Well yes, there is, the decision server is a single point of failure, if it fails to load or fails to return a URI the system won&#8217;t work.</p>
<p>To overcome this issue I simply added another server as a fallback, if you connect them with a load balance soltion you get also load control but that&#8217;s (at least for my solution) is an over kill.</p>
<h3>Testing</h3>
<p>When testing this cluster / server / client solution we got amazing results, the servers are at 20% load, the scaling is horizontal and you can connect another server any time you want thus creating another place for your users to connect to and instantly enabling more connections to your service.</p>
<h3>conclusion</h3>
<p>This was a very good project for me, I succeeded with my mission and I hope you took some info from what I did.</p>
<p>feel free to comment.</p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Scaling a real life messaging application - From inspiration to realization" data-url="http://www.kensodev.com/2009/11/03/scaling-a-real-life-messaging-application/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2009/11/03/scaling-a-real-life-messaging-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Phase 1 &#8211; first consulting&#160;meeting.</title>
		<link>http://www.kensodev.com/2009/07/19/phase-1-first-consulting-meeting/</link>
		<comments>http://www.kensodev.com/2009/07/19/phase-1-first-consulting-meeting/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 01:00:00 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Product management]]></category>
		<category><![CDATA[AMF]]></category>
		<category><![CDATA[Consulting]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[RTMP]]></category>
		<category><![CDATA[XmlSocket]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/2009/07/19/phase-1-first-consulting-meeting/</guid>
		<description><![CDATA[Hi all, This is the second post in this very long posts chain I&#8217;m posting. I thought it would be a great idea to post about my experiences as an independent consultant for companies. The posts will not be personal experiences but the knowledge I&#8217;m getting and passing thought, whether its in the shape of [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,   <br />This is the second post in this very long posts chain I&#8217;m posting.    <br />I thought it would be a great idea to post about my experiences as an independent consultant for companies.    <br />The posts will not be personal experiences but the knowledge I&#8217;m getting and passing thought, whether its in the shape of a meeting, researching or sample applications. </p>
<p>If you want to lear more about the series, please head <a href="http://www.kensodev.com/2009/07/15/this-is-the-beginning/" target="_blank">here</a> and read. </p>
<p>Ok, so this is the post about the first meeting. </p>
<p>&#160;</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="BXP28324" border="0" alt="BXP28324" align="left" src="http://www.kensodev.com/wp-content/uploads/2009/07/BXP28324.jpg" width="217" height="240" /> Usually when you come to a consulting meeting you know where you are going, you know what the client wants and you can better prepare yourself for it.    <br />This meeting was different, the client had many questions, he wasn&#8217;t sure what he wanted and how he wanted to do it.    <br />Because the client is a startup company which deals with a lot of money, and has somewhere between 20-30K users, there is no rush in their behalf (unbelievable I know), they want it the best. </p>
<p>So, I had no preparations as to what the want, I knew the general idea, the have an html client, they want to transfer to flex. that&#8217;s it. </p>
<p>&#160;</p>
<p>&#160;</p>
<p>When I got there, we started talking. </p>
<p>The first question that popped into the room was the communication method they should use.   <br />should they use AMF/xmlSocket/Http service or what&#8230;. </p>
<p>So, lets break it down. </p>
<p>Each method has pro&#8217;s and con&#8217;s.   <br />Flex has the advantage of not limiting you into a single method, you can use a couple or more methods of server side communication in a single flex application.    <br />You will need a very good team of developers and a superman project manager, but it is totally not an impossible mission, it can and was already done before. </p>
<p>So, lets dig further in&#8230; </p>
<p>Before stepping into the pro&#8217;s and con&#8217;s lets handle what they want to achive (again, without compromising any data or even the company name). </p>
<p>They have users, the users are divided into groups, each group can contain X amount of users (x is a variable not a constant <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> )   <br />Above the group is an organization, an organization can have X amount of groups. </p>
<p>The data in the group is personal and cannot be compromised to other groups or users, the same with users of course, no data should leak between users, groups or organizations. </p>
<p>The calculated data is group specific, meaning each group has their financial data, the calculations are based on their data and their data only. </p>
<p>Calculations, ok we are getting there&#8230;   <br />Question by me: Does the user/Group/Organization need to do an action in order of the data to be calculated?    <br />Answer: no, the calculations are done periodically (1 time per second in average) and need to be sent to the client without him even knowing about it, the data should be updated on his screen. </p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="scratching_head" border="0" alt="scratching_head" align="right" src="http://www.kensodev.com/wp-content/uploads/2009/07/scratching_head.jpg" width="100" height="84" /> OK, sound about right. a well known scenario, you we guys using webforms or any other request/response are probably scratching your head right now&#8230; don&#8217;t worry, its quite simple actually. </p>
<p>lets move forward please, lunch is almost here&#8230; <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>Question: what about other data on the screen, any other data needs this amount of crazy updating or should everything else be pretty standard? </p>
<p>The rest of the screen, containing somewhere between 10-20 parts should not be updated in this time periods, the other data is sometimes the result of a user action or a group action. </p>
<p>Question: should an action from a group be alerted to all the users inside it.   <br />Answer: yes, sometimes the group did something that caused the users to loose/gain money so they should be alerted about it. </p>
<p>lunch <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>Client: the final thing we want to accomplish is the ability to reach every user/group/organization separately and send them admin messages about everything from a version update or a hosting change. </p>
<p>OK. </p>
<p>Great, I have my data, I asked my questions (I gave you a brief version of course). now let us talk. </p>
<p>1st &#8211; 1s calculated data.   <br />Method of implementation. </p>
<p>Server &#8211; 1 calculating server based on Sql server 2005/2008 (we will not get into the configuration) a caching solution (sometimes the data is the same as before, why should the server sweat if the data has not changed).   <br />2 &#8211; Messaging server connecting to that calculation server.    <br />3. windows service using an xmlsocket connection based on clientIP, groupID, organizationID, when the data for an entity of those has changed you simply push the data to them, if the data has not changed you send out nothing, the GUI at the client will not change, the NET traffic will not overflow. </p>
<p>This way you keep it simple, you calculate the data on server 1, you send the data using server 2, connection to server 1 using a windows service which you can monitor performance. </p>
<p>Pro&#8217;s: very rapid communication, no overflowing the servers with requests, if the data has not changed nothing happens.   <br />Just for a reference, the client implemented the same feature in their current application using a 1second JavaScript timer and a service.    <br />Do you want to guess what happened? (hint: guess who crashed first, server or client) </p>
<p>Con&#8217;s scale up in this solution is not always easy and it is not done only in software, you need some hardware changing too, though in the beasts they have over there, they have time to worry about that. </p>
<p>2nd communication &#8211; client or group does something and data should change in the GUI.   <br />For this solution I think the <a href="http://www.themidnightcoders.com/products/weborb-for-net/overview.html" target="_blank">webOrb.net</a> solution would be perfect, you get out of the box push in HTTP while the data changed, you don&#8217;t have to write any custom code for it. </p>
<p>The <a href="http://www.themidnightcoders.com/products/weborb-for-net/overview.html" target="_blank">WebOrb.net</a> is a solution that lets you use AMF3 or AMF0 or RTMP communication with a flex client. It is very robust, easily configured and even has a built in monitoring solution. </p>
<p>Pro&#8217;s: The weborb solution is hosted on top of IIS6/7 so you can configure it with flexibility of your choice.   <br />you can write custom code, use the classes you already have in an asp.net application or generate a new application from scratch using the code generation solution.    <br />scale up is very easy, using a load balancer and 2 servers you multiply the users that can use the system at once.    <br />Clouding: you can pass this service into the cloud at AmazonEc2 or at any other clouding service and get out of the box scale up when needed. </p>
<p>Con&#8217;s: The push is not always in a heart bit, mainly when you are talking about 20-30K users.   <br />as always in a 3rd party solution, you cannot actually do ANYTHING you want. </p>
<p>3rd Method: Admin Messages: because the messages are not meant to be urgent, (urgent messaging will be sent on the socket already connected) the most efficient thing to do is by using FileSystem on the server for every group, user, organization and have the flex client check it once every 24 hours using an httprequest to the file it is using.   <br />That way, this solution is not using any database in real time and will not slow down the db which is well needed on other crucial actions. </p>
<p>That&#8217;s it&#8230;.   <br />That wasn&#8217;t all of the meeting, but that&#8217;s enough to chew on for this post, on the next post I will continue with the questions and answers that came up on the same meeting at this client. </p>
<p>Some of the subjects that we will discuss on that post:   <br />1. Handling disconnect    <br />2. Multilanguage    <br />3. Skins    <br />4. group work    <br />5. svn    <br />6. flex builder versions    <br />7. graphic&#8217;s team brief    <br />8. graphic artist&#8211;developer&#8211;project manager. why, how, when, who??? </p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Phase 1 - first consulting meeting. - From inspiration to realization" data-url="http://www.kensodev.com/2009/07/19/phase-1-first-consulting-meeting/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2009/07/19/phase-1-first-consulting-meeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using jQuery tree for database&#160;data</title>
		<link>http://www.kensodev.com/2009/05/22/using-jquery-tree-for-database-data/</link>
		<comments>http://www.kensodev.com/2009/05/22/using-jquery-tree-for-database-data/#comments</comments>
		<pubDate>Fri, 22 May 2009 15:42:00 +0000</pubDate>
		<dc:creator>Avi Tzurel</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://www.kensodev.com/2009/05/22/using-jquery-tree-for-database-data/</guid>
		<description><![CDATA[Hi, Actually this blog post is to answer a really nice guy from a forum (.Net) I run in Hebrew, but I thought it will be really a really nice blog post in general. I get a lot of questions regarding the concept of using jQuery (in general) with .net and database data. I actually [...]]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>Actually this blog post is to answer a really nice guy from a forum (.Net) I run in Hebrew, but I thought it will be really a really nice blog post in general.</p>
<p>I get a lot of questions regarding the concept of using jQuery (in general) with .net and database data.</p>
<p>I actually blame Microsoft for having the tutorials in their website teaching only SqlDataSource which I never used and recommend that you don’t use too.</p>
<p>So, the majority of the questions I get are not at all about code, it’s about concept, how to communicate with data, how to retrieve data and more.</p>
<p>Ok, so this tutorial is all about jQuery, LINQ to Sql, and the jQuery tree.</p>
<p>The only difference is that I’m not going to display files in folders but pages from a Sql table, every page has a “ParentID” fields, so it will be very easy to understand.</p>
<p>This tutorial is also to clarify you can use the tree for any relational database or file data.</p>
<p>So,</p>
<p>Lets Start.</p>
<p>First, lets go and download the 2 packages.<br />
<a href="http://www.jquery.com" target="_blank">jQuery</a><br />
<a href="http://abeautifulsite.net/notebook/58" target="_blank">jQuery File Tree</a></p>
<p>We will open up a new website in visual studio.<br />
Our files should look like this:<br />
<a href="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1726.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-05-22_1726" src="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1726-thumb.png" border="0" alt="2009-05-22_1726" width="105" height="244" /></a></p>
<p>What do we have here?<br />
Well, we have all the css from the jQuery file tree library, we have the Images also from this library, we have the js files from: jQuery, jQuery file tree and another js file which we created for our custom functions.</p>
<p>Alright, now let’s create our page:</p>
<p><a href="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1728.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-05-22_1728" src="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1728-thumb.png" border="0" alt="2009-05-22_1728" width="244" height="157" /></a></p>
<p>We have all the script file and css files in our page, also, we wrote a div called “myFirstTree” in our page, this div will hold our tree.</p>
<p>What else do we need?</p>
<p>Well, like I said, we are displaying database data here, so lets create a very simple database with one table, also we will create a LINQ mapping file for it.<br />
B.T.W, you can use any kind of data access, you can use nHibernate, or whatever you may find comfortable for your use.<br />
I use linq for this example, don’t ask why, just felt like it <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1734.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-05-22_1734" src="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1734-thumb.png" border="0" alt="2009-05-22_1734" width="244" height="228" /></a></p>
<p>So, we have these fields:<br />
pageID – Identity field<br />
pageName<br />
pageParentID</p>
<p>let’s create our data, just randomly fill our table with some data, and then we can go back and retrieve it from the client side using some jQuery.</p>
<p><a href="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1738.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-05-22_1738" src="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1738-thumb.png" border="0" alt="2009-05-22_1738" width="244" height="229" /></a></p>
<p>So, we have our data, I don’t think i need to further explain this no? <img src='http://www.kensodev.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Now, lets write some js code to retrieve the data from the server for us.</p>
<p>Our js code should look like this:</p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: 'Courier New',courier,monospace; direction: ltr; max-height: 200px; font-size: 8pt; cursor: text;">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum1" style="color: #606060">   1:</span> $(document).ready(function() {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum2" style="color: #606060">   2:</span>     $(<span style="color: #006080">'#myFirstTree'</span>).fileTree(</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum3" style="color: #606060">   3:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum4" style="color: #606060">   4:</span>         root: <span style="color: #006080">'0'</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum5" style="color: #606060">   5:</span>         script: <span style="color: #006080">'jQueryTreeHandler.ashx'</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum6" style="color: #606060">   6:</span>         multiFolder: <span style="color: #0000ff">true</span>,</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum7" style="color: #606060">   7:</span>         loadMessage: <span style="color: #006080">'Tree loading...'</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum8" style="color: #606060">   8:</span>     }, function(file) {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum9" style="color: #606060">   9:</span>         alert(file);</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum10" style="color: #606060">  10:</span>     });</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum11" style="color: #606060">  11:</span> });</pre>
<p><!--CRLF--></div>
</div>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Let’s explain this code a bit shall we?</p>
<p>first, we chose our pre crated div “myFirstTree” and then we initialized the fileTree object with these parameters:</p>
<p><strong>root</strong>: the first parameter that will be passed to our Handler</p>
<p><strong>script</strong>: our path to the handler</p>
<p><strong>multiFolder</strong>: whether our tree will be multi folder or not, when this is false, clicking each folder will collapse all the other folders in the tree.</p>
<p><strong>loadingMessage</strong>: this message will be displayed when data is being retrieved from the server.</p>
<p><strong>fileFunction</strong>: this function will be fired when a file from the tree is selected.</p>
<p>All pretty straight forward up until now, lets go on and create our handler:</p>
<p>the parameter we know is passed in is called “dir” so that is what we will use here.</p>
<p>So, this is what your handler code should look like:</p>
<div id="codeSnippetWrapper" style="border: 1px solid silver; margin: 20px 0px 10px; padding: 4px; overflow: auto; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 97.5%; font-family: 'Courier New',courier,monospace; direction: ltr; max-height: 200px; font-size: 8pt; cursor: text;">
<div id="codeSnippet" style="border-style: none; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;">
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum1" style="color: #606060">   1:</span> &lt;%@ WebHandler Language=<span style="color: #006080">"C#"</span> Class=<span style="color: #006080">"jQueryTreeHandler"</span> %&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum2" style="color: #606060">   2:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum3" style="color: #606060">   3:</span> <span style="color: #0000ff">using</span> System;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum4" style="color: #606060">   4:</span> <span style="color: #0000ff">using</span> System.Web;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum5" style="color: #606060">   5:</span> <span style="color: #0000ff">using</span> System.Linq;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum6" style="color: #606060">   6:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum7" style="color: #606060">   7:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> jQueryTreeHandler : IHttpHandler {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum8" style="color: #606060">   8:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum9" style="color: #606060">   9:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> ProcessRequest (HttpContext context) {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum10" style="color: #606060">  10:</span>         context.Response.ContentType = <span style="color: #006080">"text/plain"</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum11" style="color: #606060">  11:</span>         <span style="color: #0000ff">int</span> parentID = Convert.ToInt32(context.Request.Form[<span style="color: #006080">"dir"</span>]);</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum12" style="color: #606060">  12:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum13" style="color: #606060">  13:</span>         <span style="color: #0000ff">string</span> list = <span style="color: #006080">""</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum14" style="color: #606060">  14:</span>         jQueryTreeDataContext db = <span style="color: #0000ff">new</span> jQueryTreeDataContext();</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum15" style="color: #606060">  15:</span>         var pages = from p <span style="color: #0000ff">in</span> db.Pages</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum16" style="color: #606060">  16:</span>                     <span style="color: #0000ff">where</span> p.pageParentID == parentID</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum17" style="color: #606060">  17:</span>                     select p;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum18" style="color: #606060">  18:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum19" style="color: #606060">  19:</span>         <span style="color: #0000ff">foreach</span> (Page item <span style="color: #0000ff">in</span> pages)</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum20" style="color: #606060">  20:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum21" style="color: #606060">  21:</span>             list += String.Format(<span style="color: #006080">"&lt;li class=\"directory collapsed\"&gt;&lt;a href=\"#\" rel=\"{0}\"&gt;{1}&lt;/a&gt;&lt;/li&gt;"</span>, item.pageID.ToString(), item.pageName);</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum22" style="color: #606060">  22:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum23" style="color: #606060">  23:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum24" style="color: #606060">  24:</span>         context.Response.Write(String.Format(<span style="color: #006080">"&lt;ul class=\"jqueryFileTree\" style=\"display: none;\"&gt;{0}&lt;/ul&gt;"</span>, list));</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum25" style="color: #606060">  25:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum26" style="color: #606060">  26:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum27" style="color: #606060">  27:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">bool</span> IsReusable {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum28" style="color: #606060">  28:</span>         get {</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum29" style="color: #606060">  29:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum30" style="color: #606060">  30:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum31" style="color: #606060">  31:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum32" style="color: #606060">  32:</span></pre>
<p><!--CRLF--></p>
<pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; text-align: left; line-height: 12pt; background-color: white; width: 100%; font-family: 'Courier New',courier,monospace; direction: ltr; color: black; font-size: 8pt;"><span id="lnum33" style="color: #606060">  33:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p><!--.csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Comment: I didn&#8217;t take care of a situation where a row has no children, it wasn’t necessary for my example. but in real life code you should, and if a row does not have any children you shouldn’t display a folder but a file instead.</p>
<p>and this is how our code looks like in the final result (Html output)</p>
<p><a href="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1840.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="2009-05-22_1840" src="http://www.kensodev.com/wp-content/uploads/2009/05/20090522-1840-thumb.png" border="0" alt="2009-05-22_1840" width="244" height="173" /></a></p>
<p>Comment: I had to tweak the jQuery file tree code in order for it to work with database data, normally it has a regullar expression validating the &#8220;rel&#8221; attribute actually contains data with &#8220;/&#8221;, that needed to be changes.</p>
<p>I uploaded the file to here for you, so download away&#8230;<br />
<a class="downloadlink" href="http://www.kensodev.com/wp-content/plugins/download-monitor/download.php?id=jqueryfiletree.js" title="Version1 downloaded 269 times" >jQuery file tree tweaked (269)</a></p>

	<div style="">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-text="Using jQuery tree for database data - From inspiration to realization" data-url="http://www.kensodev.com/2009/05/22/using-jquery-tree-for-database-data/"  data-via="KensoDev">Tweet</a>
	</div>
	<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://www.kensodev.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.kensodev.com/2009/05/22/using-jquery-tree-for-database-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
