Starting with Backbone LayoutManager

I was planing to use Backbone for my next project. Because it was a large application, I did start looking into the Backbone frameworks out there.
I took a look at Thorax.js, Marionette.js and LayoutManager.

Choosing LayoutManager

I decided to go with LayoutManager. One day, maybe I will write something more about the other ones because they are good and interesting frameworks. But in the end, I chosen LayoutManager because it is simple. I has all the things I needed and nothing more.
LayoutManager is created by Tim Branyen and you can find source code on Github. One of the things that convinced me to use LayoutManager is clean and well made wiki page. Everything seems to be covered there. But that is where my troubles started.

Video Tutorial

I wanted to save myself some time and watch a screen-cast instead of reading, so that I can dive right into it. Everything was nicely explained, but there was no source code of the example covered in screen-cast.
No problem, I thought, I will just follow the video and code along. I replicated all the files, but it was not working. The example was using Twitter API to fetch some data. The request was to the old and not supported version of Twitter API. Also some of the LayoutManager functions were returning errors. That is when I noticed - the video is two years old!

boilerplate-handlebars-layoutmanager

After realizing my mistake I went back to the documentation. There was the link to example with LayoutManager with Handlebars. This kind of integration was covered in the screen-cast, so I thought it will be perfect. The seed project was based on Backbone Boilerplate project, so it took me while to familiarize myself with the concept. After installing few node modules and bower components I was ready to start. Kind of... I understood the structure of the app thank to the post author refereed to in the video, but I wanted some app example I could play with.

The Thing I Was Looking For

I went back to the documentation of the core Boilerplate project, thinking that I will start from there and later add the LayoutManager to the project. I followed link to their example app, which is github-viewer. Turns out it uses the LayoutManager!
I found what I wanted. The app example is very well-structured and I think a perfect place to start hacking with LayoutManager. My tip for anyone that wants to use this framework is to start there.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 10,102评论 0 23
  • 其实每天都在效率手册规划一天的工作,但是确实很少回头去回顾昨天过的效果如何。首次接触晨间日记,一开始纠结于形式与模...
    海盗树阅读 154评论 2 0
  • 这一向,雨水连连。北方、长江中下游、闽浙川已出现特大险情…… 令人担心的是:平江也断断续续在迎接着一轮轮雨...
    天河水响阅读 593评论 0 15
  • 书摘: 1.沟通最大的问题就是“已经做好了”的错觉。——乔治.萧伯纳 2.帕金森法则 3.生活中很多东西比金钱重要...
    咖啡不加糖和奶阅读 193评论 0 0
  • 官网 - 新手教程 - 操作说明为方便自己查看,Copy一份在此
    peony007阅读 1,080评论 0 1