vuejs_meetup.key

Similar documents
node_fest_2014.key

paper.pdf

d_appendixB-asp10appdev.indd

cssnitelp47_hasegawa_v02.key

WEBサービス超入門 mask.key

9 Bootstrap Font Awesome 52 + gem 'bootstrap', '4.0.0.alpha6' 53 + gem 'tether-rails' Gem bootstrap tether-rails Bootstrap JavaScript Tether Ctrl-C Ra

3 top#index 1 web router.ex web/router.ex 12 scope "/", NanoPlanner do 13 pipe_through browser get "/", TopController, index 16 end URL / to

SmartBrowser_document_build30_update.pptx

ii

2 Java 35 Java Java HTML/CSS/JavaScript Java Java JSP MySQL Java 9:00 17:30 12:00 13: 項目 日数 時間 習得目標スキル Java 2 15 Web Java Java J

6 (1) app.html.eex 28 lib/nano_planner_web/templates/layout/app.html.eex 27 <footer> Oiax Inc <%= this_year() %> Oiax Inc. 29 </footer>

2 Rails pico planner camel case camel pico planner _ pico_planner snake case snake - chain case chain pico planner pico-planner CSS id class 2.3 Rails

15 Phoenix HTML 15.1 ModestGreeter RAVT web/router.ex web/router.ex : 12 scope "/", ModestGreeter do 13 pipe_through :browser get "/", TopCont

PowerPoint プレゼンテーション

JavaScript 1.! DOM Ajax Shelley Powers,, JavaScript David Flanagan, JavaScript 2

jquery

Web±ÜÍ÷¤Î³Ú¤·¤µ¤ò¹â¤á¤ëWeb¥Ú¡¼¥¸²ÄÄ°²½¥·¥¹¥Æ¥à

11 Bootstrap Font Awesome $ cd ~/projects/modest_greeter $ npm install --save jquery popper.js tether --save package.json depen

SVG資料第10回目(その2) Ajaxによる同期通信と非同期通信の違い

7_16.dvi

S2BaseとZend Framework

【お試し版】Web制作者のためのCSS設計の教科書(非売品)

拡張機能の開発 ( 基礎編 ) 109 HACK 図 18-2 Translator JP 拡張機能の動作例 ❷ 18-3 translator-jp 図 18-3 パッケージのフォルダ構成 Translator JP URL

10 (1) s 10.2 rails c Rails 7 > item = PlanItem.new => #<PlanItem id nil, name nil,...> > item.name = "" => "" > item.valid? => true valid? true false

■サイトを定義する

untitled

Web2.0 LL Framework Ruby on Rails / TurboGears / CakePHP Atlas Web2.0 XML Selenium / JMeter 3 Ajax Web 2.0 UI Ruby on Rails Web 2. ASP.NET AJAX,

8 4 end 5 6 private def message 7 'Hello' 8 end 9 end g = Greeting.new 12 g.hello $ ruby lib/lessons/greeting.rb Hello Ruby public method protec

Microsoft Word - 平成25年度調査研究事業報告書-四国大学山本 doc

IPSJ SIG Technical Report Vol.2015-CLE-16 No /5/23 RESTful Web API Web 1,2,3,4,a) 1,3,2,4 5,6 6 Wannous Muhammad 7,1,8 4,2,1 3,2,1 Maxima Web JS

スライド 1

Agenda! 事前準備

OB6-KEGGonRails-Kibukawa

progate-team

Chapter 1 イントロダクション p.21 第 2 段落 p.42 第 2 段落の 1 行目 p.45 Hint 美しいコードが書けるから Rails を選んだ美しいコードが書けるから Ruby を選んだフォルダ main app controllers を開いてみましょう フォルダ app

1

untitled

9 rbenv rbenv ruby 9.1 rbenv rbenv rbenv ruby ruby-build ruby 9.2 rbenv macos.bash_profile ~/.bash_profile ~/.bash_profile.bak $ touch ~/.bash_profile

スライド 1

2

IPSJ SIG Technical Report Vol.2014-HCI-157 No.26 Vol.2014-GN-91 No.26 Vol.2014-EC-31 No /3/15 1,a) 2 3 Web (SERP) ( ) Web (VP) SERP VP VP SERP

( )


Microsoft Word - W3C's_ARIA_Support

JavaScript の使い方

Lotus Domino XML活用の基礎!

AJAXを使用した高い対話性を誇るポートレットの構築


