MVC と言えば Apache Struts をはじめとするサーバサイド・フレームワークを想像しますが、 今回はJavaScript による大規模開発の際に採用されるクライアントサイド MVC フレームワーク「Backbone.js」の使い方についてまとめてみました。 (厳密にはクライアントサイドの場合、MVC とは呼ばず MVVM とか MV* とか呼ばれてるようです。) 前提 Backbone.js の構成を簡単に言ってしまうと 単一データの管理を行うモデル 複数件のモデルの管理を行うコレクション 画面の管理を行うビュー の3つの主要モジュールを軸に構成されており、Underscore.js、jQuery(Zepto)に依存するかたちで動作するようになっています。 利用の際は、underscore.js、jquery.js、backbone.js の順で読み込みます。 //cdnjs
最近、JavaScriptを多用するWebアプリケーションの開発に携わる機会が増えてきました。 jQueryのイベントハンドラをベタに書いていくのは、規模が小さいうちは良いのですが、機能追加・仕様変更等が多発すると少々面倒なことになります。このまま大きくなっていくと破綻が目に見えているので、構造化されたアプリケーションを作りたいと思いBackbone.jsを学び始めました。 Backbone.js 公式サイト 7月上旬から学び始めたので、まだ20日程度ですが、その中で学んだこと等を紹介します。これから勉強を始めてみようと思う人の参考になれば、幸いです。 以下の内容は、Backbone.jsの熟練者が指南しているわけではないことを予めご了承ください。ちなみに、平日の夜と、時間が取れるときの週末を使って勉強して、イベントサービスのWebAPIを串刺し検索するアプリ等を作るくらいには、Backb
For full functionality of this siteit isnecessary to enableJavaScript. Here are the instructions how to enableJavaScript in your web browser.
CoffeeScript, Meet Backbone.js is asimple Backbone.js tutorial written in CoffeeScript comprised of self-explanatory "hello world" examples of increasing complexity.It was designed to provide a smoothertransition from zero to the popular Todos example The bulk of this tutorial is a rewrite of the original hello-backbonejs tutorial. Backbone.js offers a lean MVC framework for organizing your Jav
Writing reliableJavaScript code at scale is difficult. The language lacks built-in formal structures that enable reliable engineering practices. Fortunately establishing convention and selecting mature librariesgoes a long way towardsbuilding a trustworthy architecture. Furthermore writing unit tests gains confidence in our applications. In this first article in a series on unit testingJavaScr
Part 1:Build Environment Part 2:Google'sAPIs and RequireJS Part 3: Authenticating with OAuth2 Part 4: Backbone.sync Part 5: List Views Part 6:Creating Lists Part 7: Editing Lists Part 8: Deleting Lists Part 9: Tasks Part 10: Oh No Not More Tasks Part 11: Spies, Stubs, and Mocks Part 12: Testing with Mocks Part 13: Routes Part 14: Customising theUI Part 15: Updates for 1.0, Clear Complete Prep
Hey! I'm Pete, a software developer and founder of Alternate Labs. I lovebuilding apps usingRuby,Swift andJavaScript. I have been working with agencies and startups sinceearly 2005, helping to design,build and ship products and services on the web. Previously I have worked at Typecast (aquired by monotype), Crafty Devil (now Flowlens) and PropertyPal (founding team). For several years my foc
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く