Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new post

  • Loading branch information...
commit 5965a642e35cae3af7429b5de8f899d2bc2b3000 1 parent ffa031e
@sebastienlachance authored
Showing with 4,173 additions and 6,539 deletions.
  1. +10 −0 deploy.sh
  2. +253 −489 public/atom.xml
  3. +2 −2 public/blog/2009-retrospective/index.html
  4. +2 −2 public/blog/2010-goals/index.html
  5. +2 −2 ...circular-reference-was-detected-while-serializing-an-object-to-type-code-dot-models-dot-category/index.html
  6. +2 −2 public/blog/a-new-job/index.html
  7. +2 −2 public/blog/activatorcreateinstance-problem/index.html
  8. +2 −2 public/blog/adding-a-mime-map-in-iis/index.html
  9. +2 −2 public/blog/adding-an-element-to-an-array-in-c/index.html
  10. +2 −2 public/blog/adding-ncover-to-cruisecontrolnet/index.html
  11. +2 −2 public/blog/adding_a_mime_map_in_iss/index.html
  12. +2 −2 public/blog/ajax-wcf-and-deserialization-problem/index.html
  13. +2 −2 public/blog/alternativetonet-review/index.html
  14. +2 −2 public/blog/altnet-podcast/index.html
  15. +2 −2 ...view-of-e2809cpragmatic-thinking-learninge2809d-and-probably-no-interesting-content-in-this-post/index.html
  16. +2 −2 public/blog/another-metablogging-post/index.html
  17. +2 −2 public/blog/appsumo-and-the-bad-ass-developer-bundle/index.html
  18. +2 −40 public/blog/archives/index.html
  19. +2 −2 public/blog/asp-dot-net-mvc-actionlink-with-image/index.html
  20. +2 −2 public/blog/aspnet-mvc-beta/index.html
  21. +2 −2 public/blog/aspnet-mvc-request-handling-poster/index.html
  22. +2 −2 public/blog/available/index.html
  23. +2 −2 public/blog/back-from-my-2-weeks-vacation/index.html
  24. +0 −331 public/blog/backbone-and-page-transition/index.html
  25. +0 −346 public/blog/backbone-fetching-a-single-model/index.html
  26. +0 −776 public/blog/backbone-going-through-the-todo-dot-js-example/index.html
  27. +2 −2 public/blog/basic-layout-of-my-solution/index.html
  28. +2 −2 public/blog/becoming-a-better-developer-second-update/index.html
  29. +2 −2 public/blog/becoming-a-better-developer-third-update/index.html
  30. +2 −2 public/blog/becoming-a-better-developer-where-am-i/index.html
  31. +2 −2 public/blog/blog-of-the-day/index.html
  32. +2 −2 public/blog/book-review-head-first-design-patterns/index.html
  33. +2 −2 ...c/blog/book-review-of-dont-make-me-think-a-common-sense-approach-to-web-usability-par-steve-krug/index.html
  34. +2 −2 public/blog/bookmarks-of-the-week-1/index.html
  35. +2 −2 public/blog/bookmarks-of-the-week-2/index.html
  36. +2 −2 public/blog/build-failed-due-to-validation-errors/index.html
  37. +2 −2 public/blog/building-a-new-application-introduction/index.html
  38. +2 −2 public/blog/buying-games-on-steam/index.html
  39. +2 −2 public/blog/cannot-have-multiple-items-selected-in-a-dropdownlist/index.html
  40. +1 −1  public/blog/categories/-net/atom.xml
  41. +2 −2 public/blog/categories/-net/index.html
  42. +1 −1  public/blog/categories/architecture/atom.xml
  43. +2 −2 public/blog/categories/architecture/index.html
  44. +1 −1  public/blog/categories/asp-net/atom.xml
  45. +2 −2 public/blog/categories/asp-net/index.html
  46. +1 −1  public/blog/categories/assets-pipeline/atom.xml
  47. +2 −2 public/blog/categories/assets-pipeline/index.html
  48. +1 −46 public/blog/categories/backbone/atom.xml
  49. +2 −30 public/blog/categories/backbone/index.html
  50. +1 −1  public/blog/categories/blogging-/atom.xml
  51. +2 −2 public/blog/categories/blogging-/index.html
  52. +1 −1  public/blog/categories/ci/atom.xml
  53. +2 −2 public/blog/categories/ci/index.html
  54. +1 −1  public/blog/categories/consulting/atom.xml
  55. +2 −2 public/blog/categories/consulting/index.html
  56. +1 −1  public/blog/categories/csharp/atom.xml
  57. +2 −2 public/blog/categories/csharp/index.html
  58. +1 −1  public/blog/categories/design/atom.xml
  59. +2 −2 public/blog/categories/design/index.html
  60. +1 −1  public/blog/categories/games/atom.xml
  61. +2 −2 public/blog/categories/games/index.html
  62. +1 −1  public/blog/categories/iis/atom.xml
  63. +2 −2 public/blog/categories/iis/index.html
  64. +1 −1  public/blog/categories/javascript-/atom.xml
  65. +2 −2 public/blog/categories/javascript-/index.html
  66. +1 −1  public/blog/categories/javascript/atom.xml
  67. +2 −2 public/blog/categories/javascript/index.html
  68. +1 −1  public/blog/categories/mvc/atom.xml
  69. +2 −2 public/blog/categories/mvc/index.html
  70. +1 −1  public/blog/categories/rails/atom.xml
  71. +2 −2 public/blog/categories/rails/index.html
  72. +1 −1  public/blog/categories/ruby/atom.xml
  73. +2 −2 public/blog/categories/ruby/index.html
  74. +1 −1  public/blog/categories/startup/atom.xml
  75. +2 −2 public/blog/categories/startup/index.html
  76. +1 −1  public/blog/categories/visualstudio/atom.xml
  77. +2 −2 public/blog/categories/visualstudio/index.html
  78. +2 −2 public/blog/completely-unrealistic-example-a-backbone-blog/index.html
  79. +2 −2 public/blog/congratulation-to-me!/index.html
  80. +3 −3 public/blog/converting-a-blogengine-dot-net-blog-to-octopress/index.html
  81. +2 −2 public/blog/converting-a-test-to-rhino-mocks-35-and-the-problem-i-had/index.html
  82. +2 −2 public/blog/couldnt-parse-yaml-at-line-x-column-x-psych-syntaxerror/index.html
  83. +2 −2 public/blog/creating-a-csv-file-and-dealing-with-special-characters/index.html
  84. +2 −2 public/blog/currently-reading-dont-make-me-think/index.html
  85. +2 −2 public/blog/currently-reading-jquery-in-action/index.html
  86. +2 −2 public/blog/datasource-files-in-my-web-service-generated-files/index.html
  87. +2 −2 public/blog/difference-between-htm-and-html-extension/index.html
  88. +2 −2 public/blog/disponible/index.html
  89. +2 −2 public/blog/evernote-4-is-better-than-ever/index.html
  90. +2 −2 public/blog/everything-you-need-to-start-writing-windows-services/index.html
  91. +2 −2 public/blog/excellent-foundations-of-programming/index.html
  92. +2 −2 public/blog/excellent-post-by-uncle-bob/index.html
  93. +2 −2 public/blog/exploring-anonymous-methods/index.html
  94. +2 −2 ...ver-due-to-a-failure-in-starting-the-process-for-the-user-instance-the-connection-will-be-closed/index.html
  95. +4 −4 public/blog/filling-a-select-from-an-array-on-javascript-object/index.html
  96. +2 −2 public/blog/finally-the-time-has-come/index.html
  97. +2 −2 public/blog/find-in-php-files/index.html
  98. +2 −2 public/blog/first-experience-with-visual-studio-2008/index.html
  99. +2 −2 public/blog/fluenthibernate-how-to-deal-with-a-reserved-word-column/index.html
  100. +2 −2 public/blog/functional-programming-starting-to-learn-clojure/index.html
  101. +2 −2 public/blog/getting-rid-of-intellisense-addiction/index.html
  102. +2 −2 public/blog/getting-started-with-nhibernate/index.html
  103. +2 −2 public/blog/getting-started-with-selenium-ide-part-1/index.html
  104. +2 −2 public/blog/getting-started-with-selenium-ide-part-2/index.html
  105. +2 −2 public/blog/great-unit-tests-review-by-roy-osherove/index.html
  106. +2 −2 public/blog/hello-world-from-derek/index.html
  107. +3 −3 public/blog/help-needed-a-backbone-blog/index.html
  108. +2 −2 public/blog/how-i-am-becoming-a-better-developer-in-6-months/index.html
  109. +2 −2 ...blog/how-to-remove-the-need-to-check-if-an-item-is-present-in-the-list-of-items-on-a-listcontrol/index.html
  110. +2 −2 public/blog/how-to-test-if-someone-subscribed-to-an-event-with-rhino-mocks/index.html
  111. +2 −2 public/blog/i-am-now-available-to-hire-!/index.html
  112. +2 −2 public/blog/i-enjoy-keeping-a-blog-but/index.html
  113. +2 −2 public/blog/i-need-advices-to-create-my-home-office/index.html
  114. +2 −2 public/blog/i-was-a-gamer/index.html
  115. +2 −2 public/blog/i-will-use-windows-live-writer/index.html
  116. +2 −2 public/blog/iterate-over-each-line-of-a-string-in-c-sharp/index.html
  117. +2 −2 public/blog/jquery-proxy/index.html
  118. +3 −3 public/blog/large-scale-javascript-application-architecture-by-addy-osmani/index.html
  119. +2 −2 public/blog/law-of-demeter/index.html
  120. +3 −3 public/blog/learning-rails-assert-valid-keys/index.html
  121. +2 −2 public/blog/learning-rails-sanitizehelper/index.html
  122. +2 −2 public/blog/learning-rails-using-jquery-instead-of-prototype/index.html
  123. +2 −2 public/blog/leechblock-and-invisibility-cloak/index.html
  124. +2 −2 public/blog/linode-is-my-new-vps/index.html
  125. +2 −2 public/blog/mastering-backbone-day-0/index.html
  126. +2 −2 public/blog/mastering-backbone-day-1-impressions/index.html
  127. +2 −2 public/blog/method-decorators-in-ruby/index.html
  128. +2 −2 public/blog/mind-shift/index.html
  129. +2 −2 public/blog/mix10/index.html
  130. +2 −2 public/blog/mocking-the-httpcontext-in-aspnet-mvc/index.html
  131. +2 −2 public/blog/moving-to-an-agile-team/index.html
  132. +2 −2 public/blog/my-clojure-tutorial-failure/index.html
  133. +2 −2 public/blog/my-experience-as-a-remote-worker/index.html
  134. +2 −2 public/blog/my-first-continuous-integration-server-is-complete-!/index.html
  135. +2 −2 public/blog/my-opinion-about-duct-tape-programmer/index.html
  136. +2 −2 public/blog/my-solution-node-does-not-appear-in-visual-studio-20052008/index.html
  137. +2 −2 public/blog/my-starting-gemfile/index.html
  138. +2 −2 public/blog/my-teamcity-testimonial/index.html
  139. +2 −2 public/blog/nant-086-beta-1-is-out-!!/index.html
  140. +2 −2 public/blog/ndepend-small-review/index.html
  141. +2 −2 public/blog/new-code-drop-to-the-aspnet-project-on-codeplex/index.html
  142. +2 −2 public/blog/nhibernate-saveorupdate-does-nothing/index.html
  143. +2 −2 public/blog/nightmare-platform/index.html
  144. +2 −2 public/blog/no-such-file-to-load-cucumberrailsactive_record-(loaderror)/index.html
  145. +2 −2 public/blog/ohhh-thats-why-i-should-make-a-testrepository/index.html
  146. +171 −139 public/blog/page/10/index.html
  147. +215 −109 public/blog/page/11/index.html
  148. +247 −255 public/blog/page/12/index.html
  149. +132 −269 public/blog/page/13/index.html
  150. +229 −132 public/blog/page/14/index.html
  151. +411 −270 public/blog/page/15/index.html
  152. +158 −359 public/blog/page/16/index.html
  153. +117 −169 public/blog/page/17/index.html
  154. +220 −113 public/blog/page/18/index.html
  155. +3 −224 public/blog/page/19/index.html
  156. +296 −550 public/blog/page/2/index.html
  157. +192 −326 public/blog/page/3/index.html
  158. +146 −166 public/blog/page/4/index.html
  159. +102 −149 public/blog/page/5/index.html
  160. +323 −142 public/blog/page/6/index.html
  161. +158 −275 public/blog/page/7/index.html
  162. +160 −146 public/blog/page/8/index.html
  163. +139 −220 public/blog/page/9/index.html
  164. +2 −2 public/blog/parsefloat(e28098e28099)-3d3d-nan/index.html
  165. +2 −2 public/blog/photosynth-and-seadragon/index.html
  166. +2 −2 public/blog/pragmatic-thinking-learning-book-review/index.html
  167. +2 −2 public/blog/problem-downloading-files-using-geckofx-and-xulrunner/index.html
  168. +2 −2 public/blog/processgetprocesses-common-errors/index.html
  169. +2 −2 public/blog/quick-start-with-aspnet-mvc-interim-source-code/index.html
  170. +2 −2 public/blog/rails-assets-pipeline-and-missing-assets/index.html
  171. +2 −2 public/blog/readonlycollection3ct3e/index.html
  172. +2 −2 public/blog/reality-of-type-sharing-in-wcf/index.html
  173. +2 −2 public/blog/refreshing-my-memory-delegates-in-c/index.html
  174. +2 −2 public/blog/reponsive-and-mobile-friendly-design/index.html
  175. +2 −2 public/blog/rerun-all-guards/index.html
  176. +2 −2 public/blog/resetting-teamcity-password/index.html
  177. +2 −2 public/blog/responseredirect-in-a-page-callback/index.html
  178. +2 −2 public/blog/revisited-going-back-to-aspnet-webforms-and-a-lot-of-pain-with-the-checkboxlist/index.html
  179. +2 −2 public/blog/rise-of-ruby/index.html
  180. +2 −2 public/blog/ruby-and-nested-classes/index.html
  181. +2 −2 public/blog/running-a-wcf-service-in-iis-7/index.html
  182. +2 −2 public/blog/scott-hanselmans-2007-ultimate-developer-and-power-users-tool-list/index.html
  183. +2 −2 public/blog/screencast-and-my-opinion-about-typemock/index.html
  184. +2 −2 public/blog/screencast-goodness-monorail-extjs-and-net-35/index.html
  185. +2 −2 public/blog/scummvm/index.html
  186. +2 −2 public/blog/select-a-number-of-rows-based-on-a-parameter-using-t-sql/index.html
  187. +2 −2 public/blog/seo-tips-i-have-used-to-improve-my-search-engine-visibility/index.html
  188. +2 −2 public/blog/set-a-value-on-an-textbox-with-his-textmode-set-to-password/index.html
  189. +2 −2 public/blog/setting-comvisible/index.html
  190. +2 −2 public/blog/setting-expectations-on-properties-with-rhino-mocks/index.html
  191. +2 −2 public/blog/setting-up-a-basic-continuous-integration-server-with-cruisecontrolnet/index.html
  192. +2 −2 public/blog/setting-up-a-basic-continuous-integration-server-with-teamcity/index.html
  193. +2 −2 public/blog/setting-up-a-subversion-server-(using-svnserve)/index.html
  194. +2 −2 public/blog/setting-up-a-the-build-file-for-a-new-application/index.html
  195. +2 −2 public/blog/setting-up-cruisecontrolnet-screencast/index.html
  196. +2 −2 public/blog/setting_up_a_basic_continuous_integration_server_with_teamcity/index.html
  197. +2 −2 public/blog/should-i-learn-eiffel/index.html
  198. +2 −2 public/blog/skyrim-a-really-awesome-video/index.html
  199. +2 −2 public/blog/sourcesafe-on-vpn/index.html
  200. +2 −2 public/blog/sql-server-compact-is-not-intended-for-aspnet-development/index.html
  201. +2 −2 public/blog/sql-server-error-failed-to-retrieve-text-for-this-error-reason-1815/index.html
  202. +2 −2 public/blog/startup-camp-quebec/index.html
  203. +2 −2 public/blog/steve-jobs-and-his-thoughts-on-flash/index.html
  204. +2 −2 public/blog/strong-naming-an-assembly-in-net/index.html
  205. +2 −2 public/blog/studying-for-70-310/index.html
  206. +2 −2 public/blog/subtle-deadly-bug/index.html
  207. +2 −2 public/blog/sys-is-undefined/index.html
  208. +2 −2 public/blog/systemdatalinqchangeconflictexception-row-not-found-or-changed/index.html
  209. +2 −2 public/blog/testing-controllers-in-aspnet-mvc-aka-actionresult/index.html
  210. +2 −2 public/blog/thank-you!/index.html
  211. +2 −2 public/blog/the-importance-of-database-versioning/index.html
  212. +2 −2 ...ite-and-the-file-dotnetfx35setupexe-in-item-microsoftnetframework35sp1-cannot-be-located-on-disk/index.html
  213. +2 −2 public/blog/the-last-lecture-by-randy-pausch/index.html
  214. +2 −2 public/blog/the-problem-with-constant-and-versioning/index.html
  215. +2 −2 public/blog/the-surprising-science-of-motivation-by-dan-pink/index.html
  216. +2 −2 public/blog/thoughts-about-google-chrome/index.html
  217. +2 −2 public/blog/tight-deadlines/index.html
  218. +2 −2 public/blog/top-5-most-influential-peoples-on-my-career/index.html
  219. +2 −2 public/blog/top-5-reasons-not-to-use-resharper/index.html
  220. +2 −2 public/blog/top-5-resharpers-shortcuts-you-need-to-know-after-some-time/index.html
  221. +2 −2 public/blog/top-5-resharpers-shortcuts-you-need-to-know-at-first/index.html
  222. +2 −2 public/blog/top-5-shortcuts-you-need-to-know-to-be-a-resharper-padawan/index.html
  223. +2 −2 public/blog/tower-defense-games-collection/index.html
  224. +2 −2 public/blog/unit-of-work/index.html
  225. +2 −2 public/blog/unit-testing-linqtosql-and-createdatabase/index.html
  226. +2 −2 public/blog/var-keyword-(or-implicitly-typed-local-variables)/index.html
  227. +2 −2 public/blog/vim-30-days-day-4/index.html
  228. +2 −2 public/blog/visual-studio-20052008-adding-projects-to-your-solution/index.html
  229. +2 −2 public/blog/visual-studio-20052008-reference-path/index.html
  230. +2 −2 public/blog/visual-studio-20052008-starting-a-solution-correctly/index.html
  231. +2 −2 public/blog/visual-studio-2008-wcf-templates/index.html
  232. +2 −2 public/blog/visual_studio_20052008_adding_projects_to_your_solution/index.html
  233. +2 −2 public/blog/vivim-30-days-conclusion/index.html
  234. +2 −2 public/blog/vivim-30-days-day-1/index.html
  235. +2 −2 public/blog/vivim-30-days-day-2/index.html
  236. +2 −2 public/blog/vivim-30-days-day-3/index.html
  237. +2 −2 public/blog/vivim-30-days-day-5/index.html
  238. +2 −2 public/blog/vivim-30-days-day-6/index.html
  239. +2 −2 public/blog/webconfig-to-appconfig-and-resharpers-testrunner/index.html
  240. +2 −2 public/blog/what-can-we-do-with-array-dot-inject/index.html
  241. +2 −2 public/blog/where-did-my-strongly-typed-action-link-has-gone-in-aspnet-mvc-beta/index.html
  242. +2 −2 public/blog/why-is-my-object-losing-all-of-its-values-when-sent-through-wcf/index.html
  243. +2 −2 public/blog/why-unit-testing/index.html
  244. +2 −2 public/blog/wikidotcom-personal-knowledge-base/index.html
  245. +2 −2 public/blog/windows-forms-owner-and-owned-forms/index.html
  246. +56 −38 public/index.html
  247. +2 −2 public/new-page/index.html
  248. +2 −2 public/resume/index.html
