<?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>Vinsol - Leading Ruby on Rails Development and Consulting Firm in India</title>
	<atom:link href="http://vinsol.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://vinsol.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 18 Apr 2012 10:43:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Personalize RailsConf2012 Sessions with ConfConnect</title>
		<link>http://vinsol.com/blog/2012/04/18/personalize-railsconf2012-sessions-with-confconnect/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=personalize-railsconf2012-sessions-with-confconnect</link>
		<comments>http://vinsol.com/blog/2012/04/18/personalize-railsconf2012-sessions-with-confconnect/#comments</comments>
		<pubDate>Wed, 18 Apr 2012 10:43:03 +0000</pubDate>
		<dc:creator>naveen</dc:creator>
				<category><![CDATA[ConfConnect]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1946</guid>
		<description><![CDATA[With RailsConf 2012 just round the corner, we have been scratching our heads wondering how we can contribute in our own little way and take the conference experience to a whole new level. Well! ConfConnect is our answer. We have been attending RailsConf year after year and really we’d pour through event agendas and printouts [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>With RailsConf 2012 just round the corner, we have been scratching our heads wondering how we can contribute in our own little way and take the conference experience to a whole new level.</p>
<p><em>Well! <a href="http://confconnect.vinsol.com/" target="_blank">ConfConnect</a> is our answer.</em></p>
<p>We have been attending RailsConf year after year and really we’d pour through event agendas and printouts of the sessions we wanted to attend, touch base with people we wanted to see and arrange meeting times and places, and then struggle to find meeting places. Networking events were challenging when all we had to go on were people’s name tags, especially if all they displayed were first and last names. We worked towards changing this experience back in 2010 by first launching ConfConnect as a Rails and iOS application.</p>
<p><strong>About ConfConnect</strong></p>
<p><a href="http://confconnect.vinsol.com/" target="_blank">ConfConnect</a> is an intuitive application that lets you<strong><em> organize conference sessions and create your own schedule</em></strong>. It also allows you to post feedback, comments and recommendations about the sessions. The app is particularly useful for multi-track conferences where attendees need to choose the sessions they wish to attend.</p>
<p>With ConfConnect we have made an effort to enhance the attendees experience at the conference by providing them a basic and easy to use application that allows them to create a personalized schedule effortlessly and one which is readily available in their pockets for reference.</p>
<p>We would soon be launching the updated version of ConfConnect in the days to come. This version of the application has been re-envisioned and rebuild from the ground up with the entirely new design, interface and usability.</p>
<p>Amidst the stiff schedule and deliveries for client projects our development has been hard pressed for time but still managed to pull it off by throwing in some extra efforts. And the application is now ready to be launched across MULTIPLE platforms –<strong> Web app (Ruby on Rails) and mobile app (for iOS, Android and Windows Phone 7)</strong></p>
<p>ConfConnect iOS and Windows Phone 7 app are in the middle of their respective review process and is expected to be made live soon.</p>
<p><strong>Android App is available to download at</strong> &#8211; <a href="https://play.google.com/store/apps/details?id=com.vinsol.confconnect" target="_blank">http://bit.ly/HPebRQ </a></p>
<p>Till the time we are up and running with our new application, take a sneak peek at the upcoming changes and tweaks below:</p>
<p><a href="http://vinsol.com/blog/wp-content/uploads/2012/03/index0014.jpg"><img class="alignnone size-medium wp-image-1958" title="index001" src="http://vinsol.com/blog/wp-content/uploads/2012/03/index0014-283x300.jpg" alt="" width="283" height="300" /></a> <a style="margin-left: 45px;" href="http://vinsol.com/blog/wp-content/uploads/2012/03/track-details002.jpg"><img class="alignnone size-medium wp-image-1968" style="float: none;" title="track-details002" src="http://vinsol.com/blog/wp-content/uploads/2012/03/track-details002-256x300.jpg" alt="ConfConnect" width="256" height="300" /></a></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2012/04/18/personalize-railsconf2012-sessions-with-confconnect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMS Scheduler – Another Amazing Android App Developed by our Android Team</title>
		<link>http://vinsol.com/blog/2012/01/11/sms-scheduler-for-android-phones/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sms-scheduler-for-android-phones</link>
		<comments>http://vinsol.com/blog/2012/01/11/sms-scheduler-for-android-phones/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 06:07:52 +0000</pubDate>
		<dc:creator>naveen</dc:creator>
				<category><![CDATA[Android app]]></category>
		<category><![CDATA[SMS scheduler]]></category>
		<category><![CDATA[sms scheduler for android]]></category>
		<category><![CDATA[messaging app]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1906</guid>
		<description><![CDATA[Our Android team is on a spree of developing some amazing Android applications and the latest one that has made way from their stable is &#8216;SMS Scheduler&#8216;. The Application is the result of the continuous and incessant analysis of the users’ requirements pertaining to sending and receiving SMS’s. Statistics show there is a continuous rise [...]


Related posts:<ol><li><a href='http://vinsol.com/blog/2012/01/06/expense-tracking-app/' rel='bookmark' title='Permanent Link: Expense Tracking Made Easy with Our Android Application – Expense Tracker'>Expense Tracking Made Easy with Our Android Application – Expense Tracker</a> <small>Most of us are oblivious of our spending behavior and...</small></li>
</ol>

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Our Android team is on a spree of developing some amazing Android applications and the latest one that has made way from their stable is &#8216;<strong>SMS Scheduler</strong>&#8216;. The Application is the result of the continuous and incessant analysis of the users’ requirements pertaining to sending and receiving SMS’s.</p>
<p>Statistics show there is a continuous rise in the number of text SMS across the World, but even then more often than not, we miss to send important messages to our family, friends, officemates, or business partners on right time. This is where <strong>SMS Scheduler for Android</strong> comes to your rescue.</p>
<p>By developing this Android app we have tried to supplement the native messaging service with the ability to auto send messages at later point in time. So with SMS Scheduler installed on your Android Phone you can be the first one to send holiday greetings, occasion wishes, reminders, meetings, etc to your family, friends, peers and colleagues.</p>
<p>If you are a happy owner of Android Phone you definitely need to get your hand on one of the most slick, simple yet powerful SMS scheduling Android application with great interface.</p>
<p><a href="http://vinsol.com/blog/wp-content/uploads/2012/01/home_screen.png"><img class="alignnone size-medium wp-image-1909" style="float: none;" title="home_screen" src="http://vinsol.com/blog/wp-content/uploads/2012/01/home_screen-180x300.png" alt="sms scheduler" width="180" height="300" /></a><a style="margin-left: 20px;" href="http://vinsol.com/blog/wp-content/uploads/2012/01/schedule_sms.png"><img class="alignnone size-medium wp-image-1912" style="float: none;" title="schedule_sms" src="http://vinsol.com/blog/wp-content/uploads/2012/01/schedule_sms-180x300.png" alt="sms scheduler" width="180" height="300" /></a><a style="margin-left: 20px;" href="http://vinsol.com/blog/wp-content/uploads/2012/01/select_date_and_time.png"><img class="alignnone size-medium wp-image-1915" style="float: none;" title="select_date_and_time" src="http://vinsol.com/blog/wp-content/uploads/2012/01/select_date_and_time-180x300.png" alt="sms scheduler" width="180" height="300" /></a></p>
<p><strong>About SMS Scheduler and its Features</strong></p>
<p>Use SMS Scheduler and never forget to send those important sms!</p>
<p>SMS scheduler comes with a nice, simple and easy to use interface that allows you to schedule your messages to be sent on specific date and time. You can either schedule a message to be sent to an individual or a group.</p>
<p>No more reminders needed, never miss birthdays, anniversaries, holiday greetings and important meetings. Simply set the date and time for the message to be delivered and leave the rest to your phone to send the message for you. The SMS would be sent automatically without any user interaction.</p>
<p>So this holiday season don’t forget to send your wishes and greetings to your family, relatives and friends!</p>
<p><strong>Features:</strong></p>
<p>1)    Choose message text from pre-defined templates<br />
2)    Add custom messages to templates<br />
3)    Add your own groups<br />
4)    Recipients can be typed in directly or selected from contacts<br />
5)    Choose multiple recipients to send messages<br />
6)    View history of sent and delivered messages<br />
7)    Enter messages using Google voice<br />
8)    Messages are classified as Scheduled, Sent or Draft</p>
<p>Application Marketplace Link -<a href="https://market.android.com/details?id=com.vinsol.sms_scheduler&amp;feature=more_from_developer#?t=W251bGwsMSwxLDEwMiwiY29tLnZpbnNvbC5zbXNfc2NoZWR1bGVyIl0." target="_blank"> http://bit.ly/xVFQKi<br />
</a></p>
<p>This is the first version of the application that we have launched. We would be making constant enhancements in our consequent releases to boost its usability. Meanwhile, we would be happy to receive any feedback, opinions and comments that you might have for the application.</p>


