最初に僕のポジションは表明しておくけど、今までbackbone.js, というかそのラッパーであるchaplin.jsべったりの環境で開発してて、今のプロジェクトをゼロから作り直す機会があるので次バージョンのためのライブラリ選定のためにとりあえず比較として angularを試した見た程度の人間なので、深くは理解してない。 Angularのメリット 僕の浅い理解と勉強会での話を総合した感じ レールに乗り切った時の開発効率が半端ない レールがしっかり敷かれているので開発者の能力差が問題にならない HTMLがテンプレートなので意味的な乖離が少ない ビューモデルに対する操作が一貫していてテスタビリティがある 自分もモジュラリティがあるHTML/CSSは幻想だと思っているので、HTMLに直接属性を書くのは別に構わないと思っている。 ただ、集団開発でも開発者の能力差が問題にならない、という発表をしてい
I am learning the Backbone.js JavaScript framework right now, and ran into a problem. Backbone Collections and Models can be set up to asynchronously load data from the server with the fetch() method, which fires off an Ajax sync call. You can bind a callback method to a Collection’s reset event, which Backbone provides. It was my impression that the change event on a Model would do the same thing
Backbone.jsでページ遷移を行うとき、今まで使っていたViewはどこに行ってしまうのか その謎は僕らにも解明できていないんだ ホントは、Backbone.jsはViewの使い方についてメモリ管理機構をもってないので、明確に開放しないとメモリを圧迫したり、予期しない動作を起こしたりすることがある たまたま、そんな現象がカメラに撮影できたので観てもらいたい これはコレクションへのaddの監視が2重、3重に設定されちゃうので起こってるっぽい現象 こういったことを避けるには簡単で設定してるイベント類をちゃんと開放?(unbind)してから次の動作に移ればいい 開放するものは3つくらいあって、1.DOMと2.それに渡されたモデルやコレクションのイベント、3.view独自のイベント(イベントハッシュでバインドしたイベント)だ DOMの開放は一番簡単で
An example Backbone application contributed by Jérôme Gravel-Niquet. This demo uses a simple LocalStorage adapter to persist Backbone models within your browser. This CoffeeScript variation has been provided by Jason Giedymin. Note: two things you will notice with my CoffeeScript are that I prefer to use four space indents and prefer to use () for all functions.
First we create a rails app without Test Unit (as we will use rspec as per Jasmine). Let's call it party_time: rails new party_time -T cd party_time rm public/index.html Let's start with Jasmine. I played around with a couple of methods of integrating it but settled on using Jasminerice, which has worked superbly. This tutorial uses version 0.0.8, but I imagine it will continue to work for later v
The Backbone FrameworkMarionette simplifies your Backbone application code with robust views and architecture solutions. Download v4.1.2View Docs Organize your app in terms of small Views. Marionette makes it easy to compose rich layouts out of small components Show a sorted filtered list without breaking a sweat. Have a massive collection? Want to add or remove an item? No worries! Learn to love
Establish the root object, window (self) in the browser, or global on the server. We use self instead of window for WebWorker support. var root = typeof self == 'object' && self.self === self && self || typeof global == 'object' && global.global === global && global;
Available free for open-source reading below or for purchase via the O'Reilly store. Pull requests and comments always welcome. Prelude Not so long ago, “data-rich web application” was an oxymoron. Today, these applications are everywhere and you need to know how to build them. Traditionally, web applications left the heavy-lifting of data to servers that pushed HTML to the browser in complete pag
先日めでたく 1.0.0 をリリースした Backbone.js ですが、よくも悪くも「どう作るか」について、作成者側の思いで自由にできるため、始めの取っ掛かりとして、どう作ればよいかと言うことで結構悩む方も多いかと思います。 そこで、同じように悩んでいる人になんらかのヒントを与えられればと思い、シングルページアプリケーションを題材にチュートリアルを作成して公開してみました。 また、私が Backbone.js でアプリケーションを作成する上で、特に View について注意するポイントを幾つか紹介します。 何かの参考になれば幸いです。 このエントリでお伝えしたいこと。 Backbone.js のチュートリアル作りました。 Backbone.View を扱う際に注意するポイントについていくつか紹介します。 チュートリアル 早速ですが、Backbone.js でシングルページアプリケーションを
Backbone Patterns Building apps with Backbone.js Here, I try to document the good practices that our team has learned along the way building Backbone applications. This document assumes that you already have some knowledge of Backbone.js, jQuery, and of course, JavaScript itself. Table of contents Model patterns Bootstrapping data View patterns Inline templates JST templates Partials Animation buf
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く