View
10 deploy.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+bundle exec rake generate
+echo "Adding files"
+git add -A
+echo "Committing"
+git commit -am "new post"
+echo "Pushing to github"
+git push github
+echo "Pushing to Heroku
+git push heroku
View
742 public/atom.xml
@@ -4,7 +4,7 @@
<title><![CDATA[Sebastien Lachance]]></title>
<link href="http://sebastienlachance.com/atom.xml" rel="self"/>
<link href="http://sebastienlachance.com/"/>
- <updated>2012-05-10T09:39:35-04:00</updated>
+ <updated>2012-05-10T10:04:37-04:00</updated>
<id>http://sebastienlachance.com/</id>
<author>
<name><![CDATA[Sebastien Lachance]]></name>
@@ -240,15 +240,6 @@ Turns out it&#8217;s in Rails since version 3.0 (more specifically in active_sup
</entry>
<entry>
- <title type="html"><![CDATA[Backbone and page transition]]></title>
- <link href="http://sebastienlachance.com/blog/backbone-and-page-transition/"/>
- <updated>2012-04-27T17:02:00-04:00</updated>
- <id>http://sebastienlachance.com/blog/backbone-and-page-transition</id>
- <content type="html"><![CDATA[
-]]></content>
- </entry>
-
- <entry>
<title type="html"><![CDATA[Large-scale Javascript Application Architecture by Addy Osmani]]></title>
<link href="http://sebastienlachance.com/blog/large-scale-javascript-application-architecture-by-addy-osmani/"/>
<updated>2012-04-27T08:18:00-04:00</updated>
@@ -492,31 +483,6 @@ You can see it as (((10 + 1) + 2) + 3).
</entry>
<entry>
- <title type="html"><![CDATA[Backbone - Fetching a single model]]></title>
- <link href="http://sebastienlachance.com/blog/backbone-fetching-a-single-model/"/>
- <updated>2012-03-19T07:50:00-04:00</updated>
- <id>http://sebastienlachance.com/blog/backbone-fetching-a-single-model</id>
- <content type="html"><![CDATA[<p>I&#8217;m working on a Backbone driven blog engine (<a href="https://github.com/sebastienlachance/backbone-rails-blog]">Backbone-rails-blog</a>) and had some serious issues with a single functionnality. Retrieving a blog post and displaying it.</p>
-
-<p>First, I&#8217;m still learning Backbone, so don&#8217;t be so harsh on this basic problem.</p>
-
-<p>To retrieve a single model, on your model, you define the url property like this</p>
-
-<figure class='code'><figcaption><span>Post Model - post.js </span></figcaption>
- <div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
-<span class='line-number'>2</span>
-<span class='line-number'>3</span>
-</pre></td><td class='code'><pre><code class='js'><span class='line'><span class="nx">url</span><span class="o">:</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
-</span><span class='line'> <span class="k">return</span> <span class="s2">&quot;/posts/&quot;</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s1">&#39;permalink&#39;</span><span class="p">);</span>
-</span><span class='line'><span class="p">}</span>
-</span></code></pre></td></tr></table></div></figure>
-
-
-
-]]></content>
- </entry>
-
- <entry>
<title type="html"><![CDATA[Filling a select from an array on javascript object]]></title>
<link href="http://sebastienlachance.com/blog/filling-a-select-from-an-array-on-javascript-object/"/>
<updated>2012-03-13T12:11:00-04:00</updated>
@@ -529,569 +495,367 @@ You can see it as (((10 + 1) + 2) + 3).
</entry>
<entry>
- <title type="html"><![CDATA[Backbone - Going through the todo.js example]]></title>
- <link href="http://sebastienlachance.com/blog/backbone-going-through-the-todo-dot-js-example/"/>
- <updated>2012-03-02T08:52:00-05:00</updated>
- <id>http://sebastienlachance.com/blog/backbone-going-through-the-todo-dot-js-example</id>
- <content type="html"><![CDATA[<p>Over the past days, I have been struggling a lot to understand Backbone and how to apply it in other situations than a todo list.</p>
-
-<p>I read and reread and even rewrite the Todo demo application for Backbone. But, If I wanted to redo it, I was lost. No idea where to go after models are created.</p>
-
-<p>So here it is, I wanted to mimic the way I would recreate the way this application would have been created from scratch by a Backbone apprentice like me, one functionnality at a time.</p>
-
-<p>The demo application is using a local storage mechanism, but I provide the way it would have been if it was a rails application.</p>
-
-<p>rails new backbone_todo
-rails g scaffold todo text:string done:boolean</p>
-
-<p>Go to Backbone doc site, place backbone.js and underscore.js in app/assets/javascripts</p>
-
-<p>Open application.js and make the following modifications</p>
-
-<p> //= require underscore
- //= require backbone
- //= require todo</p>
-
-<p>Remove todo.js.coffee if you will not use CoffeeScript.</p>
-
-<p>Open app/views/todos/index.html and put the following html:</p>
-
-<p> <div id="todoapp"></p>
-
-<pre><code> &lt;div class="title"&gt;
- &lt;h1&gt;Todos&lt;/h1&gt;
- &lt;/div&gt;
-
- &lt;div class="content"&gt;
-
- &lt;div id="create-todo"&gt;
- &lt;input id="new-todo" placeholder="What needs to be done?" type="text" /&gt;
- &lt;span class="ui-tooltip-top" style="display:none;"&gt;Press Enter to save this task&lt;/span&gt;
- &lt;/div&gt;
-
- &lt;div id="todos"&gt;
- &lt;ul id="todo-list"&gt;&lt;/ul&gt;
- &lt;/div&gt;
-
- &lt;div id="todo-stats"&gt;&lt;/div&gt;
-
- &lt;/div&gt;
-
-&lt;/div&gt;
-
-&lt;ul id="instructions"&gt;
- &lt;li&gt;Double-click to edit a todo.&lt;/li&gt;
- &lt;li&gt;&lt;a href="http://documentcloud.github.com/backbone/docs/todos.html"&gt;View the annotated source.&lt;/a&gt;&lt;/li&gt;
-&lt;/ul&gt;
-
-&lt;div id="credits"&gt;
- Created by
- &lt;br /&gt;
- &lt;a href="http://jgn.me/"&gt;J&amp;eacute;r&amp;ocirc;me Gravel-Niquet&lt;/a&gt;
-&lt;/div&gt;
-
-&lt;!-- Templates --&gt;
-
-&lt;script type="text/template" id="item-template"&gt;
- &lt;div class="todo {{= done ? 'done' : '' }}"&gt;
- &lt;div class="display"&gt;
- &lt;input class="check" type="checkbox" {{= done ? 'checked="checked"' : '' }} /&gt;
- &lt;div class="todo-text"&gt;&lt;/div&gt;
- &lt;span class="todo-destroy"&gt;&lt;/span&gt;
- &lt;/div&gt;
- &lt;div class="edit"&gt;
- &lt;input class="todo-input" type="text" value="" /&gt;
- &lt;/div&gt;
- &lt;/div&gt;
-&lt;/script&gt;
-
-&lt;script type="text/template" id="stats-template"&gt;
- {{ if (total) { }}
- &lt;span class="todo-count"&gt;
- &lt;span class="number"&gt;{{= remaining }}&lt;/span&gt;
- &lt;span class="word"&gt;{{= remaining == 1 ? 'item' : 'items' }}&lt;/span&gt; left.
- &lt;/span&gt;
- {{ } }}
- {{ if (done) { }}
- &lt;span class="todo-clear"&gt;
- &lt;a href="#"&gt;
- Clear &lt;span class="number-done"&gt;{{= done }}&lt;/span&gt;
- completed &lt;span class="word-done"&gt;{{= done == 1 ? 'item' : 'items' }}&lt;/span&gt;
- &lt;/a&gt;
- &lt;/span&gt;
- {{ } }}
-&lt;/script&gt;
-</code></pre>
-
-<p>Now let&#8217;s get to the core of backbone.</p>
-
-<ol>
-<li>Create a todo</li>
-</ol>
-
-
-<p>In document ready</p>
-
-<p> $(function() {</p>
-
-<pre><code>//Needed if you use erb with rails
-_.templateSettings = {
- interpolate: /\{\{\=(.+?)\}\}/g,
- evaluate: /\{\{(.+?)\}\}/g
-};
-
-
-//code here
-</code></pre>
-
-<p> });</p>
-
-<p>Create a view that represent the application.</p>
-
-<p> window.AppView = Backbone.View.extend({});</p>
-
-<p>Then we want to react when the user press enter after entering a todo.</p>
-
-<p> window.AppView = Backbone.View.extend({</p>
-
-<pre><code>el: '#todoapp',
-
-events: function() {
- "keypress #new-todo" : "createOnEnter"
-},
-
-createOnEnter: function() {
-
-}
-</code></pre>
-
-<p> });</p>
-
-<p>What we have just done is to create a view that will listen to the keypress event on the element with the id new-todo, and call the function createOnEnter when pressing a key.</p>
-
-<p>The el property (element) will tell the view to which element in the DOM it is binded to. In that case, without the</p>
-
-<p>Creating the elemnt</p>
-
-<p>Add the following method that will be called when creating the view and setting the input property to the correct element.</p>
-
-<p>In window.AppView:</p>
-
-<p>initialize: function() {
- this.input = this.$(&#8216;#new-todo);
-}</p>
-
-<p>And then we create the Todos (again in window.AppView)</p>
-
-<p> createOnEnter : function(e) {</p>
-
-<pre><code>var text = this.input.val();
-if (!text || e.keyCode != 13) return;
-Todos.create({text: text});
-this.input.val();
-</code></pre>
-
-<p> }</p>
-
-<p>Running the code now and trying to enter an item will result in : Uncaught ReferenceError: Todos is not defined</p>
-
-<p>It&#8217;s because we are calling the create method on something that does not yet exists.</p>
-
-<p>Todos is actually a collection of Todo model.</p>
-
-<p>Let&#8217;s define them both in the document ready function</p>
-
-<p> window.Todo = Backbone.Model.extend({});</p>
-
-<p>There we have created the Todo model.</p>
-
-<p> window.TodoList = Backbone.Collection.extend({</p>
-
-<pre><code>model: Todo
-</code></pre>
-
-<p> });</p>
-
-<p> window.Todos = new TodoList();</p>
-
-<p>And now we have create the collection that will hold the Todo models. We started by extending Backbone.Collection and provide Todo as the model of the collection.</p>
-
-<p>Let&#8217;s run the example again:</p>
-
-<p>Now we have : Uncaught Error: A &#8220;url&#8221; property or function must be specified</p>
+ <title type="html"><![CDATA[Converting a BlogEngine.Net blog to Octopress]]></title>
+ <link href="http://sebastienlachance.com/blog/converting-a-blogengine-dot-net-blog-to-octopress/"/>
+ <updated>2012-02-21T12:52:00-05:00</updated>
+ <id>http://sebastienlachance.com/blog/converting-a-blogengine-dot-net-blog-to-octopress</id>
+ <content type="html"><![CDATA[<p>Some months ago, I moved my BlogEngine.net blog (hosted on GoDaddy) to Octopress hosted on Heroku. I needed a tool to migrate all my posts and found nothing that could apply to my case (I&#8217;m pretty sure there is something out there, but I didn&#8217;t look very far and wanted to code the tool myself anyway).</p>
-<p>Ahh, let&#8217;s fix this easily.</p>
+<p>Octopress blog post format look like this:</p>
-<p> window.TodoList = Backbone.Collection.extend({</p>
+<pre><code>---
+layout: post
+title: "Setting ComVisible"
+date: 2005-01-19 14:46:00
+comments: true
+categories:
+---
-<pre><code>model: Todo,
-url: '/todos'
+** This is my post using Markdown **
</code></pre>
-<p> });</p>
-
-<p>Now it would be great to display the added item in the list.</p>
-
-<p>For this we need to react to the add, reset and all event</p>
-
-<p>In window.AppView the initialize function change for:</p>
-
-<p> initialize: function() {</p>
-
-<pre><code>this.input = this.$('#new-todo');
+<p>My BlogEngine.Net was configured to use xml files to store posts. Which look like this:</p>
-Todos.bind('add', this.addOne, this);
-Todos.bind('reset', this.addAll, this);
-Todos.bind('all', this.render, this);
+<pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
+&lt;post&gt;
+ &lt;author&gt;SebastienLachance&lt;/author&gt;
+ &lt;title&gt;Building a new app - Introduction&lt;/title&gt;
+ &lt;description&gt;The introduction&lt;/description&gt;
+ &lt;content&gt;This is ...
</code></pre>
-<p> }</p>
-
-<p>In details :</p>
-
-<p>Todos.bind : It is currently deprecated in favor of &#8220;on&#8221; to follow the jQuery direction but still supported for backward compatibility:</p>
-
-<p>{% blockquote
- onobject.on(event, callback, [context]) Alias: bind
-%}</p>
-
-<p>The first argument is the event we want to listen, the second is the callback method to be called and the third optional parameters is the context.</p>
-
-<p>We listen to three events:</p>
-
-<ol>
-<li>add : Is called when a model is added to the collection</li>
-<li>reset : When the whole collection or more than one model is changed (like reloading the collection)</li>
-<li>all : Any event</li>
-</ol>
-
+<p>At first, I wanted to move each post individually whenever I could. After a week and pretty much nothing converted, I created a little .Net tool to make the conversion/migration much easier.</p>
-<p>Reacting to the add event on collection:</p>
+<p>It&#8217;s a pretty basic windows form application that takes a path and output a bundle of simili-markdown (because the original posts are html, but, since markdown accept html, it&#8217;s fine) files that are compatible with the Octopress format.</p>
-<p>In window.AppView</p>
+<p>It&#8217;s also generating a <strong>redirection.rb</strong> file that contains necessary code to be used by rack-rewrite to make necessary 301 redirection. It can be useful if you don&#8217;t want to write it all manually.</p>
-<p> addOne: function(todo) {</p>
+<pre><code>use Rack::Rewrite do
-<pre><code>var view = new TodoView({model: todo});
-$('#todo-list').append(view.render().el);
+ r301 %r{^/post/The-surprising-science-of-motivation-by-Dan-Pink.aspx?$}, '/blog/the-surprising-science-of-motivation-by-dan-pink'
+ r301 %r{^/post/Building-a-new-application-Introduction.aspx?$}, '/blog/building-a-new-application-introduction'
+ r301 %r{^/post/tight-deadlines.aspx?$}, '/blog/tight-deadlines'
+ r301 %r{^/post/no-such-file-to-load-cucumberrailsactive_record-(LoadError).aspx?$}, '/blog/no-such-file-to-load-cucumberrailsactive_record-(loaderror)'
+ r301 %r{^/post/Buying-games-on-Steam.aspx?$}, '/blog/buying-games-on-steam'
+ r301 %r{^/post/AlternativeToNet-review.aspx?$}, '/blog/alternativetonet-review'
+ r301 %r{^/post/Excellent-post-by-Uncle-Bob.aspx?$}, '/blog/excellent-post-by-uncle-bob'
</code></pre>
-<p> },</p>
-
-<p> addAll: function() {</p>
-
-<pre><code>Todos.each(this.addOne);
-</code></pre>
+<p>You can grab the source here : <a href="https://github.com/sebastienlachance/BlogEngineToOctopress">BlogEngineToOctopres</a></p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[My starting Gemfile]]></title>
+ <link href="http://sebastienlachance.com/blog/my-starting-gemfile/"/>
+ <updated>2012-02-17T15:08:00-05:00</updated>
+ <id>http://sebastienlachance.com/blog/my-starting-gemfile</id>
+ <content type="html"><![CDATA[<p>This is how my Gemfile looks like at the moment. Continuous feedback with Guard and metrics to keep track on defects and best practices not used.</p>
-<p> }</p>
+<div><script src='https://gist.github.com/1855201.js?file='></script>
+<noscript><pre><code>source 'https://rubygems.org'
-<p>So the addOne callback is going to create a TodoView and add it to #todo-list.</p>
+gem 'rails', '3.2.1'
+gem 'pg'
+gem 'omniauth-twitter'
+gem 'omniauth-facebook'
+gem 'omniauth-google-oauth2'
+gem 'omniauth-identity'
-<p>The TodoView:</p>
+group :assets do
+ gem 'sass-rails', '~&gt; 3.2.3'
+ gem 'coffee-rails', '~&gt; 3.2.1'
+ gem 'uglifier', '&gt;= 1.0.3'
+end
-<p> window.TodoView = Backbone.View.extend({</p>
+gem 'jquery-rails'
+gem 'skeleton-rails'
+gem 'rails-backbone'
+gem 'jasminerice'
-<pre><code>tagName: 'li',
+gem 'rspec-rails', :group =&gt; [:development, :test]
-template: _.template($('#item-template').html()),
+group :development do
+ gem 'heroku'
+ gem 'guard'
+ gem 'guard-rspec'
+ gem 'guard-jasmine'
+ gem 'growl'
+ gem 'metrical'
+ gem 'fattr' # for Metric_fu
+ gem 'arrayfields' # for Metric_fu
+ gem 'map' # for Metric_fu
+ gem 'annotate', :git =&gt; 'git://github.com/ctran/annotate_models.git'
+end
-render: function() {
- $(this.el).html(this.template(this.model.toJSON()));
- this.setText();
- return this;
-},
+group :test do
+ gem 'database_cleaner', :group =&gt; :test
+ gem 'factory_girl_rails', :group =&gt; :test
+end
-setText: function() {
- var text = this.model.get('text');
- this.$('.todo-text').text(text);
- this.input = this.$('.todo-input');
- this.input.val(text);
-}
-</code></pre>
+gem 'bcrypt-ruby', '~&gt; 3.0.0'</code></pre></noscript></div>
-<p> });</p>
-<p>First, we extend Backbone.View to create a view. The tagName represent the top element that we will add the Todo content to. In this case it&#8217;s a list element so we use an li tag. Second, the template. Remember in our html, we were having a &lt;script type=&#8221;text/template&#8221;&gt; tag. This is actually a template that we will fill using underscore and our model converted to JSON.</p>
-<p>And finally we have the render method, that will use the rendered template and add it to our li element. The model property is automatically assigned when creating the view. The setText method, add the todo text to the display element and the edit element, (more on this later);</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Startup Camp Quebec]]></title>
+ <link href="http://sebastienlachance.com/blog/startup-camp-quebec/"/>
+ <updated>2012-02-13T12:11:00-05:00</updated>
+ <id>http://sebastienlachance.com/blog/startup-camp-quebec</id>
+ <content type="html"><![CDATA[<p><img class="left" src="http://sebastienlachance.com/images/startupcampquebec.jpg" title="Startup Camp Québec" ></p>
-<p>Let&#8217;s run it and see for ourselves how it&#8217;s working so far.</p>
+<p>Jeudi dernier, avait lieu l&#8217;événement <a href="http://www.startupcampquebec.com">Startup Camp Québec</a>.</p>
-<p>ohoh: Uncaught ReferenceError: done is not defined</p>
+<p>Je ne suis pas un habitué de ces événements même si j&#8217;ai <a href="http://www.guidedescommercesdebeauce.com">ma propre compagnie</a> et ait participé à quelques coktails et diners aux homards (j&#8217;aime pas le homard). C&#8217;était quand un monde nouveau avec de nouvelles personnes.</p>
-<p>We don&#8217;t have any done property on our model.</p>
+<p>Il y avait 8 startups qui présentaient leur produits. J&#8217;ai bien aimé les présentations, et j&#8217;ai beaucoup accroché sur quelques projets. Particulièrement le projet Trapèze École de <a href="http://mx4.yolasite.com/">MX4</a>. Ils ont créer une manière de gérer les horaires dans les écoles, et ca, c&#8217;est ce que j&#8217;appelle trouver des solutions à un problème.</p>
-<p>Open up the Todo model and add some defaults :</p>
+<p>Mais le grand gagnant de cette édition est <a href="http://theriansaga.fatecraft.com/">FateCraft</a>, qui développe des jeux sociaux.</p>
-<p>window.Todo = Backbone.Model.extend({
- defaults: function() {</p>
+<p>Je n&#8217;ai malheureusement pu rester jusqu&#8217;à la fin et voir la remise des prix. Mais je souhaite quand même bonne chance à toutes ces jeunes entreprises et puissent-elles continuer malgré toutes les embuches qui peuvent se présenter devant elles.</p>
+]]></content>
+ </entry>
+
+ <entry>
+ <title type="html"><![CDATA[Mastering Backbone - Day 1 impressions and basic concepts]]></title>
+ <link href="http://sebastienlachance.com/blog/mastering-backbone-day-1-impressions/"/>
+ <updated>2012-02-03T10:24:00-05:00</updated>
+ <id>http://sebastienlachance.com/blog/mastering-backbone-day-1-impressions</id>
+ <content type="html"><![CDATA[<p><img src="http://sebastienlachance.com/images/backbone.png" title="backbone.js" ></p>
-<pre><code>return {
- done: false
-}
-</code></pre>
+<h2>Basics</h2>
-<p> }
-});</p>
+<p>Previous experience:</p>
-<p>Everythings run fine now.</p>
+<p>I have no real hands-on experience. Only watched some screencasts.</p>
-<p>Let&#8217;s handle the done checkbox.</p>
+<p>I decided to create a little Todo app with Rails to make sure I understand the basics concepts correctly.</p>
-<p>Add an event to our TodoView to react on the click on checkbox.</p>
+<pre><code>gem 'rails-backbone'
+gem 'jasminerice'
-<p> events: {</p>
+bundle install
-<pre><code>"click .check": "toggleDone"
+rails g backbone:install
</code></pre>
-<p> },</p>
+<p>In the spec/javascripts/spec.js.coffee, add the following:</p>
-<p> toggleDone: function() {</p>
-
-<pre><code>this.model.toggle();
+<pre><code>#= require jquery
+#= require underscore
+#= require backbone
+#= require backbone_rails_sync
+#= require backbone_datalink
</code></pre>
-<p> },</p>
+<h2>Creating a model</h2>
-<p> initialize: function() {</p>
+<p>I created a todo.js file in the app/assets/javascript/backbone/models directory.</p>
-<pre><code>this.model.bind('change', this.render, this);
+<pre><code>window.Todo = Backbone.Model.extend({});
</code></pre>
-<p> }</p>
-
-<p>And in our Todo model:</p>
+<p>Pretty straightforward.</p>
-<p> toggle: function() {</p>
+<h2>Creating a collection</h2>
-<pre><code>this.save({done: !this.get("done")});
+<pre><code>window.TodoList = Backbone.Collection.extend({
+ model: Todo
+});
</code></pre>
-<p> }</p>
-
-<p>Since we have added code to react to the change event with the render callback, the view will be automatically be rerenderd with the new content. And the template show correctly the done item.</p>
-
-<p>Run it. Warning. : With Rails, you will get Can&#8217;t mass-assign protected attributes: id</p>
-
-<p>One thing that would be great is to actually reload saved todo when we refresh the page.</p>
-
-<p>Easy:</p>
+<h2>Testing to ensure everything is fine</h2>
-<p>In the initialize function of the AppView ask the Todo collection to fetch itself.</p>
+<p>To use <strong>jasminerice</strong>, start the rails server.</p>
-<p>window.AppView = Backbone.View.extend({</p>
-
-<p> //code</p>
-
-<p> initialize: function() {</p>
-
-<pre><code>//more code
-
-Todos.fetch();
+<pre><code>rails s
</code></pre>
-<p> }</p>
-
-<p> //code</p>
-
-<p>});</p>
-
-<p>Deleting</p>
-
-<p>Add an event to detect the delete button click.</p>
-
-<p>In window.AppView</p>
+<p>Go to localhost:3000/jasmine.</p>
-<p>window.TodoView = Backbone.View.extend({</p>
+<div><script src='https://gist.github.com/1751477.js?file='></script>
+<noscript><pre><code>describe(&quot;Todo Model&quot;, function() {
+ it(&quot;can be instantiated&quot;, function() {
+ var todo = new Todo();
+ expect(todo).toBeTruthy();
+ });
-<p> //code</p>
+ it(&quot;has the description property&quot;, function() {
+ var todo = new Todo();
+ todo.set({ description: &quot;this is a description&quot;});
+ expect(todo.get('description')).toEqual(&quot;this is a description&quot;);
+ });
-<p> events: {</p>
+ it(&quot;has the done property&quot;,function() {
+ var todo = new Todo();
+ todo.set({ done: true});
+ expect(todo.get('done')).toBeTruthy();
+ })
+});
-<pre><code>//code
-"click span.todo-destroy", "clear"
-</code></pre>
+describe(&quot;Todo List&quot;, function() {
+ it(&quot;starts out empty&quot;, function() {
+ var todoList = new TodoList();
+ var todo = new Todo();
+ expect(todoList.length).toEqual(0);
+ });
+ it(&quot;add elements as expected&quot;, function() {
+ var todoList = new TodoList();
+ var todo = new Todo();
+ todoList.add(todo);
+ expect(todoList.length).toEqual(1);
+ });
+ it(&quot;should be able to retrieve elements by index&quot;, function() {
+ var todoList = new TodoList();
+ var todo = new Todo();
+ todoList.add(todo);
+ var retrievedTodo = todoList.at(0);
+ expect(retrievedTodo).toBe(todo);
+ });
+ it(&quot;should be able to remove elements&quot;, function() {
+ var todoList = new TodoList();
+ var todo = new Todo();
+ todoList.add(todo);
+ todoList.remove(todo);
+ expect(todoList.length).toEqual(0);
+ });
-<p> },</p>
+});</code></pre></noscript></div>
-<p> //code</p>
-<p> intialize: function() {</p>
+<h2>Creating a view</h2>
-<pre><code>//code
+<p>To define a view, you call the extend method on Backbone.View.</p>
-this.model.bind('destroy', this.remove, this);
+<pre><code>window.TodoList = Backbone.View.extend({});
</code></pre>
-<p> },</p>
-
-<p> clear: function() {</p>
+<p>A view is used ot render a model so we need to override the <strong>render</strong> method.</p>
-<pre><code>this.model.destroy();
+<pre><code>window.TodoList = Backbone.View.extend({
+ render: function() {
+ //the interesting part happens here.
+ }
+});
</code></pre>
-<p> },</p>
-
-<p> remove: function() {</p>
+<p>The view is represented by an html element, I believe it&#8217;s a div you don&#8217;t specify it explicitely like this:</p>
-<pre><code>$(this.el).remove();
+<pre><code>window.TodoList = Backbone.View.extend({
+ tagName: "section" //use a &lt;section&gt; tag
+});
</code></pre>
-<p> }</p>
-
-<p>});</p>
-
-<p>Editing</p>
-
-<p>window.TodoView = Backbone.View.extend({</p>
-
-<p> //code</p>
-
-<p> events {</p>
-
-<pre><code>//code
+<p>And a test to make sure it behave like I want:</p>
-"dblclick div.todo-text" : "edit",
-"keypress .todo-input" : "updateOnEnter"
+<pre><code>it("should be a section tag", function() {
+ var view = new TodoListView();
+ expect(view.el.nodeName).toEqual("SECTION");
+});
</code></pre>
-<p> },</p>
+<p><strong>el</strong> represent the current view element.</p>
-<p> //code</p>
+<p>In the render method, this is where you build the view markup, by appending one or more elements to the <strong>el</strong>.</p>
-<p> edit: function() {</p>
-
-<pre><code>$(this.el).addClass("editing");
-this.input.focus();
-</code></pre>
-
-<p> },</p>
+<pre><code>render: function() {
+ $(el).html('&lt;h2&gt;Todos&lt;/h2&gt;');
+}
-<p> updateOnEnter: function(e) {</p>
+//test
-<pre><code>if (e.keyCode == 13) this.close();
+it("should render an h2 title', function() {
+ var view = new TodoListView();
+ view.render();
+ expect(view.el.innerHTML).toEqual('&lt;h2&gt;Todos&lt;/h2&gt;');
+});
</code></pre>
-<p> },</p>
+<p>But this is not really doing anything really exciting. I would like to display each todo in this view. We will need a view for individual Todo model.</p>
-<p> close: function() {</p>
+<pre><code>window.TodoView = Backbone.View.extend({
+ tagName: 'li',
+ render: function() {
-<pre><code>this.model.save({text: this.input.val()});
-$(this.el).removeClass("editing");
+ }
+});
</code></pre>
-<p> }</p>
-
-<p>});</p>
-
-<p>Adding the class editing, hides the div containing the todo text and show a div containing an text field with the content already been filled (via the template).</p>
-]]></content>
- </entry>
-
- <entry>
- <title type="html"><![CDATA[Converting a BlogEngine.Net blog to Octopress]]></title>
- <link href="http://sebastienlachance.com/blog/converting-a-blogengine-dot-net-blog-to-octopress/"/>
- <updated>2012-02-21T12:52:00-05:00</updated>
- <id>http://sebastienlachance.com/blog/converting-a-blogengine-dot-net-blog-to-octopress</id>
- <content type="html"><![CDATA[<p>Some months ago, I moved my BlogEngine.net blog (hosted on GoDaddy) to Octopress hosted on Heroku. I needed a tool to migrate all my posts and found nothing that could apply to my case (I&#8217;m pretty sure there is something out there, but I didn&#8217;t look very far and wanted to code the tool myself anyway).</p>
-
-<p>Octopress blog post format look like this:</p>
+<p>But how do we get a model into this view?</p>
-<pre><code>---
-layout: post
-title: "Setting ComVisible"
-date: 2005-01-19 14:46:00
-comments: true
-categories:
----
+<p>When you create an instance of the view you can pass a the model you will want to display. It will automagically added to the model property on the view.</p>
-** This is my post using Markdown **
+<pre><code>describe("TodoView", function() {
+ it("initialization accept a model", function() {
+ var todo = new Todo();
+ var view = new TodoView({ model: todo });
+ expect(view.model).toEqual(todo);
+ });
+});
</code></pre>
-<p>My BlogEngine.Net was configured to use xml files to store posts. Which look like this:</p>
+<p>Now I&#8217;m pretty sure I can render something in my TodoView render method.</p>
-<pre><code>&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
-&lt;post&gt;
- &lt;author&gt;SebastienLachance&lt;/author&gt;
- &lt;title&gt;Building a new app - Introduction&lt;/title&gt;
- &lt;description&gt;The introduction&lt;/description&gt;
- &lt;content&gt;This is ...
+<pre><code>window.TodoView = Backbone.View.extend({
+ tagName: 'li',
+ render: function() {
+ $(this.el).append(this.model.get('description'));
+ return this;
+ }
+});
</code></pre>
-<p>At first, I wanted to move each post individually whenever I could. After a week and pretty much nothing converted, I created a little .Net tool to make the conversion/migration much easier.</p>
-
-<p>It&#8217;s a pretty basic windows form application that takes a path and output a bundle of simili-markdown (because the original posts are html, but, since markdown accept html, it&#8217;s fine) files that are compatible with the Octopress format.</p>
+<p>Now in my TodoListView I will loop through each Todo, render a view for each and appending them to the root element.</p>
-<p>It&#8217;s also generating a <strong>redirection.rb</strong> file that contains necessary code to be used by rack-rewrite to make necessary 301 redirection. It can be useful if you don&#8217;t want to write it all manually.</p>
-
-<pre><code>use Rack::Rewrite do
-
- r301 %r{^/post/The-surprising-science-of-motivation-by-Dan-Pink.aspx?$}, '/blog/the-surprising-science-of-motivation-by-dan-pink'
- r301 %r{^/post/Building-a-new-application-Introduction.aspx?$}, '/blog/building-a-new-application-introduction'
- r301 %r{^/post/tight-deadlines.aspx?$}, '/blog/tight-deadlines'
- r301 %r{^/post/no-such-file-to-load-cucumberrailsactive_record-(LoadError).aspx?$}, '/blog/no-such-file-to-load-cucumberrailsactive_record-(loaderror)'
- r301 %r{^/post/Buying-games-on-Steam.aspx?$}, '/blog/buying-games-on-steam'
- r301 %r{^/post/AlternativeToNet-review.aspx?$}, '/blog/alternativetonet-review'
- r301 %r{^/post/Excellent-post-by-Uncle-Bob.aspx?$}, '/blog/excellent-post-by-uncle-bob'
+<pre><code>window.TodoListView = Backbone.View.extend({
+ tagName: 'section',
+ render: function() {
+ $(this.el).html('&lt;h2&gt;Todos&lt;/h2&gt;&lt;ul class="todo-items"&gt;&lt;/ul&gt;');
+ var listContainer = $(this.el).find('.todo-items');
+ this.collection.each(function(todo) {
+ var view = new TodoView({model:todo});
+ listContainer.append(view.render().el);
+ });
+ return this;
+ }
+});
</code></pre>
-<p>You can grab the source here : <a href="https://github.com/sebastienlachance/BlogEngineToOctopress">BlogEngineToOctopres</a></p>
+<p>Next post: Adding and removing todos.</p>
]]></content>
</entry>
<entry>
- <title type="html"><![CDATA[My starting Gemfile]]></title>
- <link href="http://sebastienlachance.com/blog/my-starting-gemfile/"/>
- <updated>2012-02-17T15:08:00-05:00</updated>
- <id>http://sebastienlachance.com/blog/my-starting-gemfile</id>
- <content type="html"><![CDATA[<p>This is how my Gemfile looks like at the moment. Continuous feedback with Guard and metrics to keep track on defects and best practices not used.</p>
+ <title type="html"><![CDATA[Mastering Backbone - Day 0]]></title>
+ <link href="http://sebastienlachance.com/blog/mastering-backbone-day-0/"/>
+ <updated>2012-02-02T19:42:00-05:00</updated>
+ <id>http://sebastienlachance.com/blog/mastering-backbone-day-0</id>
+ <content type="html"><![CDATA[<p><img src="http://sebastienlachance.com/images/backbone.png" title="backbone.js" ></p>
-<div><script src='https://gist.github.com/1855201.js?file='></script>
-<noscript><pre><code>source 'https://rubygems.org'
+<p>I have now officially started the development for my new web application. I will not go into details right now, since everything is to be made, and a lot of very important decisions are to be made.</p>
-gem 'rails', '3.2.1'
-gem 'pg'
-gem 'omniauth-twitter'
-gem 'omniauth-facebook'
-gem 'omniauth-google-oauth2'
-gem 'omniauth-identity'
+<p>What I can say is that it will be a Web Application running on Rails. I&#8217;m still struggling on whether to use PostgresSQL, MySQL or MongoDB.</p>
-group :assets do
- gem 'sass-rails', '~&gt; 3.2.3'
- gem 'coffee-rails', '~&gt; 3.2.1'
- gem 'uglifier', '&gt;= 1.0.3'
-end
+<p>One of the big design decision was the choice of the client-side framework. I know I wanted a rich and fast user experience and to use Javascript heavily. So, I decided to go with <a href="http://documentcloud.github.com/backbone/" title="Backbone.js">Backbone</a>. And I have no experience with it apart from the <a href="http://peepcode.com/products/backbone-js" title="Backbone.js on Peepcode">Peepcode screencasts</a>.</p>
-gem 'jquery-rails'
-gem 'skeleton-rails'
-gem 'rails-backbone'
-gem 'jasminerice'
+<p>I have no idea how to apply it to my application domain. It will be hard, but worth it.</p>
-gem 'rspec-rails', :group =&gt; [:development, :test]
+<h2>What is Backbone?</h2>
-group :development do
- gem 'heroku'
- gem 'guard'
- gem 'guard-rspec'
- gem 'guard-jasmine'
- gem 'growl'
- gem 'metrical'
- gem 'fattr' # for Metric_fu
- gem 'arrayfields' # for Metric_fu
- gem 'map' # for Metric_fu
- gem 'annotate', :git =&gt; 'git://github.com/ctran/annotate_models.git'
-end
+<p><strong>Backbone is a framework to create data-driven application in Javascript.</strong></p>
-group :test do
- gem 'database_cleaner', :group =&gt; :test
- gem 'factory_girl_rails', :group =&gt; :test
-end
+<p>As much as I love CoffeeScript, I will not use it to learn Backbone.</p>
-gem 'bcrypt-ruby', '~&gt; 3.0.0'</code></pre></noscript></div>
+<p>I will use Jasmine for testing.</p>
+<h2>Why Backbone and not Knockout or any other javascript framework?</h2>
+<p>From what I heard, Backbone is hard to learn, but from those who use it, it&#8217;s totally worth a try. And I heard so much great things from a lot of different developers. They couldn&#8217;t be all wrong.</p>
+<p>So let&#8217;s get coding. Expect another blog post later for the first impressions.</p>
]]></content>
</entry>
View
4 public/blog/2009-retrospective/index.html
@@ -262,11 +262,11 @@ <h1 class="entry-title">2009 Retrospective</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/2010-goals/index.html
@@ -244,11 +244,11 @@ <h1 class="entry-title">2010 Goals</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 ...cular-reference-was-detected-while-serializing-an-object-to-type-code-dot-models-dot-category/index.html
@@ -220,11 +220,11 @@ <h1 class="entry-title">A Circular Reference Was Detected While Serializing an O
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/a-new-job/index.html
@@ -199,11 +199,11 @@ <h1 class="entry-title">A new job</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/activatorcreateinstance-problem/index.html
@@ -210,11 +210,11 @@ <h1 class="entry-title">Activator.CreateInstance problem</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/adding-a-mime-map-in-iis/index.html
@@ -217,11 +217,11 @@ <h1 class="entry-title">Adding a MIME map in IIS</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/adding-an-element-to-an-array-in-c/index.html
@@ -212,11 +212,11 @@ <h1 class="entry-title">Adding an element to an array in C#</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/adding-ncover-to-cruisecontrolnet/index.html
@@ -199,11 +199,11 @@ <h1 class="entry-title">Adding NCover to CruiseControl.NET</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/adding_a_mime_map_in_iss/index.html
@@ -222,11 +222,11 @@ <h1 class="entry-title">Adding a MIME map in IIS</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/ajax-wcf-and-deserialization-problem/index.html
@@ -224,11 +224,11 @@ <h1 class="entry-title">Ajax, Wcf and deserialization problem</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/alternativetonet-review/index.html
@@ -208,11 +208,11 @@ <h1 class="entry-title">AlternativeTo.Net review</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/altnet-podcast/index.html
@@ -199,11 +199,11 @@ <h1 class="entry-title">Alt.NET Podcast</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 ...w-of-e2809cpragmatic-thinking-learninge2809d-and-probably-no-interesting-content-in-this-post/index.html
@@ -196,11 +196,11 @@ <h1 class="entry-title">Announcing a review of Pragmatic Thinking & Learning</h1
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/another-metablogging-post/index.html
@@ -223,11 +223,11 @@ <h1 class="entry-title">Another meta-blogging post</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/appsumo-and-the-bad-ass-developer-bundle/index.html
@@ -198,11 +198,11 @@ <h1 class="entry-title">APPSUMO and The Bad Ass Developer Bundle</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
42 public/blog/archives/index.html
@@ -134,20 +134,6 @@ <h1 class="entry-title">Blog Archive</h1>
<article>
-<h1><a href="/blog/backbone-and-page-transition/">Backbone and page transition</a></h1>
-<time datetime="2012-04-27T17:02:00-04:00" pubdate><span class='month'>Apr</span> <span class='day'>27</span> <span class='year'>2012</span></time>
-
-<footer>
- <span class="categories">posted in <a class='category' href='/blog/categories/backbone/'>backbone</a></span>
-</footer>
-
-
-</article>
-
-
-
-<article>
-
<h1><a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a></h1>
<time datetime="2012-04-27T08:18:00-04:00" pubdate><span class='month'>Apr</span> <span class='day'>27</span> <span class='year'>2012</span></time>
@@ -298,20 +284,6 @@ <h1 class="entry-title">Blog Archive</h1>
<article>
-<h1><a href="/blog/backbone-fetching-a-single-model/">Backbone - Fetching a single model</a></h1>
-<time datetime="2012-03-19T07:50:00-04:00" pubdate><span class='month'>Mar</span> <span class='day'>19</span> <span class='year'>2012</span></time>
-
-<footer>
- <span class="categories">posted in <a class='category' href='/blog/categories/backbone/'>backbone</a></span>
-</footer>
-
-
-</article>
-
-
-
-<article>
-
<h1><a href="/blog/filling-a-select-from-an-array-on-javascript-object/">Filling a select from an array on javascript object</a></h1>
<time datetime="2012-03-13T12:11:00-04:00" pubdate><span class='month'>Mar</span> <span class='day'>13</span> <span class='year'>2012</span></time>
@@ -326,16 +298,6 @@ <h1 class="entry-title">Blog Archive</h1>
<article>
-<h1><a href="/blog/backbone-going-through-the-todo-dot-js-example/">Backbone - Going through the todo.js example</a></h1>
-<time datetime="2012-03-02T08:52:00-05:00" pubdate><span class='month'>Mar</span> <span class='day'>02</span> <span class='year'>2012</span></time>
-
-
-</article>
-
-
-
-<article>
-
<h1><a href="/blog/converting-a-blogengine-dot-net-blog-to-octopress/">Converting a BlogEngine.Net blog to Octopress</a></h1>
<time datetime="2012-02-21T12:52:00-05:00" pubdate><span class='month'>Feb</span> <span class='day'>21</span> <span class='year'>2012</span></time>
@@ -2105,11 +2067,11 @@ <h1 class="entry-title">Blog Archive</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/asp-dot-net-mvc-actionlink-with-image/index.html
@@ -213,11 +213,11 @@ <h1 class="entry-title">ASP.NET MVC ActionLink with image</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/aspnet-mvc-beta/index.html
@@ -208,11 +208,11 @@ <h1 class="entry-title">ASP.NET MVC Beta</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/aspnet-mvc-request-handling-poster/index.html
@@ -199,11 +199,11 @@ <h1 class="entry-title">ASP.NET MVC Request Handling Poster</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/available/index.html
@@ -205,11 +205,11 @@ <h1 class="entry-title">Available</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
4 public/blog/back-from-my-2-weeks-vacation/index.html
@@ -196,11 +196,11 @@ <h1 class="entry-title">Back from my 2 weeks vacation</h1>
</li>
<li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
+ <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
</li>
<li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
+ <a href="/blog/ruby-and-nested-classes/">Ruby and nested classes</a>
</li>
</ul>
View
331 public/blog/backbone-and-page-transition/index.html
@@ -1,331 +0,0 @@
-
-<!DOCTYPE html>
-<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
-<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
-<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
-<head>
- <meta charset="utf-8">
- <title>Backbone and page transition - Sebastien Lachance</title>
- <meta name="author" content="Sebastien Lachance">
-
-
- <meta name="description" content="
-">
-
-
- <!-- http://t.co/dKP3o1e -->
- <meta name="HandheldFriendly" content="True">
- <meta name="MobileOptimized" content="320">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
-
- <link rel="canonical" href="http://sebastienlachance.com/blog/backbone-and-page-transition">
- <link href="/favicon.png" rel="icon">
- <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
- <script src="/javascripts/modernizr-2.0.js"></script>
- <script src="/javascripts/ender.js"></script>
- <script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="http://feeds.feedburner.com/sebastienlachance/feed" rel="alternate" title="Sebastien Lachance" type="application/atom+xml">
- <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
-<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-
-
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-10165653-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
-
-
-</head>
-
-<body >
- <header role="banner"><hgroup>
- <h1><a href="/">Sebastien Lachance</a></h1>
-
-</hgroup>
-
-</header>
- <nav role="navigation"><ul class="subscription" data-subscription="rss">
- <li><a href="http://feeds.feedburner.com/sebastienlachance/feed" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
-
-</ul>
-
-<form action="http://google.com/search" method="get">
- <fieldset role="search">
- <input type="hidden" name="q" value="site:sebastienlachance.com" />
- <input class="search" type="text" name="q" results="0" placeholder="Search"/>
- </fieldset>
-</form>
-
-<ul class="main-navigation">
- <li><a href="/">Blog</a></li>
- <li><a href="/blog/archives">Archives</a></li>
- <li><a href="/resume">Resume</a></li>
-</ul>
-
-</nav>
- <div id="main">
- <div id="content">
- <div>
-<article class="hentry" role="article">
-
- <header>
-
- <h1 class="entry-title">Backbone and page transition</h1>
-
-
- <p class="meta">
-
-
-
-
-
-
-
-
-
-
-
-
-<time datetime="2012-04-27T17:02:00-04:00" pubdate data-updated="true">Apr 27<span>th</span>, 2012</time>
-
- </p>
-
- </header>
-
-
-<div class="entry-content">
-</div>
-
-
- <footer>
- <p class="meta">
-
-
-
-<span class="byline author vcard">Posted by <span class="fn">Sebastien Lachance</span></span>
-
-
-
-
-
-
-
-
-
-
-
-
-
-<time datetime="2012-04-27T17:02:00-04:00" pubdate data-updated="true">Apr 27<span>th</span>, 2012</time>
-
-
-<span class="categories">
-
- <a class='category' href='/blog/categories/backbone/'>backbone</a>
-
-</span>
-
-
- </p>
-
- <div class="sharing">
-
- <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://sebastienlachance.com/blog/backbone-and-page-transition/" data-via="slachance" data-counturl="http://sebastienlachance.com/blog/backbone-and-page-transition/" >Tweet</a>
-
-
- <div class="g-plusone" data-size="medium"></div>
-
-
- <div class="fb-like" data-send="true" data-width="450" data-show-faces="false"></div>
-
-</div>
-
-
- <p class="meta">
-
- <a class="basic-alignment left" href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/" title="Previous Post: Large-scale Javascript Application Architecture by Addy Osmani">&laquo; Large-scale Javascript Application Architecture by Addy Osmani</a>
-
-
- <a class="basic-alignment right" href="/blog/learning-rails-assert-valid-keys/" title="next Post: Learning Rails : assert_valid_keys">Learning Rails : assert_valid_keys &raquo;</a>
-
- </p>
- </footer>
-</article>
-
- <section>
- <h1>Comments</h1>
- <div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
-</div>
- </section>
-
-</div>
-
-<aside class="sidebar">
-
- <section>
- <h1>About Me</h1>
- <img src="/images/me.png" />
- <p>Sebastien Lachance, programmer since 2003.</p>
- <p>I am an entrepreneur and consultant. I have launched the <a href="http://www.guidedescommercesdebeauce.com">Guide des Commerces</a> in 2011, a project with great potential and had a lot of fun making it.
- </p>
- <p>
- I'm a web developer specialized in Rails and ASP.NET MVC. I have a background in business applications but I really enjoy making any kind of software.
- </p>
- <p>
- I do believe in the power of twitter, but I dont use it as much as I would.
- But feel free to follow me anyway :).
- </p>
-</section>
-<section>
- <h1>Recent Posts</h1>
- <ul id="recent_posts">
-
- <li class="post">
- <a href="/blog/rails-assets-pipeline-and-missing-assets/">Rails Assets Pipeline and missing assets</a>
- </li>
-
- <li class="post">
- <a href="/blog/method-decorators-in-ruby/">Method decorators in Ruby</a>
- </li>
-
- <li class="post">
- <a href="/blog/learning-rails-assert-valid-keys/">Learning Rails : assert_valid_keys</a>
- </li>
-
- <li class="post">
- <a href="/blog/backbone-and-page-transition/">Backbone and page transition</a>
- </li>
-
- <li class="post">
- <a href="/blog/large-scale-javascript-application-architecture-by-addy-osmani/">Large-scale Javascript Application Architecture by Addy Osmani</a>
- </li>
-
- </ul>
-</section>
-
-<section>
- <h1>Github Repos</h1>
- <ul id="gh_repos">
- <li class="loading">Status updating...</li>
- </ul>
-
- <a href="https://github.com/sebastienlachance">@sebastienlachance</a> on Github
-
- <script type="text/javascript">
- $.domReady(function(){
- if (!window.jXHR){
- var jxhr = document.createElement('script');
- jxhr.type = 'text/javascript';
- jxhr.src = '/javascripts/libs/jXHR.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(jxhr, s);
- }
-
- github.showRepos({
- user: 'sebastienlachance',
- count: 0,
- skip_forks: true,
- target: '#gh_repos'
- });
- });
- </script>
- <script src="/javascripts/github.js" type="text/javascript"> </script>
-</section>
-
-
-<section>
- <h1>Latest Tweets</h1>
- <ul id="tweets">
- <li class="loading">Status updating...</li>
- </ul>
- <script type="text/javascript">
- $.domReady(function(){
- getTwitterFeed("slachance", 4, false);
- });
- </script>
- <script src="/javascripts/twitter.js" type="text/javascript"> </script>
-
- <a href="http://twitter.com/slachance" class="twitter-follow-button" data-show-count="true">Follow @slachance</a>
-
-</section>
-
-
-
-
-</aside>
-
-
- </div>
- </div>
- <footer role="contentinfo"><p>
- Copyright &copy; 2012 - Sebastien Lachance -
- <span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
-</p>
-
-</footer>
-
-
-<script type="text/javascript">
- var disqus_shortname = 'sebastienlachance';
-
-
- // var disqus_developer = 1;
- var disqus_identifier = 'http://sebastienlachance.com/blog/backbone-and-page-transition/';
- var disqus_url = 'http://sebastienlachance.com/blog/backbone-and-page-transition/';
- var disqus_script = 'embed.js';
-
- (function () {
- var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
- dsq.src = 'http://' + disqus_shortname + '.disqus.com/' + disqus_script;
- (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
- }());
-</script>
-
-
-
-<div id="fb-root"></div>
-<script>(function(d, s, id) {
- var js, fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) {return;}
- js = d.createElement(s); js.id = id;
- js.src = "//connect.facebook.net/en_US/all.js#appId=212934732101925&xfbml=1";
- fjs.parentNode.insertBefore(js, fjs);
-}(document, 'script', 'facebook-jssdk'));</script>
-
-
-
- <script type="text/javascript">
- (function() {
- var script = document.createElement('script'); script.type = 'text/javascript'; script.async = true;
- script.src = 'https://apis.google.com/js/plusone.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
- })();
- </script>
-
-
-
- <script type="text/javascript">
- (function(){
- var twitterWidgets = document.createElement('script');
- twitterWidgets.type = 'text/javascript';
- twitterWidgets.async = true;
- twitterWidgets.src = 'http://platform.twitter.com/widgets.js';
- document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
- })();
- </script>
-
-
-
-
-
-</body>
-</html>
View
346 public/blog/backbone-fetching-a-single-model/index.html
@@ -1,346 +0,0 @@
-
-<!DOCTYPE html>
-<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
-<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
-<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
-<head>
- <meta charset="utf-8">
- <title>Backbone - Fetching a single model - Sebastien Lachance</title>
- <meta name="author" content="Sebastien Lachance">
-
-
- <meta name="description" content="I&#8217;m working on a Backbone driven blog engine (Backbone-rails-blog) and had some serious issues with a single functionnality. Retrieving a blog &hellip;">
-
-
- <!-- http://t.co/dKP3o1e -->
- <meta name="HandheldFriendly" content="True">
- <meta name="MobileOptimized" content="320">
- <meta name="viewport" content="width=device-width, initial-scale=1">
-
-
- <link rel="canonical" href="http://sebastienlachance.com/blog/backbone-fetching-a-single-model">
- <link href="/favicon.png" rel="icon">
- <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
- <script src="/javascripts/modernizr-2.0.js"></script>
- <script src="/javascripts/ender.js"></script>
- <script src="/javascripts/octopress.js" type="text/javascript"></script>
- <link href="http://feeds.feedburner.com/sebastienlachance/feed" rel="alternate" title="Sebastien Lachance" type="application/atom+xml">
- <!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
-<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
-
-
- <script type="text/javascript">
- var _gaq = _gaq || [];
- _gaq.push(['_setAccount', 'UA-10165653-1']);
- _gaq.push(['_trackPageview']);
-
- (function() {
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })();
- </script>
-
-
-</head>
-
-<body >
- <header role="banner"><hgroup>
- <h1><a href="/">Sebastien Lachance</a></h1>
-
-</hgroup>
-
-</header>
- <nav role="navigation"><ul class="subscription" data-subscription="rss">
- <li><a href="http://feeds.feedburner.com/sebastienlachance/feed" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
-
-</ul>
-
-<form action="http://google.com/search" method="get">
- <fieldset role="search">
- <input type="hidden" name="q" value="site:sebastienlachance.com" />
- <input class="search" type="text" name="q" results="0" placeholder="Search"/>
- </fieldset>
-</form>
-
-<ul class="main-navigation">
- <li><a href="/">Blog</a></li>
- <li><a href="/blog/archives">Archives</a></li>
- <li><a href="/resume">Resume</a></li>
-</ul>
-
-</nav>