<p>Related posts:<ol><li><a href='http://vinsol.com/blog/2012/01/06/expense-tracking-app/' rel='bookmark' title='Permanent Link: Expense Tracking Made Easy with Our Android Application – Expense Tracker'>Expense Tracking Made Easy with Our Android Application – Expense Tracker</a> <small>Most of us are oblivious of our spending behavior and...</small></li>
</ol></p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2012/01/11/sms-scheduler-for-android-phones/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game On!</title>
		<link>http://vinsol.com/blog/2012/01/10/game-on/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=game-on</link>
		<comments>http://vinsol.com/blog/2012/01/10/game-on/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 11:28:01 +0000</pubDate>
		<dc:creator>Rajat Bhalla</dc:creator>
				<category><![CDATA[productivity]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1903</guid>
		<description><![CDATA[&#8220;Well served!&#8221; &#8220;What a spin!&#8221; &#8220;Just missed the net!&#8221; &#8220;Deuce!&#8221; These aren&#8217;t the standard phrases that you would expect to hear at a development company. But at VinSol, you would hear them many times a day! Ever since we got a new Table Tennis table, 60 minutes of game play has become a part of [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>&#8220;Well served!&#8221;</p>
<p>&#8220;What a spin!&#8221;</p>
<p>&#8220;Just missed the net!&#8221;</p>
<p>&#8220;Deuce!&#8221;</p>
<p>These aren&#8217;t the standard phrases that you would expect to hear at a development company.</p>
<p>But at VinSol, you would hear them many times a day!</p>
<p>Ever since we got a new Table Tennis table, 60 minutes of game play has become a part of our daily routine.</p>
<p>To the average manager / employer, it might seem as a waste of time.</p>
<p>For those who are truly looking to get the best out of their team, this is just what the doctor ordered.</p>
<p>I have seen productivity rise both <strong>before</strong> and <strong>after</strong> the game play.</p>
<p>While teams work diligently during the day knowing that their day is shorter by an hour; after the game, they carry the high energy levels to their desk and work with the same zeal they show when trying to win a point during the game.</p>
<p>Not to mention the camaraderie it generates while playing together.</p>
<p>Also, I found an interesting pattern with the teams who are playing regularly.</p>
<p>The sportsman spirit they show during game play is also reflected in their work.</p>
<p>We use Agile frameworks like <strong>Scrum</strong> and <strong>XP</strong> to deliver the great work we do.</p>
<p>These frameworks have mature individuals as their cornerstone.</p>
<p>I have seen sportsman spirit transforming into maturity while working with these individuals.</p>
<p>Besides, daily game play also takes care of one&#8217;s fitness aspects thereby relieving one of his computer and chair and allowing one to relax his mind and exercise the body at the same time.</p>
<p>I believe that writing good code is an art, not something that can be inculcated by merely reading books and online tutorials.</p>
<p>If we expect such creative skills from individuals/teams, then even we need to think out of the box on how to inculcate such skills in them.</p>
<p>At VinSol, the new TT table was the one of such solutions.</p>
<p>Game on pal!</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2012/01/10/game-on/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Expense Tracking Made Easy with Our Android Application – Expense Tracker</title>
		<link>http://vinsol.com/blog/2012/01/06/expense-tracking-app/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=expense-tracking-app</link>
		<comments>http://vinsol.com/blog/2012/01/06/expense-tracking-app/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 06:47:19 +0000</pubDate>
		<dc:creator>naveen</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Android app]]></category>
		<category><![CDATA[Expense Tracking]]></category>
		<category><![CDATA[expense tracking app]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1857</guid>
		<description><![CDATA[Most of us are oblivious of our spending behavior and more often than not end up asking questions like ‘How can I improve my spending habits’? Or ‘how can I hold back unwanted expenses’? Let’s accept it, mainstream population is unmindful of their spending behavior and typically end up overspending (of course some people claim [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Most of us are oblivious of our spending behavior and more often than not end up asking questions like ‘How can I improve my spending habits’? Or ‘how can I hold back unwanted expenses’? Let’s accept it, mainstream population is unmindful of their spending behavior and typically end up overspending (of course some people claim to know where their money is going). It is difficult to fully dispute this claim, but there is a fair degree of skepticism. None of us is a human calculator after all (unless you are not using a traditional pen and paper approach for your book-keeping).</p>
<p>The truth is, without proper analysis we only have a vague sense of where our money goes and this where the real need of an expense tracking mechanism becomes essential.  Needless to say, not just any expense tracking application would do. It can be argued that there are many ways to track expenses and one should pick the one that suits the requirements. But at the same time the method should be hassle free and not cumbersome or time consuming. And there is no better way to be able to track your expense on your mobile while you are ‘On the Go’.</p>
<p>After having used a variety of Android applications for expense tracking and management, we were itching to develop our own version of an expense tracking and management app, as we felt there were many apps that lacked user friendly UI, ease of use, were over burdened with features, etc.</p>
<p>What we are able to achieve with our Android application is a<strong> simple, clutter free, intuitive yet powerful expense tracking application</strong> that addresses the need for monitoring daily expenses.</p>
<p><strong>The application is out in the Android Marketplace</strong> and into the hands of many people with Android devices wanting an easy way to track and manage their expenses.</p>
<p><strong>About Expense Tracker and Features</strong></p>
<p>Expense tracking ‘On the Go’ becomes a whole lot easier with this easy to use, intuitive and simple daily expense management application. <strong>‘Expense Tracker’</strong> helps you to manage your money 7 days a week, 24 hours a day.</p>
<p><a href="http://vinsol.com/blog/wp-content/uploads/2012/01/main_screen1.png"><img class="alignnone size-medium wp-image-1882" style="float: none;" title="main_screen" src="http://vinsol.com/blog/wp-content/uploads/2012/01/main_screen1-180x300.png" alt="Expense Tracker" width="180" height="300" /></a> <a style="margin-left: 20px;" href="http://vinsol.com/blog/wp-content/uploads/2012/01/listing4.png"><img class="alignnone size-medium wp-image-1886" style="float: none;" title="listing" src="http://vinsol.com/blog/wp-content/uploads/2012/01/listing4-180x300.png" alt="Expense Tracker" width="180" height="300" /></a><a style="margin-left: 20px;" href="http://vinsol.com/blog/wp-content/uploads/2012/01/show_screen1.png"><img class="alignnone size-medium wp-image-1892" style="float: none;" title="show_screen" src="http://vinsol.com/blog/wp-content/uploads/2012/01/show_screen1-180x300.png" alt="Expense Tracker" width="180" height="300" /></a></p>
<p>Just as the expenses do not stop, neither should money management. And with money being a limited commodity (for most of us), it is important to use it judiciously. ‘Expense Tracker’ is developed to help everyone who has the need for financial management and that includes everyone who indulges in economic activity of any nature.</p>
<p><strong>Features:</strong></p>
<p>1)    Set reminder for expense entries<br />
2)    Track exp on daily, weekly, monthly and yearly basis<br />
3)    Graphical representation<br />
4)    Mark expense entries as favorite and later add it as an expense from favorite<br />
5)    Take a picture of the expense receipt and save it for future reference<br />
6)    Save expense as voice recording<br />
7)    Log location of the expense automatically<br />
8)    Date and time of the expense is logged automatically<br />
9)    Expenses can be modified to a previous date</p>
<p><strong>Application Link -</strong> <a href="https://market.android.com/details?id=com.vinsol.expensetracker" target="_blank">https://market.android.com/details?id=com.vinsol.expensetracker</a></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2012/01/06/expense-tracking-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Deprecated Access to UDID</title>
		<link>http://vinsol.com/blog/2011/11/30/apple-deprecated-access-to-udid/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=apple-deprecated-access-to-udid</link>
		<comments>http://vinsol.com/blog/2011/11/30/apple-deprecated-access-to-udid/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 12:58:35 +0000</pubDate>
		<dc:creator>Rajat Bhalla</dc:creator>
				<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1850</guid>
		<description><![CDATA[OK. So some of you might have heard that Apple has deprecated access to UDID. Well, that&#8217;s true&#8230;.sort of&#8230;but what on earth does it mean. Let&#8217;s find out. Every iPhone, iPad, and iPod touch has an identifier unique to that device. It is called a UDID which stands for Unique Device ID. Some apps use [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>OK. So some of you might have heard that Apple has deprecated access to UDID.</p>
<p>Well, that&#8217;s true&#8230;.sort of&#8230;but what on earth does it mean.</p>
<p>Let&#8217;s find out.</p>
<p>Every iPhone, iPad, and iPod touch has an identifier unique to that device.</p>
<p>It is called a UDID which stands for Unique Device ID.</p>
<p>Some apps use it directly or some create a hash using it to uniquely identify the user/device.</p>
<p>They use a property called &#8220;uniqueIdentifier&#8221;.</p>
<p>Apple is now deprecating the method that is used to access the UDID of a device from within the app.</p>
<p>In other words, this method is slated for removal in some time and the apps already using this need to make provisions to transition off it.</p>
<p>Here&#8217;s what they say in the documentation.</p>
<p><a href="http://vinsol.com/blog/wp-content/uploads/2011/11/uniqueIdentifier1.png"><img class="aligncenter size-full wp-image-1852" src="http://vinsol.com/blog/wp-content/uploads/2011/11/uniqueIdentifier1.png" alt="" width="586" height="252" /></a></p>
<p>Now how does Apple&#8217;s decision affect the stakeholders.</p>
<p>As for end users, it doesn&#8217;t affect them at all.</p>
<p>They have remained oblivious to the presence of UDID and would continue to do so.</p>
<p>There have been some blog posts around users screaming that their privacy is being compromised just because the app is sharing their UDIDs.</p>
<p>Baah! I dont see why that should be a big privacy concern.</p>
<p>There is a significant change for developers / app providers and advertisers however.</p>
<p>Some applications needed to identify individual users, say for subscription purposes.</p>
<p>Either they required all users to have an account at a central location, or they had to identify the user remotely on his device.</p>
<p>UDID helped in the latter scenario.</p>
<p>Using UDID and a little analytics code, the app provider could get valuable insights into the usage of the app.</p>
<p>However, with UDID going away, each app would have to create its own identifier for each device.</p>
<p>While that alone would not be a problem, the issue would be in reconciling this data with the previous data that used other means of identifying a user (UDID or a hash based on it).</p>
<p>So unless the app developers can find out a cunning way to reconcile the data, they would be starting afresh essentially.</p>
<p>Because this analytics data was the advertisers&#8217; holy grail, they have nothing to cheer about either.</p>
<p>But why is Apple doing this anyways?</p>
<p>Well, &#8220;Who is John Galt&#8221;?</p>
<p>[I am reading Atlas Shrugged by Ayn Rand of late and this phrase stuck.]</p>
<p>Some highlight privacy concerns, including law suits, raised by some users of late (which I find frivolous).</p>
<p>However, there might be a hidden agenda of Apple in seeking to discontinue use of UDID.</p>
<p>Apple gets a share of the revenue generated by selling paid apps on its store.</p>
<p>It also gains from paid subscriptions.</p>
<p>Normally, when you buy a paid app, you can download it on another device at no extra cost by signing in with the same Apple id.</p>
<p>Apple gains on the first purchase, but subsequent installs don&#8217;t add to its coffers.</p>
<p>However, there are some paid apps that charge you for every install.</p>
<p>So if you paid a dollar when you bought and installed the app on your iPhone, you might have to pay some more to install the app on a new device, say your iPad.</p>
<p>This model is made possible only by identifying the devices individually and not necessarily the user alone.</p>
<p>Doing away with UDID would do away with this model too.</p>
<p>Could that be the reason?</p>
<p>Well, we would see.</p>
<p>Enough of doom and gloom.</p>
<p>There&#8217;s still a way out.</p>
<p>If you don&#8217;t really require any feature offered by iOS 5 SDK, you can continue to use any lower version and still access a device&#8217;s UDID.</p>
<p>The access is going to be deprecated only for iOS 5 SDK.</p>
<p>So unless you want to use iOS 5 SDK, you are good.</p>
<p>So long.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/11/30/apple-deprecated-access-to-udid/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Does Agile Manifesto Need Changes? The 10 Years Experience!</title>
		<link>http://vinsol.com/blog/2011/11/09/does-agile-manifesto-need-changes-the-10-years-experience/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=does-agile-manifesto-need-changes-the-10-years-experience</link>
		<comments>http://vinsol.com/blog/2011/11/09/does-agile-manifesto-need-changes-the-10-years-experience/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 05:36:53 +0000</pubDate>
		<dc:creator>Rajat Bhalla</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1840</guid>
		<description><![CDATA[I delivered a presentation on the above topic earlier this year at an Agile Conference in NCR, India. I have summed up my thoughts below. On a cold winter morning of 13 Feb 2001, at a ski resort in Utah, the Agile Manifesto was born. The newborn had 17 fathers (ahem ahem), all stalwarts of [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I delivered a presentation on the above topic earlier this year at an Agile Conference in NCR, India.</p>
<p>I have summed up my thoughts below.</p>
<p>On a cold winter morning of 13 Feb 2001, at a ski resort in Utah, the Agile Manifesto was <a title="History of Agile Manifesto" href="http://agilemanifesto.org/history.html" target="_blank">born</a>.</p>
<p>The newborn had 17 <a title="Authors of Agile Manifesto" href="http://agilemanifesto.org/authors.html" target="_blank">fathers</a> (ahem ahem), all stalwarts of the software industry, trying to be Agile in their own way, ahead of their times.</p>
<p>Though some leading software practitioners were following some form  of Agile (without calling it that), the real precipitation of thoughts  happened in February 2001.</p>
<p>And thus emerged the Agile methodology of software development as we have come to know it.</p>
<p>In 2011, while the whole Agile community was united in celebration of  10 years of Agile, there were a lot of Agile practitioners who felt the  need for a change &#8211; maybe a change from Agile to another methodology  (like Agile was to Waterfall), or changes in the basic foundation of  Agile (the Agile Manifesto and its 12 core principles).</p>
<p>This whole dissonance stemmed from not achieving the kind of success we had hoped for.</p>
<p>Their concerns did resonate with me but when I dug a little deeper, I  realised that difference between our results and expectations arose  from the way Agile was implemented, the way it was morphed into  something else, a commonly known phenomena as &#8220;Agile-but&#8221;. (You might  have hears people saying, &#8220;we do Agile but&#8230;.instead of X we do Y&#8221;).</p>
<p>It is completely okay to let Agile fit your organisation as it is not  a set of commandments one ought to follow. But there is a &#8220;spirit&#8221; that  is embodied in the Manifesto and the principles which should never be  compromised.</p>
<p>I agree that it is really tough to explain that spirit in words but  you would get a sense of it once you start &#8220;living&#8221; Agile, not just  following it, or doing it, or practicing it.</p>
<p>(God! I am sounding like Yoda instructing Luke Skywalker: &#8220;You must  feel the Force around you. Here, between you, me, the tree, the rock…  everywhere!&#8221;)</p>
<p>While I was preparing for this presentation, I came across a wonderful <a title="Half Arsed Agile Manifesto" href="http://www.halfarsedagilemanifesto.org/" target="_blank">tongue-in-cheek take on Agile</a></p>
<p><em>We have heard about new ways of developing software bypaying consultants and reading Gartner reports. Through<br />
this we have been told to value:</em></p>
<p><em><strong>Individuals and interactions over processes and tools</strong></em></p>
<p><em>and we have mandatory processes and tools to control how those<br />
individuals (we prefer the term ‘resources’) interact</em></p>
<p><em><strong>Working software over comprehensive documentation</strong></em></p>
<p><em>as long as that software is comprehensively documented</em></p>
<p><em><strong>Customer collaboration over contract negotiation</strong></em></p>
<p><em>within the boundaries of strict contracts, of course, and subject to rigorous change control</em></p>
<p><em><strong>Responding to change over following a plan</strong></em></p>
<p><em>provided a detailed plan is in place to respond to the change, and it is followed precisely</em></p>
<p><em>That is, while the items on the left sound nice<br />
in theory, we’re an enterprise company, and there’s<br />
no way we’re letting go of the items on the right.<br />
</em></p>
<p>The above conveys my sentiments on the current state of &#8220;Agile&#8221; well.</p>
<p>And let me not stop there.</p>
<p>I have come across enough real-life examples to illustrate this.</p>
<p>These examples are from companies / projects based on Agile methodology.</p>
<p>I have mentioned them under the statement that they seem to violate</p>
<p><strong>Individuals And Interactions Over Processes And Tools</strong></p>
<p><em>1. “This part was not implemented because it was not written in the user story. So what if it was discussed.”<br />
2. “Please create a ticket/story for whatever you want to be done”<br />
3. QA/Tester: “Wait. Don’t fix the issue now. Let me first create a ticket on it”</em></p>
<p><strong>Working Software Over Comprehensive Documentation</strong></p>
<p><em>1. “We are Agile. We don’t document”<br />
2. “User stories need to include even the last bit of detail”<br />
3. After a sequence of changes over time with a functionality, “Make sure you reflect the changes in the stories”</em></p>
<p><strong>Customer Collaboration Over Contract Negotiation</strong></p>
<p><em> 1. “Lets write detailed user stories about the features that  would go into the project so that the customer/developer is bound by  them”…(later)…“Hey, that was not in the scope”</em></p>
<p><strong>Responding To Change Over Following A Plan</strong></p>
<p><em>1. “We are Agile. We don’t plan”…(LOL)<br />
2. “We never discussed this feature”<br />
3. “I don’t care if your system crashed, I want this functionality delivered by weekend”<br />
</em><br />
I would like to share a quote that, I believe, truly represents that spirit of being Agile</p>
<p><em>Float like a butterfly,<br />
sting like a bee<br />
</em>- Boxing legend Muhammad Ali.</p>
<p>Wrapping this up, saying that Agile needs change when we were not  able to implement it properly is akin to saying that one has wrong feet  when he is wearing shoes wrongly.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/11/09/does-agile-manifesto-need-changes-the-10-years-experience/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in iOS5</title>
		<link>http://vinsol.com/blog/2011/09/22/whats-new-in-ios5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=whats-new-in-ios5</link>
		<comments>http://vinsol.com/blog/2011/09/22/whats-new-in-ios5/#comments</comments>
		<pubDate>Thu, 22 Sep 2011 08:03:05 +0000</pubDate>
		<dc:creator>Rajat Bhalla</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1815</guid>
		<description><![CDATA[This is the first major upgrade to iOS ever since it was rechristened from iPhone OS. Apple&#8217;s iOS 5 page says that they are &#8220;taking iOS to a whole new level&#8221;. Scott Forstall, SVP iOS Software, says that this is the &#8220;widest and most extensive update for iOS, ever&#8221;. The update boasts of 200 new [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p><a href="http://vinsol.com/blog/wp-content/uploads/2011/09/iOS4.png"><img class="aligncenter size-full wp-image-1819" src="http://vinsol.com/blog/wp-content/uploads/2011/09/iOS4.png" alt="iOS5" width="603" height="188" /></a></p>
<p>This is the first major upgrade to iOS ever since it was <a href="http://en.wikipedia.org/wiki/List_of_iOS_devices" target="_blank">rechristened from iPhone OS</a>.</p>
<p>Apple&#8217;s <a href="http://www.apple.com/ios/ios5/" target="_blank">iOS 5 page</a> says that they are &#8220;taking iOS to a whole new level&#8221;.</p>
<p>Scott Forstall, SVP iOS Software, says that this is the &#8220;widest and most extensive update for iOS, ever&#8221;.</p>
<p>The update boasts of 200 new updates.</p>
<p>Let&#8217;s look at the new features to see if that is really true or is it just old wine in a new bottle.</p>
<p>I am able to review some of these on an iPad running iOS 5 Beta 7.</p>
<p><strong>1. Notifications</strong></p>
<p>This is not a new feature. iOS users are already familiar with  notification pop-ups and badged icons. What is new is the way these  notifications are lending themselves to the user.</p>
<p>With the device in an unlocked state, you can drag down the  notification bar on top and see a list of notifications from various  apps. Tapping any would take you straight to that app.</p>
<p>While iOS users may drop their jaw on this, Android users are only  yawning as this was already on Android since version 1 !!! (do I hear  someone shouting &#8220;copy-cats&#8221;)</p>
<p>Additionally, the iOS notification drop-down also shows weather and a stock ticker.</p>
<p>Even in a locked state when the device shows a list of notifications,  you can swipe a notification directly and open its app instead of  having to unlock the device first. Now that is something that would make  Android users jealous.</p>
<p><strong>2. Newsstand</strong></p>
<p>Apple had caused a lot of heartburn to publishers earlier this year over its seemingly atrocious terms of engagement.</p>
<p>However, after the two parties agreed to mutually respectable terms, it was the end user who emerged as a winner.</p>
<p>Newsstand is a single repository of all your newspaper and magazine subscriptions purchased from App Store.</p>
<p>The magazines and dailies are downloaded in the background and are available for offline reading.</p>
<p>Simulating your book shelf, the exploded view of the newsstand shows  you the cover of each magazine and daily that you have subscribed to.</p>
<p><strong>3. Twitter</strong></p>
<p>Twitter app for Apple was already available since but what is new is the OS wide support for it.</p>
<p>Integrating Twitter into iOS and offering it as a single sign-on is a smart move by Apple and great news for the Twitterati.</p>
<p>Now you can sign-on with Twitter and login to any other application  permitting a Twitter login without having to specify your credentials  again.</p>
<p>Not to mention, that the OS wide integration allows you to Tweet from  a lot of native applications like Photos, YouTube, Safari, Maps, etc.</p>
<p>Additionally, you can complement your contacts information with their Twitter information like photo, @username, etc.</p>
<p><strong>4. Safari</strong></p>
<p>Mozilla&#8217;s Firefox has always been my personal favourite (at least on a  PC*) but the additions iOS has done to Safari really tempt me to  switch.</p>
<p>When you are reading an article (blog post, news article, etc.) on  Safari and switch on the Reader mode from the address bar, you see the  article freed of all the clutter (like side bars, ads, related stories,  all the junk that web developers like us put in a page). The article is  displayed in a neat (I am tempted to say &#8220;sexy&#8221;) fashion with Serif  fonts, a la hardcopy publication. Just focus on the article without any  distractions.</p>
<p>Reading list is another interesting addition. It allows you to save  articles for later viewing. And more importantly, this list is  accessible across devices by using iCloud. So you can view articles on  your iPhone while commuting home that you had saved earlier on iPad  while in office.</p>
<p>And to top the Safari cake is the cherry of tabbed browsing. Switch among multiple tabs the same way you would on your PC*.</p>
<p><strong>5. Reminders</strong></p>
<p>I have always had trouble managing my to-do lists, at least on a PC.  Simple text document, Excel sheet, Ta-da lists, I have tried it all.</p>
<p>But this simple application can be a solution to all your woes about managing to-do lists, at least on iOS.</p>
<p>You can create new lists and quickly add list items. Check them off as you complete them.</p>
<p>View all completed list items in a separate list and in the list you created.</p>
<p>You can mark a date and time to be reminded about an individual list  item (without which it would not make sense to call the feature as  &#8220;Reminders&#8221;).</p>
<p>Here comes the best part about reminders: in addition to specifying  time and date, you can also specify place. That is, be reminded of a  chore when you arrive at a place (pick up groceries from supermarket) or  when you leave a place (call your wife when you leave from office so  that she can be prepared with a new set of chores when you reach home).</p>
<p>And you can sync these reminder with your other Apple devices using  CalDAV or iCloud or with your Outlook using Microsoft Exchange.</p>
<p><strong>6. Camera</strong></p>
<p>Now Apple claims to have the most popular camera among mobile phones  and as popular has regular cameras using Flickr as a reference for this  statistic.</p>
<p>Even if that were to be true, the new features would only serve to bolster iPhone&#8217;s camera&#8217;s position.</p>
<p>The chances of missing a moment worth capturing are even less with the quick access to camera even from the lock screen.</p>
<p>Just double click the home button to reveal the camera button and dive straight into the camera app.</p>
<p>And click like a regular camera with your iPhone held in landscape mode and using the volume-up button. :)</p>
<p>Also you can view grid lines on your screen so that you can align the picture even before taking it.</p>
<p>Want to zoom in, just pinch to zoom!</p>
<p>Another great feature which I doubt if any other mobile camera has is an AE/AF Lock.</p>
<p>Now I am not a photography expert but as I understand, on iPhone, if  you select an area and lock the AE/AF (auto exposure, auto focus) and  even pan a little, the exposure and focus of the selected area would not  change despite the change in background light.</p>
<p>I would have to check this on an iPhone running iOS 5 but as I gather from Scott&#8217;s# demo, it seems to work.</p>
<p><strong>7. Photos</strong></p>
<p>All that beautiful pictures can me made too look even better by some handy tools now offered by the Photos app.</p>
<p>I hate it when my eyes in the photo appear red as if I am a Sith  lord. You need not make your loved ones look like that if you use the  red-eye reduction tool.</p>
<p>Then you can also crop, rotate, organise into albums the photos you took on your iPhone on the phone itself.</p>
<p><strong>8. Mail</strong></p>
<p>While the mail app on iOS devices used to appear like makeshift mail,  it is going to become lot better and would come close to appearing like  the mail on Mac (well, almost).</p>
<p>With the addition of rich text editing (bold, italics, underlines,  etc.) and indentation, mails sent from iOS devices would look lot more  like their Mac cousins.</p>
<p>Besides, you wont have to type again if you mentioned a contact name  by mistake in CC instead of To or BCC. Just drag them to the other  field.</p>
<p>Messages can be flagged / unflagged on the device itself, searching  would include the mail body in addition to the to, from, and subject  fields, swipe to view/hide the inbox, yada yada yada.</p>
<p>But one feature really made me skip a beat (I actually said &#8220;Whoa&#8221; when I saw the demo) is the split keyboard on iPad</p>
<p>You can split the keyboard and drag it upwards so as to type by just using your thumbs while holding the iPad. Awesome!</p>
<p><strong>9. PC Free</strong></p>
<p>This is actually a goood one (that wasn&#8217;t a typo, I use the ooo sound  when I really like something, like &#8220;hey, that girl is goood&#8221;)</p>
<p>The pre-requisite of having a PC to sync your device with has been done away with.</p>
<p>The iOS device can be the only computing device in your home for all you care.</p>
<p>Activate, update it over-the-air. Not to mention that updates are now  delta-updates so you just download what has changed, not everything  including the kitchen sink.</p>
<p><strong>10. iMessage</strong></p>
<p>Well, I am not saying that Apple is trying to emulate the success  that BlackBerry achieved through its BlackBerry Messenger,  but&#8230;umm&#8230;yes, I think I am saying that.</p>
<p>But its a great feature to have anyhow.</p>
<p>iMessage allows you to exchange messages over 3G/Wi-fi with your friend if he/she also has an iOS device.</p>
<p>iMessage is built into the existing messages and allows you to  exchange photos, videos, group messages, and of course simple texts.</p>
<p>You can receive delivery receipts (no more excuses like &#8220;I never  received your message&#8221;), read receipts (or &#8220;I didnt read your message&#8221;)  and even get to know when the other party is typing a message.</p>
<p>Besides, these messages are synced across all your iOD devices so you  can resume the conversation from your iPad if, for example, your iPhone  got run over by  a truck.</p>
<p><strong>11. Wifi-Sync</strong></p>
<p>This is another feature that aims at making your iOS device truly wireless.</p>
<p>No need to plug in your device to your PC to sync with iTunes. A  shared wi-fi connection between your device and the PC would handle the  syncing.</p>
<p>But, I am wondering what would be left of the poor battery if you are syncing a lot of audio and video.</p>
<p>These were some of the new features that iOS offers to the end users.</p>
<p>But even iOS developers have a lot to cheer about.</p>
<p>With more than 1500 new APIs, developers can unleash their creativity and develop really useful apps (and some weird ones too).</p>
<p>Apple claims to have done significant enhancements to Xcode, Instruments, and Simulator.</p>
<p>Then they have incorporated the CoreImage framework from Mac OSX to  iOS that allows the developer to weave some real magic in their apps  that handle images (red-eye reduction for example).</p>
<p>Hope you enjoyed reading the post.</p>
<p>Stay tuned for more (especially my soon to come blog post on Android).</p>
<p>Feel free to comment on this post or you can reach me at rajat(at)vinsol(dot)com.</p>
<p>* The term PC has been used to differentiate desktop computers, laptops from mobile iOS devices.<br />
# iOS5 introduced and demoed by Scott Forstall, SVP iOS Software</p>
<p><strong>References</strong></p>
<p>1. Keynote Video: <a href="http://www.apple.com/apple-events/wwdc-2011/" target="_blank">http://www.apple.com/apple-events/wwdc-2011/</a><br />
2. iOS Video: <a href="http://www.apple.com/ios/ios5/gallery.html#video-ios" target="_blank">http://www.apple.com/ios/ios5/gallery.html#video-ios</a><br />
3. Features: <a href="http://www.apple.com/ios/ios5/features.html" target="_blank">http://www.apple.com/ios/ios5/features.html</a><br />
4. Title Image Source: <a href="http://images.apple.com/ios/ios5/images/overview_hero.png" target="_blank">http://images.apple.com/ios/ios5/images/overview_hero.png</a></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/09/22/whats-new-in-ios5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sencha and Ruby on Rails</title>
		<link>http://vinsol.com/blog/2011/09/02/sencha-and-ruby-on-rails/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sencha-and-ruby-on-rails</link>
		<comments>http://vinsol.com/blog/2011/09/02/sencha-and-ruby-on-rails/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 11:20:15 +0000</pubDate>
		<dc:creator>vipin</dc:creator>
				<category><![CDATA[about this site]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1705</guid>
		<description><![CDATA[Sencha touch is a Javascript framework based on the most popular MVC pattern. It lets you build cross platform mobile web application using Javascript, HTML5 and CSS that amazingly look like native mobile applications. I think it can be described and understood better with the help of a demo application. If you can&#8217;t wait to [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify">Sencha touch is a Javascript framework based on the most popular MVC pattern. It lets you build cross platform mobile web application using Javascript, HTML5 and CSS that amazingly look like native mobile applications. I think it can be described and understood better with the help of a demo application.  If you can&#8217;t wait to see a few of the Sencha&#8217;s stuff till we build our demo application you should click <a href="http://www.sencha.com/products/touch/demos/">here</a>.</p>
<p style="text-align:justify"><strong>Note:</strong> If you don&#8217;t have a smart phone with a webkit browser in it, you can view Sencha demo in any webkit browser preferably Safari.</p>
<p style="text-align:justify">This is a simple application backed by Rails where you can ask questions and those can be answered. For no specific reason I name it &#8216;Tarot&#8217;.  With Tarot we want to be able to ask a question, answer to it, show a list of question for a given tag and show a question with its answers.</p>
<p style="text-align:justify">Before we go further I would suggest you to clone the code from <a href="https://github.com/vipinnagpal/tarots">my github account</a>. As a matter of fact we like short and sweet blogs and I won&#8217;t be giving full application code in the blog. After you have cloned in the application directory, don&#8217;t forget to run:</p>
<pre class="brush: bash;">
bundle install
rake db:setup
</pre>
<p style="text-align:justify">Without doing much of the the talk lets dive in to building the Rails part first.</p>
<p style="text-align:justify">Use of Rails in this application is minimal. It simply serves a few ajax requests and sends back json response. Everything else you expect from a mobile application could be achieved with Sencha Touch.</p>
<p><span style="font-size: large"><strong>AR Models</strong></span></p>
<p style="text-align:justify">On the server side we are going to have two models Question and Answer.</p>
<p style="text-align:justify">As it is expected our question has_many answers. There is one thing to mention, I have used acts_as_taggable gem to tag the questions. Simple run all the migrations and run server.</p>
<p><span style="font-size: large"><strong>Controllers on Server:</strong></span></p>
<p style="text-align:justify">As we just want to do the minimal with our rails part of the application.</p>
<p style="text-align:justify">Keeping things simple I have setup the <i>index</i> and <i>tags</i> action to respond with the array of all tagged questions and list of all tags to create the tag cloud respectively in the JSON format, which we would finally be parsing at the client end with the help of Sencha.</p>
<p style="text-align:justify">The client expects JSON data in the following format:</p>
<pre class="brush: bash;">{
	data: {
		   question: {
				 title: 'Title'
				 description: 'Description'
				 answer_count: 4
                                           }
	         }
}</pre>
<p style="text-align: justify">By writing “render <strong>:json =&gt; {:sucess =&gt; true, :data =&gt; [question]}”</strong> we  have made <i>create</i> action to respond accordingly.</p>
<pre class="brush: bash;">def create
    question = Question.new(params[:questions].first.except(:answer_count))
    respond_to do |format|
      question.save
        format.json {
          render :json =&gt; {:sucess =&gt; true, :data =&gt; [question]}
        }
    end
 end </pre>
<p style="text-align: justify">It seems to be enough of rails and the time when we start giving our Tarot some touches of Sencha.<br />
First thing first, you must have sencha library somewhere in your application where views have access to it and the most appropriate place I find is the public directory where all your .js and .css files go.<br />
Fortunately you don&#8217;t have to download the library separately if you have already cloned the application from github. If not I would suggest you do it now.</p>
<p style="text-align: justify">Note: Sencha Touch comes with lot of other things bundled with it which we can always get rid of. The files of our interest are sencha-touch-debug.js and sencha-touch.css in the development mode and sencha-touch.js and sencha-touch.css in the production mode.</p>
<p style="text-align: justify">As mentioned earlier Sencha Touch is an MVC framework, its directory structure can be made to look    somewhat like a rails application, though it is not mandatory. As it turns out I am a rails guy and love the rails way. Let&#8217;s check the public directory where all our Sencha code is placed. Sencha directory structure look like:</p>
<pre class="brush: bash;">
public/app    #main application folder
app/app.js    #Tarot boots up from here
app/util.js    # Extra utility function go inside this

#Try to get the significance of following from their names, its easy
app/models
models/questionModel.js
models/answerModel.js
models/tagModel.js

app/conrollers
controller/questionController.js

app/views
views/home.js
views/list.js
views/tarotViewport.js
views/new.js
app/resources
resources/terot.css
</pre>
<p style="text-align:justify">If you check application.html.erb, all the the .js files are included in it.
<p><strong>Tip:</strong> You should compress all your Javascript files when you run your application in production.    </p>
<p><span style="font-size: large"><strong>Sencha Digging Deeper:</strong></span></p>
<p style="text-align:justify">The first step for most of the Sencha Application is to create a namespace by registering the application. Simply open up app.js file(the starting point of the application) and the check the code in there:</p>
<pre class="brush: bash;">Ext.regApplication({
    name: 'tarot',
    launch: function() {
        this.views.viewport = new this.views.Viewport();
    }
});</pre>
<p style="text-align: justify">The above represents a Sencha Application. Most Applications consist of at least the application&#8217;s name and a launch function.</p>
<p style="text-align:justify">Instantiating a new application automatically creates a global variable using the configured name property and sets up namespaces for views, stores, models and controllers within the app:</p>
<pre class="brush: bash;">
//this code is run internally automatically when creating the app (Senncha way of creating namespace)
Ext.ns('MyApp', 'MyApp.views', 'MyApp.stores', 'MyApp.models', 'MyApp.controllers');
</pre>
<p style="text-align:justify">The launch function usually creates the Application&#8217;s Viewport and runs any actions the Application needs to perform when it boots up. The launch function is only expected to be run once.</p>
<p style="text-align:justify">A few snapshots of the application viewport:</p>
<div id="attachment_1711" class="wp-caption alignnone" style="width: 310px"><img src="http://vinsol.com/blog/wp-content/uploads/2011/08/blog1.png" alt="Home Image" width="600" class="size-medium wp-image-1711" /><br />
<p class="wp-caption-text">Fig 1: Home</p></div>
<div id="attachment_1711" class="wp-caption alignnone" style="width: 310px"><a href="http://vinsol.com/blog/wp-content/uploads/2011/08/blog2.png"><img src="http://vinsol.com/blog/wp-content/uploads/2011/08/blog2.png" alt="" width="600" class="alignnone size-medium wp-image-1712" /></a><p class="wp-caption-text">Fig 2: Create Question</p></div>
<p style="text-align:justify">Before we create our viewport or any other viewable component, lets create our models and avail the data to play by creating a store(remember sencha touch is MVC framework). A store simply fetches data from the remote server via proxies and keeps it stored in the local storage of the browser. You can get whole lot of information about the store object from the sencha documentation.</p>
<p style="text-align:justify">We have three model on the client part of Tarot and their corresponding stores. The minimum requirement for a model is its field object. It can also be stuffed with validations, associations, proxy( can be moved to the store).….</p>
<p style="text-align:justify">Our models/tagModel.js file look like:</p>
<pre class="brush: bash;">tarot.models.Tag = new Ext.regModel('Tag', {
    fields: [
    {
        name: 'name',
        type: 'string'
    },

    {
        name: 'id',
        type: 'int'
    }],
    proxy: {
        type: 'ajax',
        url: 'tags',
        id  : 'taggings',
        reader: {
            type  : 'json',
            record: 'tag',
            root: 'data'
        }
    }
});

tarot.stores.Tags = new Ext.data.Store({
    autoLoad: true,
    model: &quot;Tag&quot;,
    sorter: [{
        property : 'name',
        direction: 'ASC'
    }],
    getGroupString: function(instance) {
        return instance.get('name')[0];
    }
});
</pre>
<p><strong>The official documentation of proxy says:</strong></p>
<p style="text-align:justify">
<blockquote>Proxies are used by Stores to handle the loading and saving of Model data. Usually developers will not need to create or interact with proxies directly.</p></blockquote>
<pre class="brush: bash;">proxy: {
        type: 'ajax',
        url: 'tags',
        id  : 'taggings',
        reader: {
            type  : 'json',
            record: 'tag',
            root: 'data'
        }
    }</pre>
<p style="text-align:justify">tarot.stores.Tags uses the proxy which has been defined in the model to fetch the initial set of tags from the server.  We  have made our store to fetch the tags when the application first boots up by specifying</p>
<pre class="brush: bash;">autoload: true</pre>
<p style="text-align:justify">It sends a get(ajax) request to the pathname &#8216;tags&#8217; wich inturn invokes the tags action within QuestionController and response with the requested data.</p>
<p style="text-align:justify">The &#8216;reader&#8217; object specify the format of the record data it should expect from the server. By default it takes &#8216;records&#8217; as the root value.</p>
<p><span style="font-size: large"><strong>The store:</strong></span></p>
<pre class="brush: bash;">tarot.stores.Tags = new Ext.data.Store({
    autoLoad: true,
    model: &quot;Tag&quot;,
    sorter: [{
        property : 'name',
        direction: 'ASC'
    }],
    getGroupString: function(instance) {
        return instance.get('name')[0];
    }
});</pre>
<p style="text-align:justify">Having autoLoad set to true loads our store with the initial set of tags when the application boots up.<br />
The similar can be achieved by calling tarot.stores.Tags.load() in the Application launch function.</p>
<p style="text-align:justify">&#8216;getGroupString&#8217;  takes the instance of the model and should return the string by which the data is grouped in the store. We&#8217;d be using formed groups later in the application.</p>
<p style="text-align:justify">The other two models are written similarly, if you still get stuck, refer to the Sencha Touch documentation.</p>
<p style="text-align:justify">Finally we have reached the point where we can watch things moving on the screen. Back in the application launch function we create and object of Viewport.  But what actually is a Viewport? </p>
<p><strong>Note:</strong> Before going further you should keep the app/tarotViewport.js file open.</p>
<p style="text-align:justify">The basic building block(viewport) of a sencha app is a panel which contains subpanel and other components.  Our viewport panel has a toolbar with back(initially hidden) and &#8216;askme&#8217; buttons and the list of tags docked on the left. This consists of the navigation part of our application and makes it nicer and easier to navigate.</p>
<pre class="brush: bash;">this.tagList = new Ext.List({
            id: 'tagindexlist',
            title: 'Tags',
            store: tarot.stores.Tags,
            itemTpl: '&lt;div&gt;{name}&lt;/div&gt;',
            grouped: true,
            indexBar: true,
            emptyText: 'Tags Empty',
            ui: 'round',
            style: {
                minWidth: '250px',
                borderRight: '5px solid #4D80BC'
            },
            onItemDisclosure: function(record){
                Ext.dispatch({
                    controller: tarot.controllers.questions,
                    action: 'index',
                    animation: {
                        type: 'slide',
                        direction: 'left'
                    },
                    extras: record.data.name
                })
            }

        });</pre>
<p style="text-align:justify">The store attribute above instructs list the load the data from. For every record in the store the itemTpl is rendered. Back in the tag store definition we grouped our store with the first character of every instance. Grouped: true takes the advantage of the same and shows the list items grouped together. &#8216;onItemDisclosure&#8217; adds a disclosure icon to the list item and a listener to it which is fired when the icon is tapped and invokes the index function of our &#8216;tarot.controllers.questions&#8217;.</p>
<pre class="brush: bash;">this.backButton = new Ext.Button({
            text: 'Back',
            ui: 'back',
            hidden: true,
            handler: this.onBackTap,
            scope: this
        });</pre>
<p style="text-align:justify">The handler of a button specifies the function to call when the button is tapped. The button in our viewport is hidden for the first card. Once any other card is set as an activeItem the back button is shown. For the same purpose we have added a listener to the viewport:</p>
<pre class="brush: bash;">listeners: {
        beforecardswitch : function( viewprt,newCard,oldCard,index){
            if(index == 0)
                viewprt.backButton.hide();
            else
                viewprt.backButton.show();
        }
    }</pre>
<p style="text-align:justify">Our viewport has the tarot.views.home as its first item which would be set as active item(card) of the panel by default. The code can be  in app/views/home.js.</p>
<pre class="brush: bash;">tpl: new Ext.XTemplate('&lt;div&gt;&lt;div class=&quot;question-blk&quot;&gt;&lt;div class=&quot;ques-title&quot;&gt;{title}&lt;/div&gt;&lt;span class=&quot;answerCount&quot;&gt;Answer&lt;p&gt;{answers_count}&lt;/p&gt;&lt;/span&gt;&lt;/div&gt;'),</pre>
<p style="text-align:justify">Our home defines a Data View view  which renders the list of all question autoloaded by the the tarot.stores.questions store. A dataview if capable of displaying data with custom templates. Just like a list in our viewport it can also be bound to the store. Tpl Represents an HTML fragment template. The html inside  is rendered for every record inside the store by looping through it.</p>
<p style="text-align:justify">It also adds a listener to the items rendered which on being tapped invokes the show function of the controller. The similar code has been written in the app/views/list.js which can be refered in our application by tarot.views.questionList (the magic of the namespaces).</p>
<p style="text-align:justify">tarot.views.answerList in the app/views/show.js file does extra efforts to render two more components. It docks the current question on the top and a form to give answers to that question at the bottom. tarot.views.questionNew simply has almost code and it is self explanatory.</p>
<p style="text-align:justify">Its time when we move to the &#8216;C&#8217; part of our Sencha MVC.</p>
<p style="text-align:justify">Our  controllers/questionController.js has defined a few function which can be invoked from our application using Ext.dispatch as we have previously been doing. The index function is called when the tag disclosure from the tag list is tapped and is responsible for loading tarot.stores.taggedQuestions and setting tarot.views.questionList to be the current activeItem which inturn renders the template for each question.</p>
<p style="text-align:justify">It merges options with some more attributes and calls the loader function from util.js file.</p>
<pre class="brush: bash;">loader: function(options){
        var mask = tarot.util.actions.createLoadingMask();
        mask.show();
        options.store.data.clear();
        options.model.proxy.extraParams = {
            filter_param: options.extras
        }
        options.store.load(
        {
            scope   : this,
            callback: function(records, operation, success) {
                mask.hide();
                if(success){
                     tarot.views.viewport.setActiveItem(options.activeItem, options.animation);
                }
                else{
                    alert('Error while loading the questions');
                }
            }
        });
    }
</pre>
<p style="text-align:justify">The loader function does a number of things. The previous data from the store in cleared and sends a fresh request to the server by options.store.load() with an extra parameter to filter the records. In this case it is going to be the tag name. The load() function accepts a parameter as an object which should define the callback function, that gets invoked when the response is received from the server. This function is passed the records that are fetched from the server, the operation object which avails more information about the current operation and a boolean <i>success</i> specifying whether the operation was a successful. If the operation was a success we hide the mask which was shown at the very first. At last it sets the activeItem of the viewport to be the tarot.views.questionList.</p>
<p style="text-align:justify">In the similar fashion tarot.views.answerList is loaded. One thing is to mention here is, every time the store is updated the corresponding views(DataView) are automatically updated to render the current state of the store. No extra work is to be done, isn&#8217;t it nice! Just in case you have not associated any store with the data view check out the update() function.</p>
<p><span style="font-size: large"><strong>Creating a new question: </strong></span></p>
<p style="text-align:justify">On tapping the save button from tarot.views.QuestionNew the create function is called from the tarot.controller.question. The create function takes the from values and  creates a model object filling in the parameters pulled from the form. As we like to keep our code DRY, we use our saveRecord() function to create both the question and answers. We merges options in the create action with the required properties and pass it onto saveRecord().</p>
<pre class="brush: bash;">create: function(options) {
        options.form = tarot.views.questionNew;
        options.activeitem = tarot.views.home;
        var params = options.form.getValues();
        options.record = Ext.ModelMgr.create(params, tarot.models.Question);
        options.store = tarot.stores.questions;
        this.saveRecord(options)
    },

if (errors.isValid()) {
            record.save({
                success: function(){
                    options.form.reset();
                    if(options.activeitem){
                        Ext.Msg.show({
                            title: 'Saved',
                            msg: 'Record has been saved',
                            buttons: Ext.MessageBox.OK,
                            fn: function() {
                                tarot.views.viewport.setActiveItem(options.activeitem, options.animation);
                            }
                        });
                    }
                    options.store.load();

                }
            });
            return true;
        } else{}
</pre>
<p style="text-align:justify">Our saveRecord() takes validations into and proceeds only if the record is valid else it shows up a message box with the validations errors. Again the magic of the proxy spreads here, which is hidden from the developer. When the save function is called the  it sends the POST(Ajax) request to the &#8216;questions&#8217; path with record fields in the parameters and extra parameters(if any). On success the success callback is called. Few other callbacks are &#8216;failure&#8217; and &#8216;callback&#8217; (get called whether success or failure) .</p>
<p style="text-align:justify">Our answers to the questions are created the same way but no card of the viewport is switched and being on the same card tarot.views.DataView object is updated automatically.</p>
<p style="text-align:justify">I hope this gives you a nice overview of building mobile web application with Sencha Touch. But this is not it! There is lot more and can be used to build amazing cross platform application efficiently.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/09/02/sencha-and-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Geo/Proximity Search with MySQL</title>
		<link>http://vinsol.com/blog/2011/08/30/geoproximity-search-with-mysql/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=geoproximity-search-with-mysql</link>
		<comments>http://vinsol.com/blog/2011/08/30/geoproximity-search-with-mysql/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 08:28:33 +0000</pubDate>
		<dc:creator>waseem</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1665</guid>
		<description><![CDATA[In location based web applications we come across a problem that requires us to fetch some information from our database that is at some certain distance from a particular location. Generally this problem can be defined as following. Give me all the things near location Queries like &#8220;Fetch all the nearest friends&#8221;, &#8220;Fetch all the [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>In location based web applications we come across a problem that requires us to fetch some information from our database that is at some certain distance from a particular location. Generally this problem can be defined as following.</p>
<blockquote><p>
Give me all the <strong>things near location</strong>
</p></blockquote>
<p>Queries like &#8220;Fetch all the nearest friends&#8221;, &#8220;Fetch all the nearest restaurants&#8221; or &#8220;Fetch all the closest software developers&#8221; are essentially same as above.</p>
<p>If we analyze above problem, we see that we have three keywords in it viz. <strong>things</strong>, <strong>near</strong> and <strong>location</strong>. <strong>things</strong> is the data-set in which we are looking for information. It is usually a table in our database. It could be a users or restaurants table. The keyword <strong>near</strong> is the amount of distance within which we need to look into our data-set for information. It is given by a user using our application or already defined by us. Normally it is a few kilometers or miles. The third keyword, <strong>location</strong> is the place from which we need to measure the nearness of records in our data-set. This is also given by users using our application. It is identified by latitude and longitude on earth&#8217;s surface.</p>
<p>If we analyze above problem from engineering point of view, we can define it as following.</p>
<blockquote><p>
Give me all the <strong>things</strong><br />
order by <strong>distance</strong> from <strong>location</strong><br />
where <strong>distance</strong> &lt; <strong>kilometers</strong>
</p></blockquote>
<p>We are actually looking for records sorted by their <strong>distance</strong> from <strong>location</strong>. And we are considering only those records that have <strong>distance</strong> less than specified by user in kilometers or miles. Out of four keywords in the problem, we know three already viz. <strong>things</strong> &#8212; a table in our database, <strong>location</strong> and <strong>kilometers</strong> &#8212; provided by user. The only thing that we do not know is the <strong>distance</strong> between <strong>location</strong> and records in our data-set. Lets find a way to calculate the <strong>distance</strong>.</p>
<p>We have latitude and longitude of all the records in our data-set. For now lets assume that we have a <strong>hotels</strong> table in our database that has following structure.</p>
<table>
<tr>
<th>
      id
    </th>
<th>
      name
    </th>
<th>
      latitude
    </th>
<th>
      longitude
    </th>
</tr>
<tr>
<td>
      1
    </td>
<td>
      Le Meridien
    </td>
<td>
      6.4420085
    </td>
<td>
      3.415344
    </td>
</tr>
<tr>
<td>
      2
    </td>
<td>
      &#8230;
    </td>
<td>
      &#8230;
    </td>
<td>
      &#8230;
    </td>
</tr>
</table>
<p>
We also have <strong>location</strong> of the user in the form of latitude and longitude.</p>
<p>The distance between two points on the surface of a sphere is given by <a href="http://en.wikipedia.org/wiki/Haversine_formula">Haversine Formula</a>. Distance is given by following formula.</p>
<p>
<a href="http://vinsol.com/blog/wp-content/uploads/2011/08/distance-haversine.png"><img style="float:none" src="http://vinsol.com/blog/wp-content/uploads/2011/08/distance-haversine.png" alt="" title="distance-haversine" width="538" height="61" class="aligncenter size-full wp-image-1669" /></a>
</p>
<p>In above formula,</p>
<p>d = Distance between two points.<br />
R = Radius of the sphere on which the points are. In our case it is earth with 3959 Miles or 6371 Kilometers.<br />
lat1 and long1 are co-ordinates of the first point and lat2 and long2 are co-ordinates of second point in radians.</p>
<p>The corresponding MySQL statement to calculate distance between locations <strong>orig</strong> and <strong>dest</strong>:</p>
<pre class="brush: sql; wrap-lines: true;">
  6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(orig.lat - ABS(dest.lat))), 2) + COS(RADIANS(orig.lat)) * COS(RADIANS(ABS(dest.lat))) * POWER(SIN(RADIANS(orig.long - dest.long)), 2)))
</pre>
<p>And our complete MySQL query to get all the hotels that are within 10 kilometers from location identified by <strong>orig</strong>.</p>
<pre class="brush: sql; wrap-lines: true;">
SELECT id, name,
6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(orig.lat - ABS(hotels.latitude))), 2) + COS(RADIANS(orig.lat)) * COS(RADIANS(ABS(hotels.latitude))) * POWER(SIN(RADIANS(orig.long - hotels.longitude)), 2))) AS distance
FROM hotels
HAVING distance &lt; 10
ORDER BY distance LIMIT 10;
</pre>
<h4>Benchmark</h4>
<p>If we run <strong>EXPLAIN</strong> on the previous query we do not get very pleasant results.</p>
<pre class="brush: sql; wrap-lines: true;">
mysql&gt; EXPLAIN query \G
           id: 1
  select_type: SIMPLE
        table: hotels
         type: ALL
possible_keys: NULL
          key: NULL
      key_len: NULL
          ref: NULL
         rows: 10574
        Extra: Using filesort
1 row in set (0.00 sec)
</pre>
<p>This query scanned the whole table! It went through all the <strong>10574</strong> records in the table one by one and found the distance of that record from the location and then sorted all the records by its distance from it. This is not scalable for large data-sets.</p>
<h4>Optimization</h4>
<p>If we analyze our original problem once again.</p>
<blockquote><p>
Give me all the things<br />
order by distance from location<br />
where <strong>distance</strong> &lt; <strong>kilometers</strong>
</p></blockquote>
<p>Earlier we scanned whole table to find out the distance between each record and location specified by the user. But we are looking for records that are within the kilometers as specified by the user. If somehow we can find a relationship that describes how co-ordinates change with change in distance, we can get the co-ordinates of hotels that may be farthest from the location specified by the user. These farthest co-ordinates will form a boundary within which all other records will reside. Then we need to look only for the records that are within this boundary. It turns out to be that we do have relationship between co-ordinates and distance.</p>
<blockquote><p>
1˚ of latitude ~= 111.04 Kms<br />
1˚ of longitude ~= cos(latitude) * 111.04 Kms
</p></blockquote>
<p>We calculate the co-ordinates of the bounding box using above relationship between distance and co-ordinate change. We do this for location from <strong>orig</strong> and allowed <strong>distance</strong> given by <strong>dist</strong></p>
<pre class="brush: sql; wrap-lines: true;">
long1 = orig.long – dist / ABS(COS(RADIANS(orig.lat)) * 111.04)
long2 = orig.long + dist / ABS(COS(RADIANS(orig.lat)) * 111.04)

lat1 = orig.lat – dist / (111.04)
lat2 = orig.lat + dist / (111.04)
</pre>
<p>The bounding box will encompass the circle whose center and radius is given by user. Following figure gives us an idea how it will look like.</p>
<p><a href="http://vinsol.com/blog/wp-content/uploads/2011/08/g2926.png"><img style="float:none" src="http://vinsol.com/blog/wp-content/uploads/2011/08/g2926.png" alt="" title="g2926" width="316" height="289" class="aligncenter size-full wp-image-1691" /></a></p>
<p>The black dot is center of the circle it is also the location of the user. Radius of the circle is allowed kilometers withing which we need to look. Since the box is larger than the circle, it will encompass some records that do not fall within the circle. This may give use some false hits. The red dots denote false hits. The green dots denote correct hits.</p>
<p>For faster lookups, we define indexes on latitude and longitude columns in our table.</p>
<pre class="brush: sql; wrap-lines: true;">
CREATE INDEX `index_hotels_on_latitude_and_longitude` ON `hotels` (`latitude`, `longitude`)
</pre>
<p>We also change our original query to find the records within above box whose boundaries are defined by lat1, long1 and lat2, long2.</p>
<pre class="brush: sql; wrap-lines: true;">
SELECT id, name,
6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(orig.lat - ABS(hotels.latitude))), 2) + COS(RADIANS(orig.lat)) * COS(RADIANS(ABS(hotels.latitude))) * POWER(SIN(RADIANS(orig.long - hotels.longitude)), 2))) AS distance
FROM hotels
WHERE hotels.latitude BETWEEN lat1 AND lat2 AND hotels.longitude BETWEEN long1 AND long2
HAVING distance &lt; 10
ORDER BY distance LIMIT 10;
</pre>
<p>If we run <strong>EXPLAIN</strong> on above query.</p>
<pre class="brush: sql; wrap-lines: true;">
mysql&gt; EXPLAIN query \G
           id: 1
  select_type: SIMPLE
        table: listings
         type: range
possible_keys: index_hotels_on_latitude_and_longitude
          key: index_hotels_on_latitude_and_longitude
      key_len: 10
          ref: NULL
         rows: 825
        Extra: Using where, Using filesort
1 row in set (0.00 sec)
</pre>
<p>We see that number of rows now scanned are far more less than earlier. This time it scanned only <strong>825</strong> rows. In fact these are the number of records that are within the bounding box. So the number of rows that are to be scanned depend upon the number of records falling within the box. If our application has records that are concentrated around a place, number of scanned rows will be higher for query executed around that place.</p>
<h4>Using MySQL Spatial Data types</h4>
<p>MySQL natively supports <a href="http://dev.mysql.com/doc/refman/5.0/en/spatial-extensions.html">Spatial Data Types</a>. Lets use these data types to solve our problem.</p>
<pre class="brush: sql; wrap-lines: true;">
ALTER TABLE hotels ADD location POINT NOT NULL;

UPDATE hotels SET location = POINT(hotels.latitude, hotels.longitude);

ALTER TABLE hotels ADD SPATIAL KEY (location);
</pre>
<p>First we add a <strong>location</strong> column in our hotels table of POINT type. We also update the location column to have existing co-ordinates of our records. Finally we add a spatial key on the location column.</p>
<p>As of now MySQL does not have any standard <a href="http://en.wikipedia.org/wiki/Geographic_information_system">GIS</a> function that calculates distance between two points on the surface of a sphere. Lets define our own.</p>
<pre class="brush: sql; wrap-lines: true;">
DELIMITER $$
 CREATE FUNCTION distance (a POINT, b POINT) RETURNS double DETERMINISTIC
   BEGIN
     RETURN 6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(ABS(X(a)) - ABS(X(b)))), 2) + COS(RADIANS(ABS(X(a)))) * COS(RADIANS(ABS(X(b)))) * POWER(SIN(RADIANS(Y(a) - Y(b))), 2)));
   END  $$
DELIMITER ;
</pre>
<p>We use the same haversine formula to calculate distance between point a and point b.</p>
<p>Since we are now using Point data type to store locations of hotels in our database, we will use MySQL&#8217;s GIS functions to specify bounding box.</p>
<pre class="brush: sql; wrap-lines: true;">
SET @bbox = 'POLYGON((lat1 long1, lat1 long2, lat2 long2, lat2 long1, lat1 long1))'
</pre>
<p>Above defines a polygon that has four vertices defined by (lat1 long1), (lat1 long2), (lat2 long2) and (lat2 long1). The last coordinate explicitly specifies that it is a closed polygon.  The closing point is same as the first vertice of the polygon. Variables lat1, lat2, long1 and long2 are the same that we calculated earlier.</p>
<p>Now we update our SQL query to use POINT data types.</p>
<pre class="brush: sql; wrap-lines: true;">
SELECT id, name, distance(hotels.location, POINT(orig.lat, orig.long)) AS cdist
FROM hotels
WHERE INTERSECTS(hotels.location, PolygonFromText(@bbox))
HAVING cdist &lt; 10
ORDER BY cdist LIMIT 10;
</pre>
<p>Above, we are using INTERSECTS function provided by MySQL to find out whether location of a hotel falls within the bounnding box or not. PolygonFromText simply returs a polygon defined in a string. Lets run EXPLAIN on above query.</p>
<pre class="brush: sql; wrap-lines: true;">
mysql&gt; EXPLAIN query \G
           id: 1
  select_type: SIMPLE
        table: hotels
         type: range
possible_keys: location
          key: location
      key_len: 34
          ref: NULL
         rows: 70
        Extra: Using where; Using temporary; Using filesort
</pre>
<p>The number of rows scanned is significantly decreased. We can see that storing coordinates in POINT data type has improved the performance.<br />
<br/><br />
Following are some pointers that might be helpful exploring MySQL and Proximity searching.</p>
<ul>
<li><a href="http://www.arubin.org/files/geo_search.pdf">Presentation by Alexander Rubin [PDF]</a></li>
<li><a href="http://en.wikipedia.org/wiki/Haversine_formula">Haversine Formula</a></li>
<li><a href="http://geography.about.com/cs/latitudelongitude/a/latlong.htm">Latitude and Longitude explanation</a></li>
</ul>
<p><br/><br/></p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/08/30/geoproximity-search-with-mysql/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>&#8216;Launching Soon&#8217; – Helping Startups Build Online Identity Even before the Actual Launch</title>
		<link>http://vinsol.com/blog/2011/06/21/launching-soon-%e2%80%93-helping-startups-build-online-identity-even-before-the-actual-launch/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=launching-soon-%25e2%2580%2593-helping-startups-build-online-identity-even-before-the-actual-launch</link>
		<comments>http://vinsol.com/blog/2011/06/21/launching-soon-%e2%80%93-helping-startups-build-online-identity-even-before-the-actual-launch/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 06:21:19 +0000</pubDate>
		<dc:creator>naveen</dc:creator>
				<category><![CDATA[open_source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[Rails 3]]></category>
		<category><![CDATA[rails plugins]]></category>
		<category><![CDATA[open source plugin]]></category>
		<category><![CDATA[rails plugin]]></category>
		<category><![CDATA[ror]]></category>
		<category><![CDATA[RubyonRails]]></category>

		<guid isPermaLink="false">http://vinsol.com/blog/?p=1658</guid>
		<description><![CDATA[The process of brand building begins even before the actual website is launched. To have an eye-catching temporary ‘Launching Soon’ page can do a world of good for your online brand identity. It is the first step that lets you create initial buzz about your business and, therefore, it becomes imperative to have a dedicated [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>The process of brand building begins even before the actual website is launched. To have an eye-catching temporary ‘Launching Soon’ page can do a world of good for your online brand identity. It is the first step that lets you create initial buzz about your business and, therefore, it becomes imperative to have a dedicated<strong> ‘Launching Soon’</strong> or <strong>‘Coming Soon’</strong> page in place. Needless to say that an aesthetic landing page embosses a long lasting and distinctive impression in the visitors’ psyche, ensuring a successful first step in climbing the long ladder.</p>
<p><strong>Quick Introduction about ‘Launching Soon’</strong></p>
<p><em>&#8216;Launching Soon&#8217;</em> is a simple rails plugin that helps rails projects to manage a dedicated launching soon page before the actual launch date. The plugin also collects email from potential customers and can be integrated through an API to popular email marketing service providers like<a href="http://mailchimp.com/" target="_blank"> MailChimp</a> &amp; <a href="http://www.campaignmonitor.com/" target="_blank">CampaignMonitor</a> (to store customers email contacts). It lets you have a launch timer in place, and you can even have your company logo, about us section and much more. In a nutshell, all primary branding elements are present on your landing page (even before the launch of the official website). Exciting, isn’t it!</p>
<p>To hack over the excitement,<em> ‘Launching Soon’</em> is an open source rails plugin which can be used by anyone &amp; everyone to set up a fully customized and dedicated landing page in just a few minutes.</p>
<p><strong>Why bother for a dedicated launch soon page?</strong></p>
<p>Gone are the days when terrible yet oh so nostalgic ‘Under Construction’ animated GIF was appreciated by visitors. In its place, the use of more effective, functional and boiled down single ‘Coming Soon’ page is a cogent trend, capable of instantly satisfying the primary goals of the website owners.</p>
<p>For obvious reasons, there are other benefits of exerting efforts to have a great ‘Coming Soon’ page:</p>
<p>1.   <strong> Jumpstart your web presence</strong> – An effective landing page is the best way to ease the transition from going from naught to a full matured website launch.<br />
2.    <strong>Engage with the visitors</strong> – Think from where you can benefit the most, a garish graphic which says coming soon or one page site that interacts with the visitors.<br />
3.    <strong>Capture user data</strong> – This is perhaps one of the most important aspects of having a landing page. It lets you gather a database of genuinely interested users to whom you can send a newsletter notifying the release of your website. Big enough to help your site gain momentum.<br />
4.    <strong>Search engine optimization</strong> – Getting a domain name booked is not enough. It is essential and imperative to have something substantial online immediately rather than wait for the final product.</p>
<p>With Launching Soon, it is possible to encompass all the above mentioned aspects without any rigorous development and design hassles. With a simple rails plug and play you would be up and running within minutes with your landing page, buzzing about your business and building an online identity. So, if you need a launching soon page then this is it…<em>&#8216;Launching Soon&#8217;</em> can be a near perfect solution.</p>
<p>Get the app code at:</p>
<p><a href="https://github.com/vinsol/Launching-Soon" target="_blank">https://github.com/vinsol/Launching-Soon</a></p>
<p>Note &#8211; Currently<em> ‘Launching Soon’</em> works  with only rails 2.x. We are working on its compatibility with rails 3.x and would keep you posted with the updates.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://vinsol.com/blog/2011/06/21/launching-soon-%e2%80%93-helping-startups-build-online-identity-even-before-the-actual-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

