<?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>ITmeze &#187; ITmeze</title>
	<atom:link href="http://itmeze.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://itmeze.com</link>
	<description>IT world served like Cyprus meze</description>
	<lastBuildDate>Sat, 26 Jun 2010 00:15:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Getting ugly with BeginActionLink helper!</title>
		<link>http://itmeze.com/2010/06/getting-ugly-with-beginactionlink-helper/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=getting-ugly-with-beginactionlink-helper</link>
		<comments>http://itmeze.com/2010/06/getting-ugly-with-beginactionlink-helper/#comments</comments>
		<pubDate>Sat, 26 Jun 2010 00:13:41 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[actionlink]]></category>
		<category><![CDATA[asp.net-mvc]]></category>
		<category><![CDATA[htmlhelpers]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=271</guid>
		<description><![CDATA[Have You ever had such a moment when the most stupid and trivial solution turns out to be the ONLY ONE that is logically suitable at the moment? When I had such a feeling today&#8230;. I am working on a module for one of huge web portals (not to mention which one). Part of that [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Have You ever had such a moment when the most stupid and trivial solution turns out to be the ONLY ONE that is logically suitable at the moment? When I had such a feeling today&#8230;.<br />
I am working on a module for one of huge web portals (not to mention which one). Part of that module is only accessible to users with administration permissions &#8211; as typical as it can be. The reason why I am mentioning that is to highlight the fact that at this specific part performance does not matter so much. Anyway, my talk to one of designers (Friday, half an hour before &#8216;the beginning of the weekend&#8217;):<br />
<strong> </strong></p>
<p><strong>Designer: </strong>I am going to spend whole weekend on those Views&#8230;</p>
<p><strong>Me: </strong>Yeah&#8230; S*** happens&#8230;.</p>
<p><strong>Designer: </strong>Those &#8216;Html.ActionLink&#8217; that You use everywhere, how do I put something inside, you know, images, spans, staff like that&#8230;</p>
<p><strong>Me: </strong>Argh&#8230; Hm&#8230;..</p>
<p>I suddenly realize that before I leave the office this guy needs an extension method: <strong>BeginActionLink </strong>like right now!. The similar one that is used for Forms elements (BeginForm). Then I started to code&#8230; Have You ever realized that ActionLink has roughly 12 overloads!!!! That would take hours to prepare BeginActionLink for most of them.</p>
<p><a href="http://itmeze.com/wp-content/uploads/2010/06/idea-bulb.jpg"><img class="alignleft size-thumbnail wp-image-275" style="margin: 10px;" title="idea" src="http://itmeze.com/wp-content/uploads/2010/06/idea-bulb-150x150.jpg" alt="idea bulb" width="150" height="150" /></a></p>
<p>When You are blocked, what You do? Me too, I started &#8216;googling&#8217;. Nothing simple and smart enough. Except 200 lines of code with tons of overloads&#8230; argh&#8230;</p>
<p>But then, completely unexpectedly &#8230;.</p>
<p>My moment of genius!</p>
<p>Don&#8217;t laugh! For people over &#8230; some age &#8230; that things do not happen offen! <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>There are solutions that developers are ashamed of, but they simply do their job:</p>
<pre class="brush: csharp;">public static string TrimEndTag(this MvcHtmlString htmlString, string tagName = &quot;a&quot;)
        {
            var endTag = new TagBuilder(tagName).ToString(TagRenderMode.EndTag); 

            var tagString = htmlString.ToString();

            var endTagIndex = tagString.LastIndexOf(endTag);

            if(endTagIndex &gt; 0)
                tagString = tagString.Remove(endTagIndex).TrimEnd();

            return tagString;
        }

        public static string ToEndTag(this HtmlHelper html, string tagName)
        {
            return new TagBuilder(tagName).ToString(TagRenderMode.EndTag);
        }</pre>
<p>I am simply removing end tag from ActionLink returned string! As simple as that! So all that is left for my buddy to do is to use it like that:</p>
<pre class="brush: csharp;">&lt;%= Html.ActionLink(&quot; &quot;, &quot;testAction&quot;, &quot;testController&quot;, new { id = 4 }, new {}).TrimEndTag() %&gt;

        images, spans, text, whatever...

    &lt;%= Html.ToEndTag(&quot;a&quot;) %&gt;</pre>
<p>Wuala! Ugly, So ugly, but at the same time I am preserving original methods for ActionLinks and I couldn&#8217;t figure out better solution&#8230;.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2010/06/getting-ugly-with-beginactionlink-helper/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A hint for Entity Framework multi-join performance problem</title>
		<link>http://itmeze.com/2009/11/a-hint-for-entity-framework-multi-join-performance-problem/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-hint-for-entity-framework-multi-join-performance-problem</link>
		<comments>http://itmeze.com/2009/11/a-hint-for-entity-framework-multi-join-performance-problem/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 19:49:16 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=194</guid>
		<description><![CDATA[How I have started my adventure with Entity framework Some of you may refer to one of my previous entries, when I was discussing tool I would use for my new web project. Look for (2. Database and ORM). I made a &#8220;brave&#8221; decision to choose Entity framework as my Object Relational Mapping tool. Well, [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p><strong>How I have started my adventure with Entity framework</strong></p>
<p>Some of you may refer to one of my previous entries, when <a title="Database and ORM for new internet startup" href="http://itmeze.com/2009/10/making-internet-start-up%E2%80%A6-part-2-choosing-tools/" target="_blank">I was discussing tool I would use for my new web project</a>. Look for (2. Database and ORM). I made a &#8220;brave&#8221; decision to choose Entity framework as my Object Relational Mapping tool. Well, I must say, i slightly regret this. To be honest, I would consider choosing other tools &#8211; or at least wait a little until more mature version of EF arrive (looking forward to play with it in .NET 4.0).</p>
<p><strong>Why I don&#8217;t like it anymore</strong></p>
<p>There are few things that annoys me with that. Tools that enable to quickly generate model objects from database schema (ADO.NET Entity Data Model Designer) is sort of an &#8220;error prone&#8221;. Each time i make modifications to db, and try to update model &#8211; it fails. And each time it is for a different reason. I completely stopped using it.</p>
<p><strong>And how i almost ended up using it</strong></p>
<p>But there are far serious problems. Or maybe ,better say, issues. One of them &#8211; one that really makes me feel scary was t-sql code generated by entity framework. In so many cases not really efficient one. But really strange when it comes to multiple joins. Have you ever looked at those gigantic &#8220;select&#8221; statement when you try to &#8220;Include&#8221; multiple entity collections to the result. I deliberately choose to name it &#8220;an issue&#8221;, cause i understand that is not an error. Moreover such queries cause some serious performance problems.</p>
<p>In my project, I ended up with following code:</p>
<pre class="brush: csharp;">var product = _productRepository.GetProductSet()
    .Include(&quot;Tags&quot;)
    .Include(&quot;Attachments&quot;)
    .Include(&quot;MarkAsDuplicatedBy&quot;)
    .Include(&quot;MarkAsDuplicatedBy.UserDetails&quot;)
    .Include(&quot;;FavouriteMarks&quot;)
    .Include(&quot;FavouriteMarks.User&quot;)
    .Include(&quot;FavoutiteMarks.User.UserDetails&quot;)
    .Include(&quot;;Orders&quot;)
    .Include(&quot;Orders.OrderDetails&quot;)
    .Include(&quot;Orders.User&quot;)
    .Include(&quot;Orders.Comments&quot;)
    .Include(&quot;Orders.Comments.User&quot;)
    .Include(&quot;Comments&quot;)
    .Include(&quot;Comments.User&quot;)
    .Include(&quot;Comments.User.UserDetails&quot;)
    .FirstOrDefault(p =&gt; p.ProductId == productId);
</pre>
<p>It is pretty straightforward. You have a product, products have a list of orders. Users can leave comments for each product, order or mark one as their favourite. Moreover, each product can be marked as a duplicate &#8211; notifying that there is another exactly the same product in in the store. Easy? Easy.<br />
And Now it is lesson I recently learned. Such query is a KILLER! Believe me or not, it produces query of 3500 lines, where word &#8220;join&#8221; occurs 713 times. Unbelievable! It takes 4 seconds for this query to execute on my machine.<br />
Now, playing with it a little I have managed to optimize it a lot. Don&#8217;t know if i am such a genius or my first approach was so bad&#8230; Rather second option, anyway&#8230;</p>
<p>First thing we may do is to reduce this code by separating &#8220;MarkAsDuplicate&#8221; property. That is something that will be used pretty rarely (le us hope so) so we can move it outside main query.</p>
<pre class="brush: csharp;">
    if(product.MarkAsDuplicatedByReference.EntityKey != null){
        var user = product.MarkAsDuplicatedByReference
                                                .CreateSourceQuery()
                                                .Include(&quot;UserDetails&quot;).FirstOrDefault();
        product.MarkAsDuplicatedBy = user;
}
</pre>
<p>We first check if there is an assigned entity key for navigation property. Thanks to that we load more information only under condition there is a reason for that. Such a object is furhere assigned to</p>
<p>Secondly we may separate favourite marks, orders and comments.</p>
<pre class="brush: csharp;">

var favs = product.FavouriteMarks.CreateSourceQuery()
                                      .Include(&quot;User&quot;)
                                      .Include(&quot;User.UserDetails&quot;)
                                      .ToList();

foreach (var fav in favs){
    product.FavouriteMarks.Attach(fav);
}

var orders = product.Orders.CreateSourceQuery()
                                      .Include(&quot;OrderDetails&quot;)
                                      .Include(&quot;User&quot;)
                                      .Include(&quot;Comments&quot;)
                                      .Include(&quot;Comments.User&quot;)

foreach (var order in orders){
    product.Orders.Attach(order);
}
</pre>
<p>And similarly with comments&#8230;.</p>
<p>Although such an approach produces four db calls instead of one (like previously) achieved performance improvement is significant. In my case I have managed to drop it from 4 seconds to 1 second. Look at the table below to compare performance:</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="127"><strong> </strong></td>
<td width="108"><strong>No of sql statements</strong></td>
<td width="108"><strong>No of JOINs</strong></td>
<td width="84"><strong>Time[sec]</strong></td>
</tr>
<tr>
<td width="127">Before splitting</td>
<td width="108">1</td>
<td width="108">713</td>
<td width="84">4</td>
</tr>
<tr>
<td width="127">After splitting</td>
<td width="108">4</td>
<td width="108">360</td>
<td width="84">0.8</td>
</tr>
</tbody>
</table>
<p>As you can see, number of joins was reduced twice and now our query is 5 times faster.</p>
<p>Another problem that arrives with such an approach is that it makes writing unit tests slightly harder. both Include and CreateSourceQuery methods are specific to Entity Framework. One way to overcome this is to prepare extension methods that would work differently depending on the context. Similar to example below:</p>
<pre class="brush: csharp;">

public static class RepositoryExtensions {

        public static IQueryable&lt;TEntity&gt; LoadWith(this IQueryable&lt;TEntity&gt; obj, string path) {
             var query = obj as ObjectQuery&lt;TEntity&gt;;
             if (query != null)
                 return query.Include(path);
            return obj;
        }

        public static IQueryable&lt;TEntity&gt; CreateQuery(this EntityCollection&lt;TEntity&gt; entityCollection) where TEntity : EntityObject {
             var query = entityCollection.CreateSourceQuery();
             if (query == null)
                 return entityCollection.AsQueryable();
             return entityCollection.CreateSourceQuery();
        }
}
</pre>
<p>All that is left is to replace all calls to Include with LoadWith, and all calls to CreateSourceQuery with CreateQuery. Basic aim for those extension methods is to enable them to behave differently in case when we deal with ObjectQuery in entity framework environment, and differently when we have just a plain objects.</p>
<p><strong>Summary</strong></p>
<p>I hope some of You &#8211; especially those that are new to Entity Framework, like I am &#8211; will find this hint helpful. I have shown that sometimes, especially when we try to load entity with plenty of relations we made end up in a sql hell. In such a case it can be useful to split single query into few smaller. Despite the fact that we loose some performance due to those additional calls we end up with much higher gain. I have also demonstrated how further on such code may be improved for better unit testing. Thanks and happy coding</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/11/a-hint-for-entity-framework-multi-join-performance-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Something is just wrong with this CAPTCHA!</title>
		<link>http://itmeze.com/2009/10/something-is-just-wrong-with-this-captcha/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=something-is-just-wrong-with-this-captcha</link>
		<comments>http://itmeze.com/2009/10/something-is-just-wrong-with-this-captcha/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 20:53:14 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=166</guid>
		<description><![CDATA[Everyone knows what CAPTCHA is. This few weird letters/word that you write down to prove that you are a human. There are ton&#8217;s of them all around. Here and there. Often people (or developers) overuse them on web sites, which can be really annoying. I was trying to register on one of the web sites [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
Everyone knows what CAPTCHA is. This few weird letters/word that you write down to prove that you are a human. There are ton&#8217;s of them all around. Here and there. Often people (or developers) overuse them on web sites, which can be really annoying.<br />
I was trying to register on one of the web sites today. After filling 16 (literally: sixteen) required fields on some really strange wizard I finally come up to form submission. This is what i saw:</p>
<p><img class="alignnone size-full wp-image-178" title="weird catcha" src="http://itmeze.com/wp-content/uploads/2009/10/catcha1.png" alt="weird catcha" width="448" height="193" /></p>
<p>Yeah, pretty straightforward. I thought. After filling input with PHN i saw JavaScript alert: &#8216;Invalid captcha!. Please try again&#8217;. I tried. And again the same. I was just about to abandon whole the process, but it all looked so strange i decided to  check what is going on in firebug. And then i figured out that actually valid input would be: &#8216;green&#8217;. WHAT?<br />
Then I have read carefully what was written below the image: &#8216;If You are happy please type the color of the second character&#8217;. Argh! Wasn&#8217;t that obvious?</p>
<p>WEB DEVELOPERS! PLEASE, DON&#8217;T MAKE OUR LIFE DIFFICULT! DON&#8217;T LET US THINK!</p>
<p>What a stupid idea to make so common thing other way around! Or maybe it is okay, and this was my fault/foolishness not to read what was written? What You think? Do You know any other weird CAPTCHA?</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/10/something-is-just-wrong-with-this-captcha/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Short history of Facebook</title>
		<link>http://itmeze.com/2009/10/short-history-of-facebook/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=short-history-of-facebook</link>
		<comments>http://itmeze.com/2009/10/short-history-of-facebook/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 20:31:09 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[internet startup]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[checkfacebook]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=174</guid>
		<description><![CDATA[If You haven&#8217;t seen or did not follow how world most popular social network changed over lat couple of years just take a break and spend next 4 minutes watching movie below. And wow, just look at those numbers! RESPECT to Mark Zuckerberg! After that I feel like an ant in today&#8217;s world. I also [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
If You haven&#8217;t seen or did not follow how world most popular social network changed over lat couple of years just take a break and spend next 4 minutes watching movie below.</p>
<p>And wow, just look at those numbers! RESPECT to Mark Zuckerberg!</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/6ju4LyQaZCE&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=pl&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/6ju4LyQaZCE&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=pl&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>After that I feel like an ant in today&#8217;s world.</p>
<p>I also recommend visiting web site: <a title="facebook stats" href="http://www.checkfacebook.com/">CheckFacebook</a>. Where you can get some up to date stats about popularity and growth of Facebook user&#8217;s all over the world. Here is a simple screen shoot:</p>
<p><img class="alignnone size-full wp-image-190" title="checkfacebook user's in cyprus" src="http://itmeze.com/wp-content/uploads/2009/10/checkfacebook.jpg" alt="checkfacebook user's in cyprus" width="500" height="351" /></p>
<p>It looks like it is pretty popular in Cyprus as well  &#8211; third of population&#8230;.</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/10/short-history-of-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS2010 Beta 2 is out! For MS employees :/</title>
		<link>http://itmeze.com/2009/10/vs2010-beta-2-is-out-for-ms-employees/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=vs2010-beta-2-is-out-for-ms-employees</link>
		<comments>http://itmeze.com/2009/10/vs2010-beta-2-is-out-for-ms-employees/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 21:18:03 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=169</guid>
		<description><![CDATA[I have just read that It looks like Microsoft employees are already playing with beta 2 of Visual Studio 2010. Nice, very nice. We want it too! Especially that it sucks to use beta 1 on old machine! And because You promised to fix some performance issues in next beta I desperately need that. Like [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/05/abandon-aspnet/' rel='bookmark' title='Permanent Link: Abandon ASP.NET WebForms!'>Abandon ASP.NET WebForms!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
I have just read that It looks like Microsoft employees are already playing with beta 2 of Visual Studio 2010.</p>
<p>Nice, very nice. We want it too! Especially that it sucks to use beta 1 on old machine! And because You promised to fix some performance issues in next beta I desperately need that. Like now!</p>
<p>Read here blog entry from <a title="it looks like MS employees are already playing with visual studio 2010!" href="http://misfitgeek.com/blog/sharing-a-tiny-career-milestone/">Misfit Geek</a>.</p>
<p>Hope to download this version soon&#8230;</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/05/abandon-aspnet/' rel='bookmark' title='Permanent Link: Abandon ASP.NET WebForms!'>Abandon ASP.NET WebForms!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/10/vs2010-beta-2-is-out-for-ms-employees/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making internet start-up… Advices from Kevin Rose&#8230; and me</title>
		<link>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=making-internet-start-up%25e2%2580%25a6-advices-from-kevin-rose</link>
		<comments>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 21:38:31 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[internet startup]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[carson]]></category>
		<category><![CDATA[digg]]></category>
		<category><![CDATA[kevin rose]]></category>
		<category><![CDATA[pownce]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[wefollow]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=139</guid>
		<description><![CDATA[Have You ever heard about Kevin Rose? No? He is known for his internet start-ups, like: Revision3 &#8211; internet television network, micro-blogging platform Pownce, and probably most known &#8211; social bookmarking Digg. Some of you might recognize wefollow.com project, especially If You are heavy twitter users. I have just watched his excellent presentation at FOWA [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/' rel='bookmark' title='Permanent Link: Making internet start-up… Part 2: Choosing tools'>Making internet start-up… Part 2: Choosing tools</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<span style="background-color: #ffffff;">Have You ever heard about Kevin Rose?</span></p>
<p>No? He is known for his internet start-ups, like: Revision3 &#8211; internet television network, micro-blogging platform Pownce, and probably most known &#8211; social bookmarking Digg. Some of you might recognize wefollow.com project, especially If You are heavy twitter users.</p>
<p>I have just watched his excellent presentation at FOWA (The Future of Web Apps London) &#8211; found on the <a title="Carsonified's Blog" href="http://carsonified.com/blog/" target="_blank">Carsonified&#8217;s Blog</a>. He shares some ideas how to &#8220;take your site from one to one million users&#8221;.  Some of You will definitely find this useful.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="220" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=6905398&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="400" height="220" src="http://vimeo.com/moogaloop.swf?clip_id=6905398&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/6905398" target="_blank">Taking your Site from One to One Million Users by Kevin Rose</a> from <a href="http://vimeo.com/carsonified" target="_blank">Carsonified</a> on <a href="http://vimeo.com" target="_blank">Vimeo</a>.</p>
<p>What Do You think? To be honest &#8211; I really, really liked it. Maybe It wasn&#8217;t something fresh, something that we were not aware of, but something that allows web start-up creators to take another look at things they currently do or plan to do in the nearest future. And by the way, Kevin Rose is a good speaker and was able to present his ideas clearly, with some well chosen examples.</p>
<p>Let me comment on few of his thoughts.</p>
<p><strong>1. Ego (Give a reward for user&#8217;s contributing to my system)<br />
</strong></p>
<p>This is mainly concern for all of You thinking about web 2.0 start-up &#8211; web site that will gather community. Idea is pretty simple &#8211; give a reward for what people are doing, how they contribute to system.</p>
<p>Just look at the Facebook &#8211; how people are proud how many friends they have. Or Twitter &#8211; how users (or celebrities) compete to have more and more followers. To be honest &#8211; I am glad to have spam users following me - it doesn&#8217;t matter as long as my counter increases <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Or take a look at StackOverflow &#8211; programmers care so much about their reputations and badges in the system. One of Kevin&#8217;s new projects (wefollow.com) is just a twitter&#8217;s leader board, no more&#8230; Whole project just about that.</p>
<p>It was mentioned at the very end of the presentation (during &#8220;questions&#8221; time) that user&#8217;s should not be punished for their improper behavior.  I couldn&#8217;t agree more. Before you punish someone (by banning user or deleting reputation) make sure that he/she fully understands how web site works&#8230; Probably punished user means lost user.</p>
<p><strong>2. Simplicity and Analysis</strong></p>
<p>Some of top community portals are simple and they focus on their certain functionality. Digg is about Digging links, Twitter about Twitting, Google about Googling <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Everyone knows that. So, stop building new Facebook, it will take ages. Focus on your core features. And remember &#8211; if you think building even simple features like twitter or digg have, does not take days or weeks if you really want user friendly experience.</p>
<blockquote><p>Stop thinking you understand your users. Don&#8217;t assume that users do what you think they do.</p></blockquote>
<p>Stop building new features that will take ages to finish, just because you think user&#8217;s may like it. Don&#8217;t spend time on features none cares about. Do investigation first. Allow user&#8217;s to provide feedback at your website, do it yourself or make use of existing projects for collecting user&#8217;s opinion, like: <a href="http://uservoice.com" target="_blank">UserVoice</a> or <a href="http://getsatisfaction.com/" target="_blank">Get Satisfaction</a>. Analyze your pages &#8211; use <a href="http://google.com/analytics" target="_blank">Google Analytics</a> &#8211; it is for free and can bring a huge value to your knowledge about your customers, visitors. Analyze it &#8211; check how they show up on your website, what are they doing, when, from where they live (exit pages).</p>
<p><strong>3. Marketing</strong></p>
<p>Run your own blog, run your project&#8217;s blog. Talk to other bloggers about Your project &#8211; make them write about your project. Don&#8217;t use force!  <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Use <a href="http://google.com/alerts" target="_blank">Google Alerts</a> &#8211; it will help you to respond to articles, entries where they mention your start-up.  Show Your project at conferences, make a demo to visualize your ideas.  Just think about the fact that Digg is where it is without a penny spend on keyword campaigns in internet.</p>
<p>Ugh&#8230; I am not really good at that. That makes me nervous every time i think about it. I like to think about myself as one to get job done. I am developer &#8211; marketing is fu!</p>
<p><strong>4.</strong><strong> Advisors</strong></p>
<p>No matter what You think and how clever you are, there are people smarter than you, more experienced than you &#8211; especially if it concerns specialized areas (marketing, recruitment, business model, fund raising).</p>
<p><strong>5. At the end</strong></p>
<p>Most (90%) of web projects collapse. Extinct. It&#8217;s not the case with you. <a href="http://www.codinghorror.com/blog/archives/001297.html" target="_blank">But one smart guy once said that</a>:</p>
<blockquote><p>The only truly <em>failed</em> project is <strong>the one where you didn&#8217;t learn anything along the way</strong>.</p></blockquote>
<p>Uh&#8230; so true&#8230;</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/' rel='bookmark' title='Permanent Link: Making internet start-up… Part 2: Choosing tools'>Making internet start-up… Part 2: Choosing tools</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making internet start-up… Part 2: Choosing tools</title>
		<link>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=making-internet-start-up%25e2%2580%25a6-part-2-choosing-tools</link>
		<comments>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 21:32:12 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[internet startup]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=112</guid>
		<description><![CDATA[It has been a while since my last entry in this series. In previous one i made decision: what i would like to make and why. To sum up, I want to make something simple, something about travelling, for travellers, something that may follow idea of websites like: Yahoo Answers or StackOverflow. The next step [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/' rel='bookmark' title='Permanent Link: Making internet start-up… Advices from Kevin Rose&#8230; and me'>Making internet start-up… Advices from Kevin Rose&#8230; and me</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
It has been a while since my last entry in this series. In <a title="Making internet start-up… Part 1: What to make?" href="http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/">previous one</a> i made decision: what i would like to make and why. To sum up, I want to make something simple, something about travelling, for travellers, something that may follow idea of websites like: Yahoo Answers or StackOverflow.</p>
<p>The next step is to choose appropriate tools, that will help me to build start-up.</p>
<h3><strong>1. Choosing technology</strong></h3>
<p>Choosing the right technology for web development is crucial.</p>
<p>What I believe, is that MVC pattern suits web and simply &#8211; it just the best for the web. So before choosing technology I need to consider if  there is a way to use MVC pattern with it. Python Django, RubyOnRails, PHP Zend, ASP.NET MVC. Taking look at populurity of them gives:</p>
<p><img class="size-full wp-image-116 alignnone" title="compare frameworks" src="http://itmeze.com/wp-content/uploads/2009/09/compare-frameworks.jpg" alt="compare frameworks" width="585" height="316" /></p>
<p>On the graph, generated with Google Trends it is clearly visible that python django and php zend framework are gaining a increasing interest since middle of 2005. Slightly opposite things happen to &#8220;Ruby on Rails&#8221;. ASP.NET MVC is relatively new in the group, but it is constantly gaining more and more interest.</p>
<p>Before making decision I need to consider couple more factors. That is going to be a tough decision. Up to now I had very little experience with framworks beside ASP.NET. It so tempting for me to choose Django framework &#8211; not only it is so far the most popular framework following MVC patters &#8211; which tells something about community, it is nicely documented as well. It has a brilliant administration panel, and build-in ORM.  Moreover I love to learn, I love to play with something new. But on the other side &#8211; let&#8217;s face the truth. It would take far longer to make new web site. I had experience with python during my studies &#8211; but assuming some things have changed during last years, it will take some time for me to adjust &#8211; to make full advantage of it&#8217;s features. Moreover, there are some environments for python django that i am not really familiar with &#8211; like eclipse. Overall, after a lot of brain storms i decided to stick with ASP.NET MVC (wit Visual Studio 2008). I know it, I work with it. Also it looks like this project is under constant development &#8211; notice that after few months since ASP.NET 1.0 was released we already have APS.NET 2.0 preview.</p>
<p>Decision: ASP.NET MVC (but would like to play with Django&#8230; <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Maybe next time&#8230;</p>
<h3><strong>2. Database and ORM</strong></h3>
<p>I had experience with both SQL Server and MySql. Like both of them. But since decision concerning main technology/framework was made on advantage of microsoft technologies i decided to choose MS SQL Server for this task as well.</p>
<p>Second choise is for object relational mapper. Here, knowing we are going to stick to .net we can choose among: NHibernate, SubSonic, Entity Framework, Linq to SQL. Lets play with Google trends again&#8230;.</p>
<p><img class="size-full wp-image-123 alignnone" title="orms in google trends" src="http://itmeze.com/wp-content/uploads/2009/10/orms.png" alt="orms in google trends" width="596" height="328" /></p>
<p>As expected NHibernate is a leader. It is no surprise as NHibernate is a quite mature &#8211; especially in IT world (5 years , wow, that&#8217;s a lot!). Another interesting ORM is Entity Framework &#8211; as according to some Microsoft officials this is going to be a main line in the future. For me is no much difference. There is some buzz recently concerning new release of Entity Framework &#8211; version 4 &#8211; should be released together with .net 4.0 and visual studio 2010. There will be a &#8220;model first&#8221; approach and POCO classes. I&#8217;m excited. VS 2010 + .NET 4.0 is about to come in few months so i guess i will play with 1.0 version of EF and then immediately switch to newer one as soon as it is ready&#8230;</p>
<p>Decision: Entity Framework</p>
<h3>3. JavaScript framework</h3>
<p>Here, answer is the pretty simple. Comparing some of popular JavaScript frameworks&#8230;</p>
<p><img class="alignnone size-full wp-image-125" title="javascript_frameworks" src="http://itmeze.com/wp-content/uploads/2009/10/javascript_frameworks.png" alt="javascript_frameworks" width="591" height="327" /></p>
<p>No doubts this time. jQuery is the most popular one. Plus you can use Google&#8217;s CDN. Plus it ships with Visual Studio on MIT licence.  Plus &#8211; it is just brilliant and has thousands of plugins&#8230;.</p>
<p>Decision: jQuery</p>
<h3>4. Rich JavaScript text editor</h3>
<p>I want to enable heavy posting, answering, commenting on the web site. For that i need some rich text editor.</p>
<p>There are generally two types of rich text editors: WYSIWYG (What You Sea Is What You Get) and WYSIWYM (What You See Is What You Mean).  From development point of view WYSIWYM editors are an obvious choice.  Why? Simply because most of WYSIWYG editors produce code of really poor quality, not to cal it sh**y. But for majority of users &#8211; WYSIWYG editors are more natural &#8211; simply because most of them are familiar with MS Word.   And it is a user that we really care about making internet web site. And I plan to make an application for all. Including my grandmas&#8230; How would i explain them how to use markup editors? <span style="background-color: #ffffff;"> </span></p>
<p>There are some mature WYSIWYG products, like  tinyMCE and CKEditor (previously known as FCKeditor). The only problem with them is that they are so heavy (above 100KB). That is way too much. Especially when I don&#8217;t need new MS Word. I just need few basic actions: bold, italic, list, link. That&#8217;s it. Nothing more. Why would i need some advanced features for posting questions or leaving comments?</p>
<p>Since i already decided that jQuery will be my JavaScript framework I took a look at some plugins that can serve editor&#8217;s functionality.  I have managed to find some: jwysiwyg, jquery RTE, jhtmlarea, RTE light. I have no bloody idea which one to choose. I will start jwysiwyg, play with it a little. If i am not happy, i will try other one. Let me just give it a try. <span style="background-color: #ffffff;">I read somewhere that JQuery UI team is working on text editor&#8230; might consider that in the future&#8230;.</span></p>
<p>Now, the tricky part with WYSIWYG editors is that you might get a poor html code. Moreover, this code might differ depending on user browser &#8211; as most of previously mentioned editors make use of some browser&#8217;s build-in features. Making library that will help me to parse and &#8220;fix&#8221; user code &#8211; to change it info semantic html is very, very difficult and tricky. So note for everyone &#8211; don&#8217;t do it yourself.  There is a library that might help you with that: <span style="background-color: #ffffff;">HtmlAgilityPack, and it will definitely help me! Hey, check &#8211; after few quite years there is a fresh release of <a title="htmlagilitypack 1.4 beta" href="http://htmlagilitypack.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=33102">1.4 beta</a>.</span></p>
<p><span style="background-color: #ffffff;">Decision: jwysiwyg for now. Changing that shouldn&#8217;t be a problem&#8230;</span></p>
<h3>5. Summary</h3>
<p><strong>This article is not a comparison of technologies. </strong>Remember, that i do not compare asp.net with python, mvc with django. I just choose tools to work with. Having Google Trends as a way to help me make a decision is a tiny add-on. Just to make sure some technology/framework/library &#8211; thus community &#8211; is not dead already. As i need help, like most of the developers.</p>
<p>Life is brutal &#8211; although i would like to play with some alternatives i need to face the truth and i choose those that i feel most comfortable with and will enable me to deliver app in certain period of time.</p>
<p>Uh, long post. time for ice-creams &#8230; <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/' rel='bookmark' title='Permanent Link: Making internet start-up&#8230; Part 1: What to make?'>Making internet start-up&#8230; Part 1: What to make?</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/' rel='bookmark' title='Permanent Link: Making internet start-up… Advices from Kevin Rose&#8230; and me'>Making internet start-up… Advices from Kevin Rose&#8230; and me</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method</title>
		<link>http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method</link>
		<comments>http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 10:53:22 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=98</guid>
		<description><![CDATA[It all started innocently&#8230; I had the simplest form ever. Just a few text inputs, and one checkbox. State of one of the text inputs was determined by status of one the checkbox. If checkbox was not checked (or &#8220;on&#8221;) input was set to be disabled. As simple as that. The problem arrived when someone [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/' rel='bookmark' title='Permanent Link: Tips for jQuery validation plugin'>Tips for jQuery validation plugin</a></li>
<li><a href='http://itmeze.com/2010/06/getting-ugly-with-beginactionlink-helper/' rel='bookmark' title='Permanent Link: Getting ugly with BeginActionLink helper!'>Getting ugly with BeginActionLink helper!</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
It all started innocently&#8230; <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I had the simplest form ever. Just a few text inputs, and one checkbox. State of one of the text inputs was determined by status of one the checkbox. If checkbox was not checked (or &#8220;on&#8221;) input was set to be disabled. As simple as that.</p>
<p>The problem arrived when someone was trying to view web site with javascript turned off. Because input was set disabled at initial stage there was no way to enable it &#8211; no matter if checkbox was checked or not. I know, <em>mea culpa</em>.</p>
<p>As you probably know, <a title="w3 document concerning forms in html document" href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2"><strong>controls that are disabled are not treated as valid for submission</strong></a>. So there was no form element for it at server side (Request.Form had no entry with such a key). During validation phase i was checking for this input &#8211; since it was not send and then null, validation failed, and i was adding model error. Like that:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>notify <span style="color: #008000;">&amp;&amp;</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #000000;">&#40;</span>notifyEmail<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
    _modelState.<span style="color: #0000FF;">AddError</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;notifyEmail&quot;</span>, <span style="color: #666666;">&quot;Pleave provide email....&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p><em>Notify</em> value represent checkbox and <em>notifyemail</em> &#8211; text input. So, the problem arrived when i was trying to redisplay form &#8211; due to errors in model state. I had error under:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span> <span style="color: #008000;">%=</span> Html.<span style="color: #0000FF;">TextBox</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;notifyEmail&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">%&gt;</span></pre></div></div>

<blockquote><p><strong>System.NullReferenceException: Object reference not set to an instance of an object.</strong><br />
System.Web.HttpUnhandledException: Exception of type &#8216;System.Web.HttpUnhandledException&#8217; was thrown. &#8212;&gt; System.NullReferenceException: Object reference not set to an instance of an object.<br />
at System.Web.Mvc.HtmlHelper.GetModelStateValue(String key, Type destinationType)<br />
at System.Web.Mvc.Html.InputExtensions.InputHelper(HtmlHelper htmlHelper, InputType inputType, String name, Object value, Boolean useViewData, Boolean isChecked, Boolean setId, Boolean isExplicitValue, IDictionary`2 htmlAttributes)<br />
at System.Web.Mvc.Html.InputExtensions.TextBox(HtmlHelper htmlHelper, String name, Object value, IDictionary`2 htmlAttributes)<br />
at System.Web.Mvc.Html.InputExtensions.TextBox(HtmlHelper htmlHelper, String name, Object value, Object htmlAttributes)</p></blockquote>
<p>It looks like there is a problem because there is a model state error and no original value being set. It is used for some of controls under HtmlHelpres. It is rather serious issue. Just imagine it may happen for radio buttons (without any of them being &#8220;on&#8221;) as well. Simplest possible solution (or rather workaround) is to set different modelstate key and then use it as validation key message under textbox, like:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>notify <span style="color: #008000;">&amp;&amp;</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">IsNullOrEmpty</span><span style="color: #000000;">&#40;</span>notifyEmail<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
    _modelState.<span style="color: #0000FF;">AddError</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;notifyEmailErr&quot;</span>, <span style="color: #666666;">&quot;Pleave provide email....&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&lt;</span> <span style="color: #008000;">%=</span> Html.<span style="color: #0000FF;">TextBox</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;notifyEmail&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">%&gt;</span>
<span style="color: #008000;">&lt;</span> <span style="color: #008000;">%=</span> Html.<span style="color: #0000FF;">ValidationMessage</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;notifyEmailErr&quot;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">%&gt;</span></pre></div></div>

<p>Hope it will help someone&#8230;.</p>
<p>It looks like ASP.NET MVC 2.0 preview 1 has this one fixed&#8230;</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/' rel='bookmark' title='Permanent Link: Tips for jQuery validation plugin'>Tips for jQuery validation plugin</a></li>
<li><a href='http://itmeze.com/2010/06/getting-ugly-with-beginactionlink-helper/' rel='bookmark' title='Permanent Link: Getting ugly with BeginActionLink helper!'>Getting ugly with BeginActionLink helper!</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joining &#8220;IE 6 no more&#8221; campaign</title>
		<link>http://itmeze.com/2009/08/joining-ie-6-no-more-campaign/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=joining-ie-6-no-more-campaign</link>
		<comments>http://itmeze.com/2009/08/joining-ie-6-no-more-campaign/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:36:00 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=89</guid>
		<description><![CDATA[It is not the first campaign when someone is trying to kick out IE6 from our life.  I guess it all started with some Scandinavian portals encouraging  bloggers to put &#8220;IE6 warning&#8221; on their web sites. I was rather sceptical about whole idea.  Especially at the very beginning. Most of IE6 users are either forced to use &#8220;mature&#8221; solutions (i am talking [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
It is not the first <a title="link to IE 6 no more campaign " href="http://www.ie6nomore.com/">campaign </a>when someone is trying to kick out IE6 from our life.  I guess it all started with some Scandinavian portals encouraging  bloggers to put &#8220;IE6 warning&#8221; on their web sites.</p>
<p>I was rather sceptical about whole idea.  Especially at the very beginning. Most of IE6 users are either forced to use &#8220;mature&#8221; solutions (i am talking about large corporations) or does not understand meaning of words like standards or security (so called &#8220;mature&#8221; users). Like my mom or dad! Until today they double-click &#8220;IE&#8221; icon saying &#8220;i am turning internet on&#8221;. Brilliant &#8230;</p>
<p>So, what is the point of joining such a campaign? IE6 will die anyway. According to recent <a title="see recent browser statistics" href="http://www.w3schools.com/browsers/browsers_stats.asp" target="_blank">browser statistics</a> IE6 drops by 0.5-0.6% every month. Having 14.5% nowadays it will take roughly 2 years for it to drop below 2-3% (I assume it will take far more to completely get rid of it). Such a level, I guess can be neglected.<img class="alignright size-medium wp-image-90" title="automatic_voting_machine" src="http://itmeze.com/wp-content/uploads/2009/08/automatic_voting_machine-237x300.jpg" alt="automatic_voting_machine" width="237" height="300" /></p>
<p>Let us ask each other: Are we going to change much? Well, I believe that questions is inappropriate. It is a little bit like with democracy and elections. We know that our vote is just a tiny fraction of all votes.  But still we believe in it, we go and vote (or at least most of us). We know that each decision consist of such small steps. If You believe that IE6 should be abandoned you should treat it as your obligation. Obligation to vote, to demonstrate your objection.</p>
<p>Every day i lose my precious time to fix problems with IE6. Fixing css, javascript&#8230; Time that I could have spend with my family or simply relaxing. I just cannot afford not to join this campaign! Even if it is going to save extra couple of days of work during next couple of years I would say that it was worth it.</p>
<p>Just imagine people like me and you&#8230; How much time could have been saved&#8230; spent doing something meaningful&#8230; adding new features instead of fixing browser compatibility issues&#8230;</p>
<p>From now on every visitor that uses IE6 browser will notice panel at the top of this blog encouraging to install some of the alternatives to old IE6, like IE8, Firefox or Chrome.</p>
<p>P.S. I can bet we will see &#8220;IE7 no more campaign&#8221; during next 2 years <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/08/joining-ie-6-no-more-campaign/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tips for jQuery validation plugin</title>
		<link>http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=tips-for-jquery-validation-plugin</link>
		<comments>http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 12:18:41 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=80</guid>
		<description><![CDATA[Because I currently work with a couple of projects where I extensively use jQuery framework, together with it&#8217;s plugins I decided to write a post in which I can gather all of my ideas, tips that i have arrived during my work with this library.  I am a kind of guy that has a huge [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/' rel='bookmark' title='Permanent Link: Firefox 3.0: 411 Length required with JQuery'>Firefox 3.0: 411 Length required with JQuery</a></li>
<li><a href='http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/' rel='bookmark' title='Permanent Link: ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method'>ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
Because I currently work with a couple of projects where I extensively use jQuery framework, together with it&#8217;s plugins I decided to write a post in which I can gather all of my ideas, tips that i have arrived during my work with this library.  I am a kind of guy that has a huge mess not only on his computer&#8217;s desktop but even within project files. It happens that when I arrive a problem, and I am sure I have figured it out in some other project but it usually takes me ages to dig through all of them to find even simplest solution. That is why I decided that I really need a place for all my tips and tricks, so I can find them easily.</p>
<p>This post focuses on jQuery Validation plugin, as i think this is the second thing i add to my project &#8211; after jQuery core file <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I will add more and more tips from time to time as soon as I find something worth to write down.</p>
<p>Ever worked with one of most popular <a title="jQuery Validation plugin" href="http://docs.jquery.com/Plugins/Validation" target="_blank">jQuery validation plugins</a>? This is extremely powerful and yet flexible plug-in that  makes form validation in javascript really easy.</p>
<p>Beside that fact that it already contains most popular validation rules, like checking field length, validating email or url format, it enables you to write your own &#8220;rule&#8221;.</p>
<h3>1. Adding new method</h3>
<p>Plugin supports method called &#8216;equalTo&#8217;. It is widely used &#8211; especially we request password confirmation. What is not supported is &#8216;notEqualTo&#8217; method. Not that popular but can be useful from time to time.  Let us say we have a field that needs to be different from other field, like new password has to be different than old password &#8211; maybe not the best choice but draws the picture.. OK, I guess recommended way to do that would be to add new method to jQuery validation plugin:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  jQuery.<span style="color: #660066;">validator</span>.<span style="color: #660066;">addMethod</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;notEqualTo&quot;</span><span style="color: #339933;">,</span>
                             <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>value<span style="color: #339933;">,</span> element<span style="color: #339933;">,</span> param<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                                  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">optional</span><span style="color: #009900;">&#40;</span>element<span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> value <span style="color: #339933;">!=</span> $<span style="color: #009900;">&#40;</span>param<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                             <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;This has to be different...&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#change-password-form&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                rules<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #660066;">newPassword</span><span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> notEqualTo<span style="color: #339933;">:</span><span style="color: #3366CC;">'#currentPassword'</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
                messages<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> newPassword<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> notEqualTo<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;New password has to be different than old one&quot;</span> <span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>2. Preventing double form submission</h3>
<p>Another common issue every web developer arrives sooner or later is so called &#8216;double form submit&#8217;. Or going further on &#8216;multiple form submit&#8217;. It happens when user accidentally presses submit button couple of times, causing form to be send multiple times. If we have validation plugin for our form we can make use of submitHandler method to disable button after form is submitted.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">  $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#sample-form&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
                submitHandler<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>form<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">wasSent</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">wasSent</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                        $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':submit'</span><span style="color: #339933;">,</span> form<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Please wait...'</span><span style="color: #009900;">&#41;</span>
                                          .<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span>
                                          .<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'disabled'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                        form.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h3>3. Turning on/off validation under certain conditions</h3>
<p>It happens quite often that we require input in certain field only when some other element is selected. I just finished making web page that allows users to subscribe to newsletters on their request.  If user selects certain check-box &#8211; it means he want to subscribe and we require from him to put valid email in other field.<br />
Otherwise, we want to keep validation turned off. To do this, we use :</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;label for=&quot;cbxSubscribe&quot;&gt; Would you like to subscribe?&lt;/label&gt;
&lt;input id=&quot;cbxSubscribe&quot; type=&quot;checkbox&quot; /&gt;
&lt;input id=&quot;txtSubscriptionEmail&quot; name=&quot;subemail&quot; /&gt;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#sample-form&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">validate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>
  rules<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
    txtSubscriptionEmail<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span>
      required<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;#cbxSubscribe:checked&quot;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>As simple as that. Element &#8216;txtSubscriptionEmail&#8217; is required depending on evaluation of &#8216;#cbxSubscribe:checked&#8217; expression.</p>
<h3>4. Use CDN from Microsoft AJAX</h3>
<p>Surprise, Surprise! ASP.NET MVC 2 (since preview 2 i guess ) includes jQuery validation plugin to provide client side validation. Definitely good news!</p>
<p>Moreover, Microsoft now provides CDN for plugin:<a href="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js"></a></p>
<ul>
<li><a href="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js">http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js</a></li>
<li><a href="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js">http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js</a></li>
</ul>
<p>As well as documentation for visual studio &#8211; this would allow IntelliSense to work under visual studio (2008 and up):</p>
<ul>
<li><a href="http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate-vsdoc.js">http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate-vsdoc.js</a></li>
</ul>
<p>You should make use of CDN wherever possible. It saves you bandwidth, most probably Microsoft serves content faster and there is always a chance your visitors will have it cached already. Note that Google offers CDN for jQuery and some other libraries: <a title="google cdn" href="http://code.google.com/apis/ajaxlibs/" target="_blank">Google AJAX libraries API</a>.</p>
<p>Stay tuned for more updates&#8230;.</p>
<p>I will keep on adding more tips in future.</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/' rel='bookmark' title='Permanent Link: Firefox 3.0: 411 Length required with JQuery'>Firefox 3.0: 411 Length required with JQuery</a></li>
<li><a href='http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/' rel='bookmark' title='Permanent Link: ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method'>ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC 2 Preview 1 released!</title>
		<link>http://itmeze.com/2009/07/asp-net-mvc-2-preview-1-released/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=asp-net-mvc-2-preview-1-released</link>
		<comments>http://itmeze.com/2009/07/asp-net-mvc-2-preview-1-released/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 11:36:44 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[asp.net-mvc]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=59</guid>
		<description><![CDATA[YES! YES! YES! Great news for all MVC lovers, check it out on Phil&#8217;s blog No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>YES! YES! YES!</p>
<p>Great news for all MVC lovers, check it out on <a href="http://haacked.com/archive/2009/07/30/asp.net-mvc-released.aspx">Phil&#8217;s blog</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/07/asp-net-mvc-2-preview-1-released/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firefox 3.0: 411 Length required with JQuery</title>
		<link>http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=firefox-3-0-411-length-required-with-jquery</link>
		<comments>http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 11:17:08 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=53</guid>
		<description><![CDATA[I am currently working on a small project for my own. My favourite (and the only one tester) was complaining on some of &#8220;ajax&#8221; features. Tests were done with use of Firefox 3.0 &#8211; I was developing on Firefox 3.5 and had absolutely no problems with those problematic features. Anyway I decided to check this [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/' rel='bookmark' title='Permanent Link: Tips for jQuery validation plugin'>Tips for jQuery validation plugin</a></li>
<li><a href='http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/' rel='bookmark' title='Permanent Link: $.postJSON &#8211; how to avoid JSON attack'>$.postJSON &#8211; how to avoid JSON attack</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>I am currently working on a small project for my own. My favourite (and the only one tester) was  complaining on some of &#8220;ajax&#8221; features. Tests were done with use of Firefox 3.0  &#8211; I was developing on Firefox 3.5 and had absolutely no problems with those problematic features. Anyway I decided to check this out an downloaded 3.0 version ( most recent is 3.0.11). You can have multiple instances of Firefox on Your machine &#8211; just make sure You install them in separate directories. Then the best would be to create different user profiles &#8211; like one default and one for testing. You can manage profiles using :</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">firefox.exe -ProfileManager</pre></div></div>

<p>And then You can run prev version by:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">\path\Firefox 3.0\firefox.exe -P test_profile -no-remote</pre></div></div>

<p>Having this set up You can test in Firefox 3.0. I was able to reproduce error and check what is going on in firebug.<br />
I was receiving HTTP 411 error, which says:</p>
<blockquote><p>Your Web server thinks that the HTTP data stream sent by the client (e.g. your Web browser or our CheckUpDown robot) should include a &#8216;Content-Length&#8217; specification. This is typically used only for HTTP methods that result in the placement of data on the Web server, not the retrieval of data from it.</p></blockquote>
<p>It looks like jQuery (1.3.2) ajax calls with data parameter set to &#8216;null&#8217; was causing this to happen.</p>
<p>Simple solution for me was to set &#8216;{}&#8217; as data parameter value instead of &#8216;null&#8217;. Moreover, You can change method that I already mentioned about, <a title="jsonPOST with jQuery" href="http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/" target="_blank">postJSON</a> with this fix:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">postJSON</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> data<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>data <span style="color: #339933;">==</span> <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span>
         data <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
     $.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> data<span style="color: #339933;">,</span> callback<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>BTW I already use Firefox 3.5 during development &#8211; it consumes less resources than previous versions () so I strongly recommend upgrading to newest version.</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/08/tips-for-jquery-validation-plugin/' rel='bookmark' title='Permanent Link: Tips for jQuery validation plugin'>Tips for jQuery validation plugin</a></li>
<li><a href='http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/' rel='bookmark' title='Permanent Link: $.postJSON &#8211; how to avoid JSON attack'>$.postJSON &#8211; how to avoid JSON attack</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>$.postJSON &#8211; how to avoid JSON attack</title>
		<link>http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=postjson-how-to-avoid-json-attack</link>
		<comments>http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 08:26:51 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=33</guid>
		<description><![CDATA[I&#8217;ve recently read great article by Phil Haack, JSON Hijacking. It points to some JSON vulnerabilities, basically: how sensitive data can be captured by bad people during &#8220;GET JSON&#8221; request. During my web development I always start with adding some javascript helper methods. One of them, based on jQuery, is making HTTP POST instead of [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/' rel='bookmark' title='Permanent Link: Firefox 3.0: 411 Length required with JQuery'>Firefox 3.0: 411 Length required with JQuery</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
I&#8217;ve recently read great article by Phil Haack, <a href="http://haacked.com/archive/2009/06/25/json-hijacking.aspx">JSON Hijacking</a>. It points to some JSON vulnerabilities, basically: how sensitive data can be captured by bad people during &#8220;GET JSON&#8221; request. During my web development I always start with adding some javascript helper methods. One of them, based on jQuery, is making HTTP POST instead of GET. This should be sufficient to avoid majority of JSON attacks. So instead of $.getJSON( &#8230; ), use:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$.<span style="color: #660066;">postJSON</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> data<span style="color: #339933;">,</span> callback<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  $.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span>url<span style="color: #339933;">,</span> data<span style="color: #339933;">,</span> callback<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;json&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And action method with HTTP method type filter:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>AcceptVerbs<span style="color: #000000;">&#40;</span>HttpVerbs.<span style="color: #0000FF;">Post</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
<span style="color: #0600FF;">public</span> ActionResult DoSth<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> id<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-style: italic;">//.... bla bla bla ...</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>As simple as that!</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/07/firefox-3-0-411-length-required-with-jquery/' rel='bookmark' title='Permanent Link: Firefox 3.0: 411 Length required with JQuery'>Firefox 3.0: 411 Length required with JQuery</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/06/postjson-how-to-avoid-json-attack/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making internet start-up&#8230; Part 1: What to make?</title>
		<link>http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=making-internet-start-up-part-1-what-to-make</link>
		<comments>http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:55:45 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[internet startup]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=24</guid>
		<description><![CDATA[Recently I have more free time so I decided that It is a good time to start small internet start-up. Why small? First of all It is just me that is going to work on it. For now Until it will get super successful&#8230; Secondly I really like simple and small solutions. I tried to [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/' rel='bookmark' title='Permanent Link: Making internet start-up… Part 2: Choosing tools'>Making internet start-up… Part 2: Choosing tools</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/' rel='bookmark' title='Permanent Link: Making internet start-up… Advices from Kevin Rose&#8230; and me'>Making internet start-up… Advices from Kevin Rose&#8230; and me</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Recently I have more free time so I decided that It is a good time to start small internet start-up. Why small? First of all It is just me that is going to work on it. For now <img src='http://itmeze.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Until it will get super successful&#8230;  Secondly  I really like simple and small solutions. I tried to make something advanced, not trivial few times during recent years always ending up somewhere at the begging, giving up, realizing that project I was working on is not for single person, and I do not want to spend next few years working on sth that may never success. From that moment I know that as long as It is just me working on sth I need to come up with simple, 2-3 months projects.</p>
<p>Ok, so far I know that I would like to make sth simple, sth that won&#8217;t take me few months&#8230; But what to do? It may sound trivial but I really belive that whatever You do It can succeed only If You are really passionate about it. It is just like with the job &#8211; You can be really good at something only if  You really care about it (okay, there are exceptions).  I never mention that but I am a big fan of traveling &#8211; I dream that some day I can somehow join programming with exploring new places and cultures. I am always frustrated when I think that there are at most 2 weeks each year (holidays!) one can spend on traveling. I would like my start-up to be connected with my other (beside programming) passions.</p>
<p>I was thinking about project that can help people that are planning their trips &#8211; no matter if it is an Amazonian expedition or family holidays. I would like foreigners, or people that &#8220;just landed&#8221; in new country, territory to find useful information via this web site. I was in the same situation some time ago when I first came in Cyprus in order to find job. I was fighting with plenty of obstacles at the begging. I really consider knowledge that I gained during that time as invaluable, and It is kind of an experience that cannot be gained from any guide or government papers.</p>
<p>I am not planning to make sth super popular. Probably I would start with some sort of forum that can serve local community &#8211; here in Cyprus. I would count on selectivity of information. I am going to count on people&#8217;s experience and their will to share it. I will take inspiration from web sites like: tripadvisor, travbuddy and merge it with portals that work like &#8220;Question and Answers&#8221;: wikianswers, Yahoo! Answers, stackoverflow.</p>
<p>I am open to any suggestions and ideas concerning my project so feel free to send it on email at mike at itmeze.com, or simply leave comment. Thanks in advance</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-part-2-choosing-tools/' rel='bookmark' title='Permanent Link: Making internet start-up… Part 2: Choosing tools'>Making internet start-up… Part 2: Choosing tools</a></li>
<li><a href='http://itmeze.com/2009/10/making-internet-start-up%e2%80%a6-advices-from-kevin-rose/' rel='bookmark' title='Permanent Link: Making internet start-up… Advices from Kevin Rose&#8230; and me'>Making internet start-up… Advices from Kevin Rose&#8230; and me</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/06/making-internet-start-up-part-1-what-to-make/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Abandon ASP.NET WebForms!</title>
		<link>http://itmeze.com/2009/05/abandon-aspnet/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=abandon-aspnet</link>
		<comments>http://itmeze.com/2009/05/abandon-aspnet/#comments</comments>
		<pubDate>Tue, 12 May 2009 09:55:49 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://itmeze.com/?p=13</guid>
		<description><![CDATA[Just abandon ASP.NET WebForms &#8211; the sooner You realize that &#8211; the better for You. At the begging I would like to say that I used to be a BIG fan of ASP.NET. Before my experience with Microsoft technology started I had some really bad time with php and mysql. But that was some long [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/' rel='bookmark' title='Permanent Link: ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method'>ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-7051816622200841";
google_ad_slot = "0915606426";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Just abandon ASP.NET WebForms &#8211; the sooner You realize that &#8211; the better for You.</p>
<p>At the begging I would like to say that I used to be a BIG fan of ASP.NET. Before my experience with Microsoft technology started I had some really bad time with php and mysql. But that was some long time ago &#8211; in the begging of this century. Then I started playing with ASP.NET &#8211; and I really dig into it. Managed code, simplified views by use of controllers, postbacks, viewstates, widly used provider classes &nbsp;- for sitemap, &nbsp;database. It all looked just GREAT! I had barely any knowledge of web (html, css) and I was still able to make cool websites. &nbsp;You just drag and drop button &#8211; you double click it &#8211; and You immediately get place for Your code for handling button&#8217;s click event. Yeah! Event-driven web development &#8211; that sounded exacly like something I was doing so far in windows applications.</p>
<p>Somehow, the longer I was playing with that, the more confused I was. All the pros suddenly showed up to be not as cool as they looked like at the beginning. Viewstate become a performance issue, I ended up compressing it, turning it off here and there. &nbsp;Sooner or later I needed new functionality for controls &#8211; I ended up writing my own. Those provider models were not really &#8220;test friendly&#8221;. A sort of a turning point was when AJAX showed up. You make AJAX callback &#8211; You go through all stages for of page life cycle. &nbsp;What?! I need that much to change so little. &nbsp;Because I was trying to stick to Microsoft technologies and not really look around, I accepted the fact &#8211; web development is painful &#8211; it is just how it is.</p>
<p>The turning point was at the end of last year(2008). I was working on medium project for one of local companies. Company is small &#8211; has just a few developers. Project was just about to end when I had talk with my boss from US. I looked sth. like that:</p>
<p>- Boss: We are just about to release beta of our product, I talked to some web designers to make a new look for our web site.</p>
<p>- Me: Yeah! It sounds great!</p>
<p>- Boss: They will need code so that they can prepare come CSS for us&#8230;</p>
<p>I never consider myself a CSS guy, Our web site was functional but sort of &#8216;ugly&#8217; one, so it was a big relief for me. I prepared code, send it and made sample web site public. After stg like month I received PDF file with screen-shots of Our new website. It looked just great. Everything was clear, simple and yet really eye-catchy.</p>
<p>Two weeks after I had approved It I received long-waiting HTML and CSS styles. And I was shocked! It looked like those designers never looked at code. What they have made will force me to write completely new rendering of nearly all used controls (navigation, gridview etc.). I was really, really angry. At the begging I was angry at my boss for not making sure we leave it to people that know sth about asp.net, then I was angry at those designers. Finally, when I calm down I realize that actually problem lies somewhere else. Let us face the fact &#8211; why those designers need to know anything about asp.net. They prepared styles and html for a view. View has nothing to do with page flow, controls and logic. It is just a View &#8211; presentation side of Your application. How the hell they should know about <em>OnRowDataBound</em>?</p>
<p>I realized &#8211; and that was painful &#8211; that WebForms does not force developers to write loosely coupled code. By providing, or better say: allowing, &nbsp;page or controls events it destroys separation of concerns. Somehow view, control and business logic overlays each other. By adding <em>ViewState</em> it hides basic property of html protocol &#8211; it stateless. WebForm&#8217;s design make developers dumb. I am 100% serious!</p>
<p>So, my suggestion: Abandon ASP.NET WebForms if You can! Yes, You can! There are a lot of nice alternatives, including ASP.NET MVC, Pythod Django or Ruby on Rails. I really become fun of MVC framework &#8211; especially if it concerns web development. One of Microsoft MVP wrote that &#8220;You should at least learn ASP.NET MVC&#8221;. I would go further, You can not afford not to learn it.</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/09/asp-net-mvc-1-0-issue-within-htmlhelper-getmodelstatevalue-method/' rel='bookmark' title='Permanent Link: ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method'>ASP.NET MVC 1.0 issue within HtmlHelper.GetModelStateValue method</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/05/abandon-aspnet/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>My first words!</title>
		<link>http://itmeze.com/2009/04/my-first-words/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=my-first-words</link>
		<comments>http://itmeze.com/2009/04/my-first-words/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 06:39:08 +0000</pubDate>
		<dc:creator>ITmeze</dc:creator>
				<category><![CDATA[off topic]]></category>
		<category><![CDATA[about]]></category>

		<guid isPermaLink="false">http:/?p=1</guid>
		<description><![CDATA[Well, everyone has to start someday. So Dear Reader, this is my first post. Slightly more about me You will find on about-me page. I will just copy-paste part: This blog is called ITmeze. This name is somehow meaningful. Although I am a Polish citizen, I currently live on small island called Cyprus &#8211; placed [...]


Related posts:<ol><li><a href='http://itmeze.com/2009/10/vs2010-beta-2-is-out-for-ms-employees/' rel='bookmark' title='Permanent Link: VS2010 Beta 2 is out! For MS employees :/'>VS2010 Beta 2 is out! For MS employees :/</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Well, everyone has to start someday. So Dear Reader, this is my first post. Slightly more about me You will find on <a title="about me and this blog" href="http://itmeze.com/about-me/" target="_blank">about-me</a> page. I will just copy-paste part:</p>
<blockquote><p>This blog is called <strong><span style="color: #ff0000;">ITmeze</span></strong>. This name is somehow meaningful. Although I am a Polish citizen, I currently live on small island called Cyprus &#8211; placed on Mediterranean Sea &#8211; somewhere between Greece, Israel, Turkey and Egypt. And You now what is the best about Cyprus? It’s meze. This is a way of eating. If You go to restaurant and order meze You will be server with 10-20 small pieces of local meat, fishes or sea food. So that you can just seat and relax and enjoy piece of this or that. And I would like this blog to be a sort of meze &#8211; You will read here a little bit of web development, struggles I face running my internet startups, things from IT world that I find worth writing about.</p></blockquote>
<p>So just sit where You are, Dear Reader and enjoy!</p>


<p>Related posts:<ol><li><a href='http://itmeze.com/2009/10/vs2010-beta-2-is-out-for-ms-employees/' rel='bookmark' title='Permanent Link: VS2010 Beta 2 is out! For MS employees :/'>VS2010 Beta 2 is out! For MS employees :/</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://itmeze.com/2009/04/my-first-words/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
