<?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>Inside the Web</title>
	<atom:link href="http://webindoors.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webindoors.com</link>
	<description>[&#34;Web 2.0&#34;, &#34;Ruby&#34;, &#34;RoR&#34;] &#60;&#60; &#34;me&#34;</description>
	<lastBuildDate>Sun, 18 Apr 2010 13:09:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>rails wonderful content_tag method for easy html markup</title>
		<link>http://webindoors.com/2010/04/17/rails-wonderful-content_tag-method-for-easy-html-markup/</link>
		<comments>http://webindoors.com/2010/04/17/rails-wonderful-content_tag-method-for-easy-html-markup/#comments</comments>
		<pubDate>Sat, 17 Apr 2010 05:31:25 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://webindoors.com/?p=45</guid>
		<description><![CDATA[I always hate to write basic HTML tags in view files as they are  much more complex to write and the angle brackets with close/open HTML tags make the readability very worst. I became much happy when i come to know that rails is providing wonderful &#8216;content_tag&#8217; method by default for clean and easy HTML [...]]]></description>
			<content:encoded><![CDATA[<p>I always hate to write basic HTML tags in view files as they are  much more complex to write and the angle brackets with close/open HTML tags make the readability very worst. I became much happy when i come to know that rails is providing wonderful &#8216;content_tag&#8217; method by default for clean and easy HTML markup implementation.</p>
<div id="M002444">
<strong><br />
content_tag(name, content_or_options_with_block = nil, options = nil, escape = true, &amp;block)<br />
</strong>
</div>
<p><br/></p>
<div>Here,</div>
<div><strong>name</strong>:   name of html tag</div>
<div><strong>content_or_options_with_block</strong>:   content to be placed in html tag(default is nil)</div>
<div><strong>options</strong>:   hash for adding html attributes</div>
<div>
<br/></p>
<pre>Examples:
content_tag(:div, "Hello Rails!")
   # => Hello Rails!
content_tag(:div, content_tag(:p, "How Are You?"), :class =&gt; "status_msg")
   # =>  &lt;div class="status_msg"&gt;&lt;p&gt;How Are You?&lt;/p&gt;&lt;/div&gt;</pre>
</div>
<p><br/></p>
<div>We can use it as a block by passing the &#8216;options&#8217; as a second parameter. Eg:</div>
<p><br/></p>
<div>
<pre>&lt;% content_tag :span, :class =&gt; "side_footer" do -%&gt;
    I love Rails!
&lt;% end -%&gt;</pre>
</div>
<p><br/></p>
<div>I used it in one of my project to make user&#8217;s navigation bar :</div>
<p><br/></p>
<pre>
def user_navigation_bar
 content_tag(:div, :class =&gt;"top_banner") do
   if current_user
     content_tag(:li) { current_user.username}
     content_tag(:li) { link_to("Edit Profile", edit_user_path(:current)) }
     content_tag(:li) { link_to("Logout", logout_path) }
   else
     content_tag(:li) { link_to("Login", login_path) }
     content_tag(:li) { link_to("Signup", new_user_path) }
   end
  end
end
</pre>
<p></br></p>
<div>Vow,  it is easy to read with lot of  DRYness. I also like <a href="http://haml-lang.com" target="_blank">http://haml-lang.com</a> for generating clean, semantic markups.</div>
]]></content:encoded>
			<wfw:commentRss>http://webindoors.com/2010/04/17/rails-wonderful-content_tag-method-for-easy-html-markup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Place Pages – A new google maps product</title>
		<link>http://webindoors.com/2009/09/28/place-pages-%e2%80%93-a-new-google-maps-product/</link>
		<comments>http://webindoors.com/2009/09/28/place-pages-%e2%80%93-a-new-google-maps-product/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 21:53:42 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://webindoors.com/?p=34</guid>
		<description><![CDATA[Half a decade before, when i was studying in Haridwar, UK-India, i always need to come New Delhi (capital of India) for tours, picnics &#38; various entrancce exams. So, before entering in capital, i were always buy a Atlas (a map book) of N.Delhi because it’s world’s one of the largest city having too much [...]]]></description>
			<content:encoded><![CDATA[<p>Half a decade before, when i was studying in Haridwar, UK-India, i always need to come New Delhi (capital of India) for tours, picnics &amp; various entrancce exams. So, before entering in capital, i were always buy a Atlas (a map book) of N.Delhi because it’s world’s one of the largest city having too much crowd and very networked city.</p>
<p>So, i always need to explore the places( historical buildings, colleges for exams, markets for shopping etc.). But i always found Atlas has very limited information which i want. Sometimes i need to consult with delhities (delhi’s localized people) for awareness of any place.</p>
<p>I was always very thankful of google to launch <a title="Google Maps" href="http://maps.google.com/" target="_blank">google maps</a>.It was a wonderful place for exploring places anywhere in the world. With google maps, i can wonderfully zoom the maps for close look, can search nearby places, can see street views etc, some images of popular images with markers on the map.So, purpose of google map has always been to help the people to find information easily without exploring the whole web.<br />
Last week google launched <a title="Google Place Pages" href="http://googleblog.blogspot.com/2009/09/place-pages-for-google-maps-there-are.html" target="_blank">Google Place Pages </a>on google maps.A Place Page is a web page for every place in the world, organizing all the world’s information for that place.There are Place Pages for businesses, historical places, points of interest, stations and airports, landmarks, and cities all over the world.</p>
<p><img class="alignleft size-medium wp-image-35" title="gmapinfo-1" src="http://webindoors.com/wp-content/uploads/2010/01/gmapinfo-1-300x150.PNG" alt="gmapinfo-1" width="361" height="180" /></p>
<p>Now we can get to a Place Page by just clicking on “<strong>more info &gt;&gt;“</strong> in search results, or by clicking “more info” in</p>
<p>the mini-bubble.</p>
<p><img class="alignleft size-medium wp-image-36" title="gmapinfo-2" src="http://webindoors.com/wp-content/uploads/2010/01/gmapinfo-2-300x195.PNG" alt="gmapinfo-2" width="335" height="217" /></p>
<p>Here one can find Photos &amp; Videos, popular places , map image with marker pointing to your location, reviews by other visitors etc.</p>
<p><img class="alignleft size-full wp-image-37" title="gmapinfo-3" src="http://webindoors.com/wp-content/uploads/2010/01/gmapinfo-3.PNG" alt="gmapinfo-3" width="296" height="174" /></p>
<p>But there are some questions in my mind after seeing this enhancement made by google -</p>
<p>1.   Is google trying to resisting the visitors to navigate to other related travel site where one can found this</p>
<p>information?</p>
<p>2.   Will this enhancement be able to increase the revenue of google adwords by clicking the add on the google Place</p>
<p>page directly and not to any other related site ?</p>
<p>3.   Can ‘Place Page’ really affect the tours n travels guides websites and hence decrease their traffic and business ?</p>
]]></content:encoded>
			<wfw:commentRss>http://webindoors.com/2009/09/28/place-pages-%e2%80%93-a-new-google-maps-product/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Importance of NULL in MYSQL</title>
		<link>http://webindoors.com/2009/09/27/this-is-testing-post/</link>
		<comments>http://webindoors.com/2009/09/27/this-is-testing-post/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 13:25:44 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://webindoors.com/?p=16</guid>
		<description><![CDATA[At the time of creation of any table, one should take care of defining the fields like datatype, datasize etc.
Apart from these we should also take care of whether the field value can be NULL (no value) or not.
What is NULL in mysql ? -
The NULL value is special; because it means “no value”. It [...]]]></description>
			<content:encoded><![CDATA[<p>At the time of creation of any table, one should take care of defining the fields like datatype, datasize etc.<br />
Apart from these we should also take care of whether the field value can be NULL (no value) or not.</p>
<p>What is NULL in mysql ? -</p>
<p>The NULL value is special; because it means “no value”. It is basically a condition, to check whether particular field value is null or not.</p>
<p>If we are not defining the column NOTNULL than MYSQL make it NULL by-default. But We shouldn’t define fields as NULL for any field due to some following reasons -</p>
<ul>
<li>If you make any field NULL, it requires more storage      space and requires special processing inside MYSQL.</li>
</ul>
<ul>
<li>A nullable column requires extra byte per entry on the      time of indexing a column.</li>
</ul>
<ul>
<li>Its harder for MYSQL to optimize queries that refer to      nullable column because nullable columns make indexes   and      comparisions to value becomes more complicated inside MYSQL.</li>
</ul>
<p>So, We should define fields as NOT NULL whenever We can.</p>
<p>For Eg. We need to make a table of Oscar awarded singers with columns: firstname , lastname, city, birthdate, death:<br />
All singers will have firstname, lastname, city and birthdate but there can be lot of singers who has been expired.<br />
So, we can put only deathdate column NULL.</p>
<p>CREATE TABLE singers<br />
(<br />
lastname VARCHAR(15) NOT NULL,<br />
firstname VARCHAR(15) NOT NULL,<br />
city VARCHAR(20) NOT NULL,<br />
birthdate  DATE NOT NULL,<br />
deathdate DATE NULL<br />
)</p>
<p>So never forget to define NOTNULL  to any field on which any value must exist….</p>
<p>Hope it will help for your MYSQL optimization….</p>
]]></content:encoded>
			<wfw:commentRss>http://webindoors.com/2009/09/27/this-is-testing-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>form_for vs form_tag in Rails</title>
		<link>http://webindoors.com/2008/08/21/hello-world/</link>
		<comments>http://webindoors.com/2008/08/21/hello-world/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 11:50:05 +0000</pubDate>
		<dc:creator>Ankur</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://webindoors.com/?p=1</guid>
		<description><![CDATA[Both form_for and form_tag are used to submit the form in
Ruby on Rails. But form_tag just outputs a &#60;form&#62;
tag while form_for gives a means of accessing some wrapped object.
form_for :
we used form_for for a specific model i.e while we need to
create a new row in database. so, form_for perform the standard http post method and [...]]]></description>
			<content:encoded><![CDATA[<p>Both form_for and form_tag are used to submit the form in<br />
Ruby on Rails. But form_tag just outputs a &lt;form&gt;<br />
tag while form_for gives a means of accessing some wrapped object.</p>
<p>form_for :</p>
<p>we used form_for for a specific model i.e while we need to<br />
create a new row in database. so, form_for perform the standard http post method and posses active record objects.</p>
<p>Below is the example for using form_for form helper:<br />
view sourceprint?</p>
<p>&lt;% form_for @client do |f| %&gt;</p>
<p>First name: &lt;%= f.text_field :firstname %&gt;</p>
<p>Last name : &lt;%= f.text_field :lastname %&gt;</p>
<p>Email : &lt;%= f.text_field :email %&gt;</p>
<p>Address : &lt;%= f.text_area :address %&gt;</p>
<p>&lt;% end %&gt;</p>
<p>here we are using f object of model class “Client” to create form input fields</p>
<p>form_tag :</p>
<p>form_tag just creates an form as an normal form. form_for<br />
will perform the standard http post without any model<br />
backed and has normal fields. this is used mainly when<br />
specific things need to be submitted via form</p>
<p>here is the example for using form_tag in ruby on rails:<br />
view sourceprint?</p>
<p>&lt;% form_tag &#8216;/posts&#8217; do -%&gt;</p>
<p>&lt;%= text_field_tag &#8220;post&#8221;, &#8220;firstname&#8221; %&gt;</p>
<p>&lt;% end -%&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://webindoors.com/2008/08/21/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