Javaで体験するスクリプト言語の威力

橡計画0.PDF

intra-mart Accel Platform — IM-Repository拡張プログラミングガイド   初版  

untitled

Oracle JDeveloper 10g ADF Creation Date: Jul 07, 2004 Last Update: Jul 08, 2004 Version 1.0

MVC4 Mobile Classic

はじめに HTML5 の登場 Web 上で可能な表現や操作の増加 開発まわりも大きく変化 2

DEIM Forum 2019 H2-2 SuperSQL SuperSQL SQL SuperSQL Web SuperSQL DBMS Pi

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版  

8 7 + <div class='col-12 col-md-8'> 8 <%= item.description %> 9 </div> 10 </div> 11 <% end %> 12 </div> class container container-fluid PicoPlan

untitled

情報システム設計論II ユーザインタフェース(1)

Level1_ key

IIJ GIO, SaaS, MOGOK


PowerPoint プレゼンテーション


16 (2) 23 - <div class="col-12 col-md-4"> </div> 23 + <div class="col-12 col-md-4 bg-info text-white text-md-right"> </div> HTML bg-info #17

intra-mart Accel Platform — イベントナビゲータ 開発ガイド   初版   None

JTS Google App Engine S119325

橡点検記録(集約).PDF

CodeIgniter Con 2011, Tokyo Japan, February

TypeScript 1.0 詳説

e10s におけるプロセス間通信の基本 219 HACK #34 Components.manager.removeBootstrappedManifestLocati on() function shutdown(adata, areason) { const IOService =

ch31.dvi


s

javascript key

インターネットマガジン2001年9月号―INTERNET magazine No.80

16 NanoPlanner name PlanItem.changeset/2 > validate_required([:name]) name :name Ecto.Changeset validate_required/3 Ecto.Changeset "validate_"

コンテンツメディアプログラミング実習2

Git HTML/

Rmenuフレームワーク


2016年度OSS協議会 第3回勉強会

東京工業大学情報理工学院 AO 入試 活動実績報告書 氏名 ( よみ ): 大岡山花子 ( おおおかやまはなこ ) 高等学校 : 県立 高等学校 (2019 年 3 月 卒業 卒業予定 ) 活動実績概要 (150 字程度 ): JavaScript ではコールバックを多用することがある. これはプロ

内容 1. コミュニティにおける View 2. ライブラリの選定と経緯 3. Backbone.js との付き合い方 4. ユニットテスト構成 5. 今後の課題

ASP.NET 2.0 Provider Model 概要

Ajax-ch00

[2][3] 2.1 Web 1 var s=0;for(var i=0;i<=10;i++){s+=i}alert(s) Web sum s Web % JavaScript [4] Web 1 var a = void 0; // var a = undefined; 2 va

ALG ppt

ETL Webinar

, , B 305, ,

P01_表紙

デモで理解する Facebook アプリ開発のポイント シグマコンサルティング ( 株 ) 菅原英治

第5回 マインクラフト・プログラミング入門

2

Condition DAQ condition condition 2 3 XML key value

基礎 Ruby on Rails 初版第 1 刷正誤表 基礎 Ruby on Rails ( 黒田努 佐藤和人著 株式会社オイアクス監修 インプレスジャパン刊 ) 初版第 1 刷 の正誤表です 特に重要な項目には 印を付しました また 付録 CD-ROM において chapter3 ディレクトリの中

