<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
<title>MarcGrabanski.com - Jack of All Trades Web Development</title>
<link>http://marcgrabanski.com</link>
<description>Sharing my web development career knowledge so you can do more. Frequently covers jQuery/JavaScript, HTML/HTML5 and CSS.</description>
<language>en-us</language>
<pubDate>2012-05-25 03:37:30 -0700</pubDate>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/allTrades" /><feedburner:info uri="alltrades" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>allTrades</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
<title>The Conclusion of MarcGrabanski.com</title>
<description>&lt;blockquote&gt;
&lt;p&gt;Update Aug 4, 2010: After closing down this website, people have come to me with remarkable stories of how my writings touched their lives. Please tell me your story if you have one: m at marcgrabanski.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It&amp;#8217;s been a fun ride. I am moving onto focusing on &lt;span class="caps"&gt;&lt;span class="caps"&gt;MJG&lt;/span&gt;&lt;/span&gt; International and closing down my personal website (see description on &lt;a href="http://www.linkedin.com/in/1marc"&gt;my LinkedIn&lt;/a&gt;). I&amp;#8217;ve been watching the traffic fade out and I&amp;#8217;ll leave this website up for archive purposes, but I&amp;#8217;m done writing on it. The purpose it served is now over.&lt;/p&gt;
&lt;h2&gt;The Road to Knowledge&lt;/h2&gt;
&lt;p&gt;In three and a half years, I went from a programmer with very little writing skills (just trying to not forget things I learned) to really being listened to by a wide range of people.&lt;/p&gt;
&lt;h2&gt;Traffic, Oh! So Much Traffic&lt;/h2&gt;
&lt;p&gt;&lt;img src="http://marcgrabanski.com/img/lifetime-traffic.png" title="Lifetime Traffic of MarcGrabanski.com" style="padding: 10px; float: right;"&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Millions of people.&lt;/strong&gt; I can&amp;#8217;t imagine how many football stadiums that would fill up! Sure, all I was doing was pushing the knowledge needle forward for people through open source code, but it really sunk deep into my heart what I was doing. I took it seriously and cultivated the traffic making sure it arrived at the right destination through proper wording, titles and headings.&lt;/p&gt;
&lt;p&gt;I deeply wanted to progress and receive the right information through my website. By helping others by writing, I progressed greatly.&lt;/p&gt;
&lt;h2&gt;Thank You, Eager Learners Around the World&lt;/h2&gt;
&lt;p&gt;I&amp;#8217;m honored and humbled to this day by the people who are willing and happy to learn from me. I want to progress peoples&amp;#8217; careers. I&amp;#8217;m not a great speaker (I need to work on that), but people listen to me and have changed their careers because of what I&amp;#8217;ve showed or taught them through speaking and teaching.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I got to travel around the world doing workshops and speaking engagements!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Think about that. I was just a largely unknown Minnesotan (technology black hole, as I refer to it), who eventually got to receive all-expense paid trips to other countries. Makes me want to cry tears of joy and say &amp;#8220;thank you&amp;#8230;&amp;#8221;&lt;/p&gt;
&lt;h2&gt;Power of Open Source&lt;/h2&gt;
&lt;p&gt;It is amazing what open source has done for the world. Open knowledge empowers greatly the earth. I created a script that took off like wildfire. To this day, the &lt;a href="http://marcgrabanski.com/articles/jquery-ui-datepicker"&gt;jQuery UI Datepicker&lt;/a&gt; is one of the &lt;strong&gt;world&amp;#8217;s most utilized JavaScript / interface components&lt;/strong&gt; which paved the way for what I&amp;#8217;m doing now. I did what I set out to achieve.&lt;/p&gt;
&lt;p&gt;Now I get to build user interface components for clients and companies. They&amp;#8217;ve made $millions off components I build. &lt;strong&gt;It turns out creating nice UI components is mega tough to get right, but when you do they are absolutely indispensable.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open source taught me how to do this. Thank you, open source.&lt;/p&gt;
&lt;h2&gt;Power of a Name&lt;/h2&gt;
&lt;p&gt;When I&amp;#8217;d write an article, help someone out, or write open source code my name was being spread around the internet. Spreading your name all over the internet through open source and sharing code snippets is definitely the best way I know to build a career for yourself.&lt;/p&gt;
&lt;p&gt;It comes down to this: &lt;strong&gt;do what you love to do first, display what you learn and get really good at it and the right career will find you.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This style of learning and sharing is a proven model of career success. Anybody who wants to &lt;a href="http://marcgrabanski.com/articles/becoming-a-great-web-developer"&gt;be great&lt;/a&gt; (/ well known) must travel this road. To my surprise, I was put in some sort of unspoken open source hall of credibility. My open source projects gave me instant cred with anyone in the world I worked with. This is an amazing phenomenon! You can work anywhere and even chose your job. The only caveat for me that this freedom is there only if you want to stick to the things you are known for. Even though I can perform up with some of the best coders, I&amp;#8217;ve changed now and I&amp;#8217;m not known for what I&amp;#8217;m best at. I&amp;#8217;ll continue to code, but it isn&amp;#8217;t my primary focus anymore.&lt;/p&gt;
&lt;p&gt;In conclusion, building street cred out in the trenches is an amazing way to build a career. Show your software and improve others! It is the only surefire way of building a successful career in doing what you love.&lt;/p&gt;
&lt;h2&gt;Archiving the &amp;#8220;Marc Grabanski&amp;#8221; Brand&lt;/h2&gt;
&lt;p&gt;I can no longer spread my name through the internet, but I know my name lives on in the hearts and minds of many that my work has touched&amp;#8230;and in the links to this website. ;)&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=NV12zDeQysI:lxQ8XsNhI18:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=NV12zDeQysI:lxQ8XsNhI18:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?i=NV12zDeQysI:lxQ8XsNhI18:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
<link>http://feedproxy.google.com/~r/allTrades/~3/NV12zDeQysI/conclusion-marcgrabanski-com</link>
<guid isPermaLink="false">http://marcgrabanski.com/articles/conclusion-marcgrabanski-com</guid>
<author>Marc Grabanski</author>
<pubDate>2011-08-02 14:06:38 UTC</pubDate>
<feedburner:origLink>http://marcgrabanski.com/articles/conclusion-marcgrabanski-com</feedburner:origLink></item>
<item>
<title>Simulating Mouse Click Events in JavaScript</title>
<description>&lt;p&gt;As our interfaces get more complex, JavaScript testing is becoming more critical. With browser testing, you should get as close to native events as you can. &lt;a href="http://bassistance.de/"&gt;Jörn Zaefferer&lt;/a&gt; recommended I check out &lt;a href="https://github.com/jquery/jquery-ui/blob/master/tests/jquery.simulate.js"&gt;jQuery Simulate&lt;/a&gt;. In my case I just needed a pure JavaScript way to simulate browser click events at a given location, so I ripped out the jQuery dependance and created a wrapper just around the mouse events.&lt;/p&gt;
&lt;h2&gt;Pure JavaScript Click Simulate&lt;/h2&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="kw"&gt;function&lt;/span&gt; &lt;span class="fu"&gt;mouseEvent&lt;/span&gt;(type, sx, sy, cx, cy) {&lt;br /&gt;
  &lt;span class="kw"&gt;var&lt;/span&gt; evt;&lt;br /&gt;
  &lt;span class="kw"&gt;var&lt;/span&gt; e = {&lt;br /&gt;
    &lt;span class="ke"&gt;bubbles&lt;/span&gt;: &lt;span class="pc"&gt;true&lt;/span&gt;, &lt;span class="ke"&gt;cancelable&lt;/span&gt;: (type != &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;mousemove&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;), &lt;span class="ke"&gt;view&lt;/span&gt;: window, &lt;span class="ke"&gt;detail&lt;/span&gt;: &lt;span class="i"&gt;0&lt;/span&gt;,&lt;br /&gt;
    &lt;span class="ke"&gt;screenX&lt;/span&gt;: sx, &lt;span class="ke"&gt;screenY&lt;/span&gt;: sy, &lt;span class="ke"&gt;clientX&lt;/span&gt;: cx, &lt;span class="ke"&gt;clientY&lt;/span&gt;: cy,&lt;br /&gt;
    &lt;span class="ke"&gt;ctrlKey&lt;/span&gt;: &lt;span class="pc"&gt;false&lt;/span&gt;, &lt;span class="ke"&gt;altKey&lt;/span&gt;: &lt;span class="pc"&gt;false&lt;/span&gt;, &lt;span class="ke"&gt;shiftKey&lt;/span&gt;: &lt;span class="pc"&gt;false&lt;/span&gt;, &lt;span class="ke"&gt;metaKey&lt;/span&gt;: &lt;span class="pc"&gt;false&lt;/span&gt;,&lt;br /&gt;
    &lt;span class="ke"&gt;button&lt;/span&gt;: &lt;span class="i"&gt;0&lt;/span&gt;, &lt;span class="ke"&gt;relatedTarget&lt;/span&gt;: &lt;span class="pc"&gt;undefined&lt;/span&gt;&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  &lt;span class="kw"&gt;if&lt;/span&gt; (&lt;span class="kw"&gt;typeof&lt;/span&gt;( document.createEvent ) == &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;function&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;) {&lt;br /&gt;
    evt = document.createEvent(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;MouseEvents&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;
    evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,&lt;br /&gt;
    e.screenX, e.screenY, e.clientX, e.clientY,&lt;br /&gt;
    e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,&lt;br /&gt;
    e.button, document.body.parentNode);&lt;br /&gt;
  } &lt;span class="kw"&gt;else&lt;/span&gt; &lt;span class="kw"&gt;if&lt;/span&gt; (document.createEventObject) {&lt;br /&gt;
    evt = document.createEventObject();&lt;br /&gt;
    &lt;span class="kw"&gt;for&lt;/span&gt; (prop &lt;span class="kw"&gt;in&lt;/span&gt; e) {&lt;br /&gt;
      evt[prop] = e[prop];&lt;br /&gt;
    }&lt;br /&gt;
    evt.button = { &lt;span class="i"&gt;0&lt;/span&gt;:&lt;span class="i"&gt;1&lt;/span&gt;, &lt;span class="i"&gt;1&lt;/span&gt;:&lt;span class="i"&gt;4&lt;/span&gt;, &lt;span class="i"&gt;2&lt;/span&gt;:&lt;span class="i"&gt;2&lt;/span&gt; }[evt.button] || evt.button;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;span class="kw"&gt;return&lt;/span&gt; evt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span class="kw"&gt;function&lt;/span&gt; &lt;span class="fu"&gt;dispatchEvent&lt;/span&gt; (el, evt) {&lt;br /&gt;
  &lt;span class="kw"&gt;if&lt;/span&gt; (el.dispatchEvent) {&lt;br /&gt;
    el.dispatchEvent(evt);&lt;br /&gt;
  } &lt;span class="kw"&gt;else&lt;/span&gt; &lt;span class="kw"&gt;if&lt;/span&gt; (el.fireEvent) {&lt;br /&gt;
    el.fireEvent(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="k"&gt;on&lt;/span&gt;&lt;span class="dl"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt; + type, evt);&lt;br /&gt;
  }&lt;br /&gt;
  &lt;span class="kw"&gt;return&lt;/span&gt; evt;&lt;br /&gt;
}&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;There is some good stuff in here, namely &lt;code&gt;document.createEvent&lt;/code&gt; and the fallback to &lt;code&gt;document.createEventObject()&lt;/code&gt;. As well as &lt;code&gt;el.dispatchEvent&lt;/code&gt; and the fallback to &lt;code&gt;el.fireEvent&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is an example of using my extracted methods to perform a simulated click.&lt;/p&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;window.&lt;span class="fu"&gt;onclick&lt;/span&gt; = &lt;span class="kw"&gt;function&lt;/span&gt;(){&lt;br /&gt;
  console.log(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="k"&gt;window clicked&lt;/span&gt;&lt;span class="dl"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span class="kw"&gt;var&lt;/span&gt; test = document.getElementById(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="k"&gt;test&lt;/span&gt;&lt;span class="dl"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;
test.&lt;span class="fu"&gt;onclick&lt;/span&gt; = &lt;span class="kw"&gt;function&lt;/span&gt;(){&lt;br /&gt;
  console.log(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;#8216;&lt;/span&gt;&lt;span class="k"&gt;test clicked&lt;/span&gt;&lt;span class="dl"&gt;&amp;#8217;&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span class="kw"&gt;var&lt;/span&gt; evt = mouseEvent(&lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;click&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;, &lt;span class="i"&gt;1&lt;/span&gt;, &lt;span class="i"&gt;50&lt;/span&gt;, &lt;span class="i"&gt;1&lt;/span&gt;, &lt;span class="i"&gt;50&lt;/span&gt;);&lt;br /&gt;
dispatchEvent(test, evt);&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;We are just console logging here, but there is no reason you can&amp;#8217;t hitch jQuery simulate or something like this into your current testing framework.&lt;/p&gt;
&lt;p&gt;If you do have jQuery, you can use jQuery Simulate as mentioned above, or in the past I&amp;#8217;ve achieved virtually the same thing with this method:&lt;/p&gt;
&lt;h2&gt;jQuery Click Simulate (without a plugin)&lt;/h2&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="kw"&gt;var&lt;/span&gt; &lt;span class="pd"&gt;$el&lt;/span&gt; = &lt;span class="pd"&gt;$&lt;/span&gt;(selector);&lt;br /&gt;
&lt;span class="kw"&gt;var&lt;/span&gt; offset = &lt;span class="pd"&gt;$el&lt;/span&gt;.offset();&lt;br /&gt;
&lt;span class="kw"&gt;var&lt;/span&gt; event = &lt;span class="pd"&gt;$&lt;/span&gt;.extend( &lt;span class="pd"&gt;$&lt;/span&gt;.Event( &lt;span class="s"&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;mousedown&lt;/span&gt;&lt;span class="dl"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt; ), {&lt;br /&gt;
                                                &lt;span class="ke"&gt;which&lt;/span&gt;: &lt;span class="i"&gt;1&lt;/span&gt;,&lt;br /&gt;
                                                &lt;span class="ke"&gt;pageX&lt;/span&gt;: offset.left,&lt;br /&gt;
                                                &lt;span class="ke"&gt;pageY&lt;/span&gt;: offset.top&lt;br /&gt;
                                        });&lt;br /&gt;
&lt;span class="pd"&gt;$el&lt;/span&gt;.trigger(event);&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Just extend a new mousedown event and set set some properties.&lt;/p&gt;
&lt;p&gt;In &lt;a href="http://api.jquery.com/category/events/event-object/"&gt;jQuery 1.6 events&lt;/a&gt;, this is even easier.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;As of jQuery 1.6, you can also pass an object to jQuery.Event() and its properties will be set on the newly created Event object.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Bonus Testing Method&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://scottgonzalez.com/"&gt;Scott González&lt;/a&gt; also pointed me to another gem for testing, &lt;code&gt;document.elementFromPoint(x, y)&lt;/code&gt;. &lt;a href="http://www.quirksmode.org/dom/w3c_cssom.html#documentview"&gt;Browser support for elementFromPoint&lt;/a&gt; seems to be pretty good. With it you can determine what element is positioned in front at a given location.&lt;/p&gt;
&lt;p&gt;Now go add some test coverage to your UI.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=wkF-KX_Trhg:MC-GkNXSaSU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=wkF-KX_Trhg:MC-GkNXSaSU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?i=wkF-KX_Trhg:MC-GkNXSaSU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
<link>http://feedproxy.google.com/~r/allTrades/~3/wkF-KX_Trhg/simulating-mouse-click-events-in-javascript</link>
<guid isPermaLink="false">http://marcgrabanski.com/articles/simulating-mouse-click-events-in-javascript</guid>
<author>Marc Grabanski</author>
<pubDate>2011-07-08 18:30:05 UTC</pubDate>
<feedburner:origLink>http://marcgrabanski.com/articles/simulating-mouse-click-events-in-javascript</feedburner:origLink></item>
<item>
<title>Exciting Features in CouchDB</title>
<description>&lt;p&gt;The deeper I get into CouchDB, the more I love it. I empathize with the thread on Quora about &lt;a href="http://www.quora.com/CouchDB/Why-isnt-CouchDB-more-popular"&gt;why isn&amp;#8217;t couchDB more popular?&lt;/a&gt; started by someone who was blown away like I was when I started using CouchDB.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Quick &lt;span class="caps"&gt;&lt;span class="caps"&gt;FYI&lt;/span&gt;&lt;/span&gt;: this article is a high-level overview of CouchDB features, not a tutorial.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/couchdb-logo.jpg" title="CouchDB Logo" alt="CouchDB Logo" /&gt;&lt;/p&gt;
&lt;p&gt;Ok, so what makes me so excited about CouchDB?! CouchDB is a NoSQL, schema-free &lt;span class="caps"&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/span&gt; document storage where JavaScript can access the database directly via &lt;span class="caps"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/span&gt; with no middleware required! Let me say that again&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;JavaScript can access the database directly.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are a web application developer, you know your apps just end up being a &lt;span class="caps"&gt;&lt;span class="caps"&gt;REST&lt;/span&gt;&lt;/span&gt; interface to &lt;span class="caps"&gt;&lt;span class="caps"&gt;SQL&lt;/span&gt;&lt;/span&gt; queries that check a session for permission. I can&amp;#8217;t tell you how many times I see application that are just mapping &lt;span class="caps"&gt;&lt;span class="caps"&gt;SQL&lt;/span&gt;&lt;/span&gt; queries to a router of some sort. Welp, no need for that if you use CouchDB (albeit it takes a lot of learning to get there).&lt;/p&gt;
&lt;p&gt;CouchDB is &lt;span class="caps"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/span&gt; / &lt;span class="caps"&gt;&lt;span class="caps"&gt;REST&lt;/span&gt;&lt;/span&gt;-based in its core.&lt;/p&gt;
&lt;p&gt;Here is an overview of more features that make me happy using CouchDB.&lt;/p&gt;
&lt;h2&gt;Browser-based &lt;span class="caps"&gt;&lt;span class="caps"&gt;GUI&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Play with your data, permissions and configuration right from the browser with CouchDB&amp;#8217;s interface Futon.&lt;/p&gt;
&lt;h2&gt;Replication&lt;/h2&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/couchdb-replication.jpg" title="CouchDB Replication" alt="CouchDB Replication" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve never seen a database so simple to replicate. Just make a &lt;span class="caps"&gt;&lt;span class="caps"&gt;POST&lt;/span&gt;&lt;/span&gt; request.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;{"source":"example-database","target":"http://example.org/example-database"}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And your database is replicated for you. You can even add &lt;code&gt;"continuous": true&lt;/code&gt; and your database will sync automatically. You can also add filters to your replication to only sync certain types of data.&lt;/p&gt;
&lt;h2&gt;&lt;span class="caps"&gt;&lt;span class="caps"&gt;JSONP&lt;/span&gt;&lt;/span&gt; for Free&lt;/h2&gt;
&lt;p&gt;Update your config to allow_jsonp = true and &lt;span class="caps"&gt;&lt;span class="caps"&gt;BAM&lt;/span&gt;&lt;/span&gt;! Automatically your database is accessible cross domain for &lt;span class="caps"&gt;&lt;span class="caps"&gt;GET&lt;/span&gt;&lt;/span&gt; requests. There an even a code commit recently to add support for full cross-domain &lt;span class="caps"&gt;&lt;span class="caps"&gt;XHR&lt;/span&gt;&lt;/span&gt; in CouchDB.&lt;/p&gt;
&lt;h2&gt;Changes &lt;span class="caps"&gt;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Want to know if your database has been changed and update the UI accordingly? You can open a &lt;span class="caps"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/span&gt; socket to /db/_changes?continuous=true and be notified as changes occur in the database. You can even apply filters to only listen for certain types of changes.&lt;/p&gt;
&lt;h2&gt;Authentication and Session Support&lt;/h2&gt;
&lt;p&gt;The Authentication features in CouchDB has certainly blown me away multiple times. Not only can you login via basic &lt;span class="caps"&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt;&lt;/span&gt; Authentication http://username:password@yourdatabase, but you can also keep authentication open via a session cookie. Ok, so we have been doing this in web applications for ever, but this is a database. &lt;span class="caps"&gt;&lt;span class="caps"&gt;POST&lt;/span&gt;&lt;/span&gt; username and password to _session and you get a cookie. =)&lt;/p&gt;
&lt;h2&gt;Security&lt;/h2&gt;
&lt;p&gt;It also has database-level security. The permissions per database are separated into readers and admins. Readers can both read and write to the database so I think they are changing the name of that, but admins can also update the _design documents in a database&amp;#8230;you don&amp;#8217;t want normal users to be able to do that.&lt;/p&gt;
&lt;p&gt;Combine auth / session handling with security and you now can allow your normal users to &lt;em&gt;access your database directly from the browser&lt;/em&gt;!&lt;/p&gt;
&lt;h2&gt;validation&lt;/h2&gt;
&lt;p&gt;The ability to validate inserts is built right into the database. You can combine with authentication to check to make sure the creator of the document is the one who is logged in.&lt;/p&gt;
&lt;h2&gt;OAuth&lt;/h2&gt;
&lt;p&gt;CouchDB supports OAuth out of the box too, so if you want to persist your authentication you get that for free too.&lt;/p&gt;
&lt;h2&gt;Map/Reduce, List and Show&lt;/h2&gt;
&lt;p&gt;Of course the most difficult hurdle to leap into CouchDB and why so many people just jump into MongoDB is the map/reduce system. You have to learn how to take a bunch of documents, emit what you need and then reduce it down based on grouping relevant data. At that point you use _list and _show methods to get whatever you need from the aggregated data.&lt;/p&gt;
&lt;p&gt;But be forewarned&amp;#8230;being able to map/reduce and then filter on a dataset with views takes a while to wrap your head around.&lt;/p&gt;
&lt;h2&gt;Attachments&lt;/h2&gt;
&lt;p&gt;You can attach blobs to a document and serve them directly out of CouchDB. With attachments you can serve out entire web applications with CouchDB.&lt;/p&gt;
&lt;h2&gt;Cool Projects in CouchDB Ecosystem&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/couchbaselabs/iOS-Couchbase"&gt;iOS Couchbase&lt;/a&gt; lets you package a local CouchDB in an iOS app. This really takes advantage of Couch&amp;#8217;s replication and the philosophy of the project.&lt;/p&gt;
&lt;p&gt;Geospacial indexing here we go, with &lt;a href="https://github.com/couchbase/geocouch"&gt;GeoCouch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Need to split up your CouchDB across multiple servers? &lt;a href="http://tilgovi.github.com/couchdb-lounge/"&gt;Use Lounge Nginx module&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Not 100% Roses&lt;/h2&gt;
&lt;p&gt;As this guy is &lt;a href="http://www.paperplanes.de/2010/7/26/10_annoying_things_about_couchdb.html"&gt;annoyed by 10 things in CouchDB&lt;/a&gt; and recently &lt;a href="http://seancoates.com/blogs/gimme-bar-on-mongodb"&gt;GimmeBar moved to MongoDB&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Meets My Needs&lt;/h2&gt;
&lt;p&gt;But for my needs, I love that JavaScript can interact with the database directly. I love that I get &lt;span class="caps"&gt;&lt;span class="caps"&gt;JSONP&lt;/span&gt;&lt;/span&gt; for free and soon cross-domain &lt;span class="caps"&gt;&lt;span class="caps"&gt;XHR&lt;/span&gt;&lt;/span&gt;. I&amp;#8217;ll admit it is taking me a long time to wrap my head around map/reduce and the view / query system, but I&amp;#8217;ve been able to do everything I need.&lt;/p&gt;
&lt;h2&gt;Where to Start?&lt;/h2&gt;
&lt;p&gt;I got started walking through the &lt;a href="http://guide.couchdb.org/draft/"&gt;CouchDB Guide&lt;/a&gt; and also used the &lt;a href="http://wiki.apache.org/couchdb/Reference"&gt;CouchDB Reference on the Wiki&lt;/a&gt; to dig into the specific parts of the &lt;span class="caps"&gt;&lt;span class="caps"&gt;API&lt;/span&gt;&lt;/span&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=l5bRrWWnPDw:ZSFvhZHMw48:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=l5bRrWWnPDw:ZSFvhZHMw48:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?i=l5bRrWWnPDw:ZSFvhZHMw48:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
<link>http://feedproxy.google.com/~r/allTrades/~3/l5bRrWWnPDw/exiciting-features-in-couchdb</link>
<guid isPermaLink="false">http://marcgrabanski.com/articles/exiciting-features-in-couchdb</guid>
<author>Marc Grabanski</author>
<pubDate>2011-05-16 15:13:01 UTC</pubDate>
<feedburner:origLink>http://marcgrabanski.com/articles/exiciting-features-in-couchdb</feedburner:origLink></item>
<item>
<title>Entrepreneurs are Dead, Long Live the Hacker</title>
<description>&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/cheetah.jpg" title="Cheetah" alt="Cheetah" /&gt;&lt;/p&gt;
&lt;p&gt;Society is moving at an unprecedented pace. A year ago I didn&amp;#8217;t have the word &amp;#8220;Android&amp;#8221; in my vocabulary but now I use an Android phone every day. Entrepreneurs of yesterday have to wake up to this new world and realize that the rules have changed. Entrepreneurs suddenly, &amp;#8220;cannot find good talent&amp;#8221;. Meanwhile, &lt;strong&gt;hackers don&amp;#8217;t need idea people when they &lt;em&gt;are&lt;/em&gt; the idea people.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Inside the Hacker&amp;#8217;s Mind&lt;/h2&gt;
&lt;p&gt;The job of the hacker is to turn ideas into reality and breathe life into the idea. Without the hacker, the entrepreneur (idea person) is dead &amp;#8212; if hackers have their own ideas, they don&amp;#8217;t need the typical &amp;#8220;entrepreneur&amp;#8221; and instead become one. &lt;span class="caps"&gt;&lt;span class="caps"&gt;CEO&lt;/span&gt;&lt;/span&gt; of companies like Etsy, Github and Facebook are all examples of this.&lt;/p&gt;
&lt;p&gt;This has created such an environment that many entrepreneurs come to me and ask, &amp;#8220;Where are all the developers, it is really hard to find good developers these days.&amp;#8221; I am forced to tell them the brutal reality: &amp;#8220;They don&amp;#8217;t need you anymore since they&amp;#8217;d usually work on their own ideas, so you better be able to prove you can close sales and have the cash on hand to hire them to work on yours.&amp;#8221;&lt;/p&gt;
&lt;h2&gt;Hackers Thrive on Progress&lt;/h2&gt;
&lt;p&gt;The biggest way to interest a hacker beyond money is through providing opportunities to progress in skills. Hackers need progress daily (I&amp;#8217;d also argue all of humanity feels this way, but most certainly hackers). Hackers need a project, or five, to hack on to improve their abilities. If you are a business owner, give hackers ways to experiment and own the success of ideas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Entrepreneurs have only one option for thriving in today&amp;#8217;s new society: become a hacker or find hackers and give them liberty to try out their ideas and progress.&lt;/strong&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=XkuqD08kHDU:5omqrbQZhME:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=XkuqD08kHDU:5omqrbQZhME:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?i=XkuqD08kHDU:5omqrbQZhME:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
<link>http://feedproxy.google.com/~r/allTrades/~3/XkuqD08kHDU/long-live-the-hacker-entrepreneurs</link>
<guid isPermaLink="false">http://marcgrabanski.com/articles/long-live-the-hacker-entrepreneurs</guid>
<author>Marc Grabanski</author>
<pubDate>2011-04-01 06:21:06 UTC</pubDate>
<feedburner:origLink>http://marcgrabanski.com/articles/long-live-the-hacker-entrepreneurs</feedburner:origLink></item>
<item>
<title>"Are You Rich?"</title>
<description>&lt;p&gt;I wrote this article looking out the window of the cheap bedroom I&amp;#8217;m renting, while thinking about how I planned to dump significant amount of my business&amp;#8217;s profits into creating a conference that is free for everyone. It turned into a whopping success in terms of everyone getting great education and having a good time. If you are curious what I am talking about read &lt;a href="http://thenextweb.com/mobile/2011/01/31/googles-free-day-of-javascript-on-mobile/"&gt;coverage of the event&lt;/a&gt;.&lt;/p&gt;
&lt;p style="text-align:center;"&gt;&lt;a href="http://www.flickr.com/photos/franksvalli/5394719161"&gt;&lt;img src="http://marcgrabanski.com/img/dayofjs.jpg" title="Day of JavaScript on Mobile" alt="Day of JavaScript on Mobile" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Choosing Against Profit&lt;/h3&gt;
&lt;p&gt;Even though I know how to profit and am good at business, I chose not to profit from it this time and instead lose money and lots of it. I can honestly say I did this out of pure intentions without expecting anything in return. Already many good things have come of it, but one thing I know after creating the event is that the world needs more good, genuine events. We plan to do more of them.&lt;/p&gt;
&lt;h3&gt;&amp;#8220;So you must be rich..&amp;#8221;&lt;/h3&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/dublin-hotel.jpg" title="Dublin Hotel" alt="Dublin Hotel" /&gt;&lt;/p&gt;
&lt;p&gt;In my life, I&amp;#8217;ve had offers to do things that would seem to be the better option because it would keep the $ in my bank account. But honestly, I&amp;#8217;m not on this earth to make money. I have dumped every dollar out of my bank account in good faith several times because I believe it is the right thing to do. Money isn&amp;#8217;t my mission. My bar for success isn&amp;#8217;t money so you will see me spend money in ways that go against the rules of capitalism.&lt;/p&gt;
&lt;p&gt;I am simply trying to understand principles that make up a good person and I am trying to be that. Even if at times I have negative numbers in the bank account I am already rich in many ways.&lt;/p&gt;
&lt;h3&gt;&amp;#8220;Negative $ but Rich? ..huh?&amp;#8221;&lt;/h3&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/duluth-overlook.jpg" title="Duluth Minnesota Overlook" alt="Duluth Minnesota Overlook" /&gt;&lt;/p&gt;
&lt;p&gt;Even though if you look at my bank account it shows some negative numbers, I believe more than ever I&amp;#8217;m already rich. I can make financial decisions and could chose at any moment to not have those negative numbers exist, but what I build in peoples&amp;#8217; hearts and minds is more important than my temporary pain, or profit. The fact that you are even reading this says something.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m  rich in passion to do things I love to do. I fully expect rich people to be jealous of the intangibles I have. A healthy relationship with a woman who loves me very much, a job I feel very strongly about and am good at, and connections that can bring together amazing results beyond if you tried to do the same things with cash. If I can position myself to promote good content, good people, good work, good clients, good projects and good faith that will be a job well done. Not measured by how much $ is in my account because life itself is fragile and temporal to be measured by such things.&lt;/p&gt;
&lt;h3&gt;&amp;#8220;So..are you?&amp;#8221;&lt;/h3&gt;
&lt;p style="text-align:center;"&gt;&lt;img src="http://marcgrabanski.com/img/dublin-main.jpg" title="Dublin Main Street" alt="Dublin Main Street" /&gt;&lt;/p&gt;
&lt;p&gt;In terms of actual dollars I am certainly not rich&amp;#8230;but in terms of the fact that my mind, skills, knowledge and wisdom are desired by many and at any time I could decide to build something that is very profitable if I feel strongly about it then by that standard I have millions of intangible assets.&lt;/p&gt;
&lt;p&gt;The team I have working with me is full of valuable skills and is growing into a large network full of amazing people. The skills and the team around me is a bigger bank account than anything I&amp;#8217;ve ever possessed in my life. Entrepreneurs I&amp;#8217;ve talked to, even well funded ones only can dream of what we are able to create together without needing money from anyone. We have the power and choice to do things that very few can do. We can create profitable relationships or even give away our talents for the greater good if we so desire, what we do is our choice.&lt;/p&gt;
&lt;p&gt;That, my friends, is being rich with something far &lt;a href="http://marcgrabanski.com/articles/developing-value-stronger-than-money"&gt;more valuable than gold itself&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=ZpO058YOcyU:vNcS3omCL5g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/allTrades?a=ZpO058YOcyU:vNcS3omCL5g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/allTrades?i=ZpO058YOcyU:vNcS3omCL5g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</description>
<link>http://feedproxy.google.com/~r/allTrades/~3/ZpO058YOcyU/are-you-rich</link>
<guid isPermaLink="false">http://marcgrabanski.com/articles/are-you-rich</guid>
<author>Marc Grabanski</author>
<pubDate>2011-02-10 01:37:44 UTC</pubDate>
<feedburner:origLink>http://marcgrabanski.com/articles/are-you-rich</feedburner:origLink></item>
</channel>
</rss>

