22. HTML
class NotesModel extends Backbone.Model
defaults:
id: ''
title: 'title'
View
ejs
Model
・View のデータバッファとして定義
・バリデーションの定義
Collection
Model
contents: 'contents'
validate: (attrs) ->
return 'title is empty.' if _.isEmpty attrs.title
return 'contents is empty.' if _.isEmpty attrs.contents
#html5biz #html5bizB
23. HTML
Collection
・使用するモデルを定義
・Ajax ? or localStorage ?
View
class NotesCollection extends Backbone.Collection
model: NotesModel
ejs
Collection
Model
#html5biz #html5bizB
31. Yeoman とは
MODERN WORKFLOWS FOR MODERN WEBAPPS
Google社が作成した総合開発ツール群
yo(雛形作成ツール)
grunt(タスクランナー)
bower(フロントエンドパッケージマネージャ)
http://yeoman.io/
#html5biz #html5bizB
32. 開発の大まかな流れ
1. yo [generator] によるひな形
2. grunt server を使用しアプリケーション開発
3. grunt build によるリリースビルド
http://yeoman.io/
#html5biz #html5bizB