Local variable x y i paint public class Sample extends Applet { public void paint( Graphics gc ) { int x, y;... int i=10 ; while ( i < 100 ) {... i +=

JavaScriptプログラミング入門

portfolioweb用

Transcription:

Rails Vue.js Vue.js Meetup 2015-01-28 @kazupon

About Me @kazupon CUUSOO SYSTEM Vue.js Plugin vue-i18n: https://github.com/kazupon/vue-i18n vue-validator: https://github.com/kazupon/vue-validator

Vue.js

Vue.js

HTML UX jquery Ajax Javascript CSS Rails Sprockets

MVC UI/UX UI

Rails & data-* Controller # Javascript $(document).ready(function () { var module = constantnize($( body ).data( controller-name )); if (module) { module.init(); } }); # HTML template <html> <body data-controller-name= <%= contoller.controller_name %> ></doby> </html>

jquery & DOM $('body.projects').on('focus', 'textarea', function () { var value = $(this).val().split( \n ); var value_row = 0; $.each(value, function(i, val) { value_row += Math.max(Math.ceil(val.length / self.cols), 1); }); var input_row = $(this).attr('rows'); var original_row = $(this).data('default_row'); var next_row = (input_row <= value_row)? value_row + 0 : Math.max(value_row + 1, original_row); $(this).attr('rows', next_row); });

Vue.js http://vuejs.org

Vue.js

jquery UI

Vue.js DOM UI CommonJS

Vue.js

ViewModel Vue.js Web Vue.js Vue.extend module.exports var Modal = module.exports = Vue.extend({ template: require('./modal.html'), components: { }, data: function () { return { title: '', } }, methods: { show: function () { }, hide: function () { }, onclickclose: function (e) { } } }); component system: http://vuejs.org/guide/components.html

ViewModel Vue.extend Vue.component require components v-component v-ref # ViewModel var Widget = module.exports = Vue.extend({ template: require('./widget.html'), components: { modal: require('../modal') }, methods: { onclickopenmodal: function () { this.$.modal.show(); }, } }); # View <div class= widget > <div v-component="modal" v-ref="modal"></div> </div>

ViewModel TODO ViewModel API conflict namespace v0.11.4 v-events $emit 1 events: { ChildWidget:remove : function (vm, index) { // remove the item from the item collection // }) } onclickremoveitem: function (event, index) { this.$dispatch( ChildWidget:remove, event.targetvm, index ); }) dispatch x onclickremoveitem: function (event, index) { this.$dispatch( ChildWidget:remove, event.targetvm, index ); })

Template View Template(html) require # Tempalte <div class= widget > <div v-component="modal" v-ref="modal"></div> </div>

Filter Filter ViewModel module.exports require Filter Component ViewModel Vue.filter require filters # Filter module module.exports = { required: function required (val) { return!val? false : true; }, }; # ViewModel var filters = require(./filters ); var Invitation = module.exports = Vue.extend({ template: require('./invitaion'), filters: { validaterequired: function (val) { this.validation.email = filters.required(val); return val; }, } });

Resource plugin (superagent) WebAPI end-point resource var request = require('superagent-browserify'); module.exports = list; function list (params, fn) { params = params {}; var endpoint = /api/v1/xxx ; // } request.get(endpoint).query(params).withcredentials().end(fn); superagent: http://visionmedia.github.io/superagent/

Plugin vue-i18n: cookie locale v-t Vue.t Rails i18n like key # Entrypoint var cookie = require('cookie-cutter'); var Vue = require('vue'); var i18n = require('vue-i18n'); // locale setting var locale = cookie.get('locale') en ; Vue.use(i18n, { lang: locale, locales: { en: require('./locales/en.json'), ja: require('./locales/ja.json') } }); # Tempalte <div> <p v-t= foo.bar"></p> </div> vue-i18n: https://github.com/kazupon/vue-i18n

Vue.js app/ assets/javascripts.!"" Capfile!"" Gemfile!"" Gemfile.lock!"" README.md!"" Rakefile!"" app!"" config!"" config.ru!"" db!"" frontend!"" lib!"" log!"" public!"" script!"" spec #"" vendor

Vue.js - - UI - API -.!"" Makefile!"" gulpfile.js!"" index.js!"" lib $!"" api $ $!"" utils.js $!"" validates.js $ #"" widgets!"" locales $!"" en.json $ #"" ja.json #"" package.json

Gulp + Browserify JS JS app/assets/ javascripts application.js require Sprockets.!"" app $!"" assets $ $!"" images $ $!"" javascripts $ $ $!"" application.js $ $ $!"" bundle.js $ $ $ $ $ $ #"" zzz.js $ $ #"" stylesheets!"" frontend $!"" Makefile $!"" gulpfile.js $!"" index.js $!"" lib $ $!"" api $ $ $ $!"" utils.js $ $!"" validates.js $ $ #"" widgets $!"" locales $ $!"" en.json $ $ #"" ja.json $ #"" package.json

Rails Controller script require ViewModel JSON data # erb template <div id="widgets" v-cloak v-repeat="item: items" v-component="widget-item"></div> <script> (function () { var Widget = require('bundle').widget; var data = JSON.parse('<%= j(object.to_json).html_safe %>'); new Widget({ el: '#widgets', data: data }); })();

Vue.js Component - - Vue.js Component

Vue.js Component - Vue.js Component

jquery Vue.js

Vue.js UI Model $data Vue.render