// http://bl.ocks.org/mbostock/3885304 var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; var formatPercent = d3.format(".0%"); var x = d3.scale.ordinal() .rangeRoundBands([0, width], .1); var y = d3.scale.linear() .range([height, 0]); var xAxis = d3.svg.axis() .scale(x) .orient("bottom"); var yAxis = d3.svg
Single Page Application ã§ã¯ãªãå ´å JavaScript ã³ã¼ãã®ã¨ã³ããªãã¤ã³ãã¯ã©ãã«ããã¹ããï¼ - @kyanny's blog Backbone.Routerã¯åºæ¬çã«history APIãhashchangeã使ã£ãSPAã®ããã®ã«ã¼ãã£ã³ã°ããã¦ããããã®ãªã®ã§ãSPAãããªãå ´åã«ä½¿ãã®ã¯ããã¾ããªã¹ã¹ã¡ã§ããªãã æ¹æ³ã¯è²ã ã ã¨æããã©ãèªåã®å ´åã¯ããããã±ã¼ã¹ã§ã¯æ¬¡ã®ãããªç°¡æçãªURL Dispatcherãæ¸ãã¦å¯¾å¿ãããã¨ãå¤ãã dispatcher.js ããããããªæãã§ä½¿ãã // main.js new Dispatcher() .route('.*', 'Common') .route('/', 'Top') .route('/user/([^/]+)', 'User') .dispatch({ path: locatio
ä»äºã§ä¸è¦æ¨¡ç¨åº¦ã® Rails ã¢ããªã±ã¼ã·ã§ã³ã®ã³ã¼ããã¼ã¹ãããã£ã¦ããããã®ã¢ããªã¯ãã¨ã㨠app/assets/javascripts 以ä¸ã«å¿ è¦ã«å¿ã㦠JavaScript ãã¡ã¤ã«ãç½®ããé©å½ãªãã³ãã¬ã¼ããã¡ã¤ã«ããç´æ¥ JavaScript ã®é¢æ°ãå¼ã³åºããããã¦ãããããæ®éã® Rails ã¢ããªã§ããã ãã®ã¢ããªã¯ CMS ã§ããããããããã°ã®ç®¡çç»é¢ãã¿ãããªç¨éã§ä½¿ããã¦ãããä¸é¨ã®æ©è½ã¯ãããªãã«è¾¼ã¿å ¥ã£ã UI æä½ãå¿ è¦ã¨ããã¼ã¸é·ç§»ãªãã«æä½ã§ããå¿ è¦ãããããæ§æ¥ã®ããæ¹ã§ã¯ JavaScript ã³ã¼ãã®ç®¡çãéã«åããªããªã£ã¦ããã®ã§é¨åçã« Backbone.js ãå°å ¥ãå§ãã¦ããã æè¿æ©ãã§ããã®ãã Backbone.js ãªã³ã¼ãã®ã¨ã³ããªãã¤ã³ããã©ã®ããã«å¼ã³åºãã¹ããªã®ãï¼ã¨ãããã¨ãããããèªåã Backbone.js
æè¿Marionette.jsã使ã£ã¦ããã®ã§ãã®è©±ã社å åå¼·ä¼ã§ãã£ãè³æã§ãã https://speakerdeck.com/koba04/marionette-dot-js-in-single-page-application SinglePageAppãBackbone.jsã§ã¤ãããã¨ããã¨ã©ããã¦ãViewå¨ãã§ç¬èªå®è£ ãããããå¾ãªãã¦ãã§ããªã¬ãªã¬ãã¬ã¼ã ã¯ã¼ã¯ã¯ä½ããããªããªãã¨æã£ã¦ãã¨ãããMarionette.jsãããæãã«ãã£ã¦ãããã®ã§ãã®è¾ºãã«ã¤ãã¦æ¸ãã¦ãã¾ãã è足(Marionette.jsã¨Angular.js) Marionette.js åã®ããã¸ã§ã¯ãã§ã¯Angular.jsã使ã£ã¦ãã¦ä»åBackboneç³»ãªMarionette.jsã使ã£ã¦ã¿ã¦ã®ææ³ã¨ãã¦ã¯ãMarionette.jsã¯Viewå¨ããå«ãæ§é åãã¦æ¸ããã¨ãåºæ¥ã¦ã¡ã¢ãªç®¡
Marionette.jsã®Viewå¨ãã«ã¤ãã¦ãä¸å¿ã«Single Page Applicationãä½ãã¨ãã®è©±
http://browserify.org/ browserifyã¯browserç°å¢ã§ãnodeã®ããã«require('xxx')ã¨ããã¹ã¿ã¤ã«ã§ä¾åãã¦ããã©ã¤ãã©ãªãèªã¿è¾¼ããã¨ãåºæ¥ãããã«ãªããã®ã§ãæè¿çãä¸ãã£ã¦ã¾ããã (Backboneãªã©è²ã ãªããã¸ã§ã¯ãã§browserifyã«ã¤ãã¦è°è«ããã¦ããã) ããã§ã¯åºæ¬çãªä½¿ãæ¹ã¯çç¥ãã¦ãBackbone + Marionetteãªãµã³ãã«ããã¸ã§ã¯ããbrowserify対å¿ãã¦ã¿ãã®ã§ãã®æ§æã«ã¤ãã¦ãæ¸ãããã¨æãã¾ãã (ã¾ã å ¨ç¶ç解åºæ¥ã¦ãªãã®ã§ããã£ã¨ããæ¹æ³ãããã°æãã¦æ¬²ããã§ã) Sample Project https://github.com/koba04/backbone-boilerplate http://koba04.com/last-fm-top-tracks/ ãµã³ãã«ããã¸ã§ã¯ãéã
I was trying to use underscore.js templates for templating in a rails 2.3 app which does not have jammit as an asset packager. Here is the simple Template: <script type="text/template" id="q-template"> <div class="current-body"> <span class="q-index"><%= title %></span> <span class-"q-text"><%= body %></span> </div> </script> Rails tries to parse these as erb variables and throws an ArgumentError.
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
ãã®ãµã³ãã«ã§ã¯ãä¸åã¯ãªãã¯ããã¨ä»ã®ãactiveãããªããªããä½ã£ãViewã®ã¤ã³ã¹ã¿ã³ã¹ããManagerã«ã´ããã´ãã追å ãã追å ãããviewããã¾ã¨ãã¦ã¢ã¯ãã£ãã«ãããããªãã£ãããããããªãã¨ãããã ãã®ã¯ã©ã¹ãä½ãã # ============================================ # Abstract things # ============================================ class Manager _.extend @::, Backbone.Events add: (item) -> @items ?= [] @items.push item deactivateAll: -> _.each @items, (item) -> item.deactivate() @trigger 'deactivat
Spring Bootã«ããAPIããã¯ã¨ã³ãæ§ç¯å®è·µã¬ã¤ã 第2ç ä½å人ãã®éçºè ããInfoQã®ããããã¯ãPractical Guide to Building an API Back End with Spring BootããããSpring Bootã使ã£ãREST APIæ§ç¯ã®åºç¤ãå¦ãã ããã®æ¬ã§ã¯ãåºçæã«æ°ãããªãªã¼ã¹ããããã¼ã¸ã§ã³ã§ãã Spring Boot 2 ã使ç¨ãã¦ãããããããSpring Boot3ãæè¿ãªãªã¼ã¹ãããéè¦ãªå¤...
Listing all Backbone.js plugins
3. ãªãMarionette? Backboneãå®éæ¸ãã¦ã¿ãã¨è²ã æ©ã â â èªç±åº¦ãé«éã â Viewã®è¦ªåãé ç½®çã人ã«ãã£ã¦ãã©ãã©ã§å¤§å¤ â â¡ç¨æãããmoduleã ãã§ã¯è¶³ããªã â ç¹ã«ViewãRouterãæ±ãã â â¢åãsourceã°ããè¨å¤§ãªéãæ¸ããã¡ã«... =>ãããã解決ããããã«Marionette 4. Marionetteã®è¯ãæ â â Viewã®æ§æãæ´çããã¦åããæããªã â Layout管ç(Viewã®é ç½®)ã®ä»çµã¿ããã â ã©ã®View使ããã§Viewã®è¦ªåé層ãæ確㫠â â¡éçºä½æ¥ã®å¹çå â ã¨ã«ããæ¸ãéãåå以ä¸ã«æ¿æ¸ï¼ â éãå°ãªãã®ã§ãèªãã®ã楽ã«ãªãï¼ â â¢ã½ã¼ã¹ãæ±ããªã â routerã¨Controlleråãã¦ãï¼ â ã¤ãã³ãé£æºã®ä»çµã¿ãæ´çããã¦ãï¼ 5. åï¼æ½è±¡åº¦ åãæ½è±¡åº¦ãé«ãããªããããªã
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
Backbone's only hard dependency is Underscore.js ( >= 1.8.3). For RESTful persistence and DOM manipulation with Backbone.View, include jQuery ( >= 1.11.0). (Mimics of the Underscore and jQuery APIs, such as Lodash and Zepto, will also tend to work, with varying degrees of compatibility.) Getting Started When working on a web application that involves a lot of JavaScript, one of the first things yo
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}