2015/05/27 Data Binding JS Night
ModelãViewãªã©ã®å ´å Backbone.jsãCoffeeScriptã§æ¸ãæãBackbone.ModelãBackbone.Viewã®ç¶æ¿ã¯ãã¨ãã°ãããªæ¸ãæ¹ãã§ããã # model class Hoge extends Backbone.Model constuctor: -> super @set fuga: 'fuga' # View class HogeView extends Backbone.View constuctor: -> @model = new Hoge super fuga: -> @model.get 'fuga'
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
Backbone.js provides structure to JavaScript applications, but it leaves a lot of design patterns and decisions up to developers who end up running into common problems when they first begin developing in Backbone.js. In this article, Phillip Whisenhunt will explore different design patterns that you can use in your Backbone.js applications, and heâll look at many of the common gotchas that trip u
backbone.marionettegithub.com/marionettejs/backbone.marionette Backboneã§ä½¿ããç´°ããé¨åãã³ã³ãã¼ãã³ãåãã¦åå©ç¨å¯è½ã«ããã³ã³ã»ããã㪠ãªã©ã¤ãªã¼æ¬ã§ã説æãï¼ç« ãã£ãã®ã§å¾ã§è¦ã¦ã¿ã addyosmani.github.com/backbone-fundamentals/#backbone.marionette å ¸åçãªrenderã¨ãã¯æ¸ããªãã¦ãæ¸ãã¦ããã®ã§ã³ã¼ããæ¸ãéãæ¸ãããã¾ã³ãViewã¨ããããã¡ã¢ãªç®¡çã®åé¡ãRegionã¨ããæ¦å¿µã§ãã¾ãå¦çããLayoutã¨ããUIãå®ç¾©ããViewãçµã¿åããããã¨ã§å¯èªæ§ãé«ããªãCompositeViewã§é¨ååããã§ææããã¦ãã®ã¯å¤åãããªæã ä¼¼ããããªã³ã¼ããããããçç£ãããããªå ´åã¯çç£æ§ããããã®ãã ã°ãã°ãã§ããã©ã13åããããã
I was looking for a way to allow two Backbone.Views to exchange information between them. Here are some solutions to this problem: 1. The bad idea We could just let them reference each other. Then view1 could say this.view2.doSomething() and itâs the easiest way to solve this. However simple it may be, this will lead to a very tight coupling and a very bad design for our web app. If we have a circ
ããã¯ä¼ç¤¾ã§vue.jsãæ¡ç¨ã説å¾ããããã®è³æãªã®ã§stickitãç½µåãã vue.js http://vuejs.org/ backbone.stickit http://nytimes.github.io/backbone.stickit/ Backbone.stickitã¨Vue.jsã®æ¯è¼ ã#menuãæ¼ãããå³ã«100pxåããã¿ãããªã³ã¼ããæ¸ãã¦ã¿ãã¨ããã templateé¢æ°ã¯Jadeãã³ãã¬ã¼ããå±éããé¢æ°ã ã¨æã£ã¦ã»ãã Backbone.stickit ã®å ´å class MenuView extends Backbone.View initialize: -> @model = new Backbone.Model() @render() render: -> @$el.html template(""" #menu.js-open """) @stic
Backbone is a hugely popular MV* framework because it gives you a ton of freedom of implementation. There is no one "Backbone way" to accomplish most coding tasks. This freedom is wonderful when you need it, but when you don't, Backbone's lack of official guidance makes it easy to stray into some bad patterns. When writing new code, try following these rules, and you'll likely find that your code
ããã使ãã°OKç§å ´ã https://github.com/fnando/i18n-js Gemfile gem 'i18n-js' application.js //= require i18n //= require i18n/translations configãã¡ã¤ã«çæ bundle exec rake i18n:js:setupâ»ãã³ãã¯ãã®ããã»ã¹ã¯è¦ããªãã®ã ãã©ãsprocketã®ãã°ã®ããã§å¿ è¦ããããhttps://github.com/fnando/i18n-js/issues/71 application.html.erb <script type="text/javascript"> I18n.defaultLocale = "<%= I18n.default_locale %>"; I18n.locale = "<%= I18n.locale %>"; <
ããã¾ãã®ã㤠ã©ãããBackbone.js Advent Calendar 2014åã³CYBIRDã¨ã³ã¸ã㢠Advent Calendar 2014 3æ¥ç®ã®@dekokunã§ãã æ¨æ¥ã¯ãBackbone.jsã®ã»ãã@okameããã®Backbone.Routerã«æéç¶æ é·ç§»æ©æ¢°ãç°¡åã«å®è£ ã§ããã©ã¤ãã©ãªãä½ã£ãã§ãããã¡ããã©ãç»é¢é·ç§»ã®éã®ã¢ãã¡ã¼ã·ã§ã³è¨è¨ããã¦ããã¨ãããªã®ã§ãå®è£ ã®åèã«ããã¦ããã ãã¾ãï¼ï¼ï¼ CYBIRDã®ã»ãã¯@t-kashimaããã®å¹³æçã¾ãã¨ã¤ã³ã¿ã¼ãããã§ããããå¹³æçã¾ãã®å¾è¼©ãããã£ã¦ããã®ãã¾ãè¡æã§ããããå¦çé¨ãããã§ãããç§ãå¦çé¨å ¥ãããã£ãã æ¬æ¥ã®å 容ã1è¡ã§ Backbone.Modelã®setã¡ã½ããã¯ç¾å¨ã®attributeã¨setããattributeã_.isEqualã¡ã½ããã§æ¯è¼ãã¦å¤ãå¤åãããã©ãã
Backbone.jsã§æ¸ãå§ããããBackboneã©ãï¼ãã¨èããããã¨ããã£ãã®ã§ãèªåã§ã¯ããã¾èªããã»ã©ç¥ããªããã©ããããã¸ãã®è¨äºã¯ç´ æ´ããããï¼ãã¨ãããã®ãã¾ã¨ãã¦ãããã½(ã»Ïã»Â´)ã ã¾ãã¯èªãã§ããã¹ããã® Backbone.js Advent Calendar 2011 ãªã«ã¯ã¨ãããã¾ãã¯Backbone.js Advent Calendar 2011 ããç¨åº¦ã¾ã§æ¸ããããã«ãªãæ å ±ã¯ç·ãããã§æ¸ãã¦ããã¨æãã ä¸ã§ãBackbone.jså ¥éã¯ããããããèªãã§ããã°åºæ¬ã®ä»çµã¿ãç¥ããã¨ãåºæ¥ãã Backbone.jsãä¾åãã¦ããunderscore.jsã®æ å ±ãªããããã£ãããã¦ãããããã ã¡ãªã¿ã«ä»å¹´(2012)ã®Advent Calendarã¯ãã¡ããä»ã¯ã¾ã å§ã¾ã£ãã°ããã ããæ å ±å°ãªããã©ããããå å®ãã¦ããã ããã楽ãã¿ï¼Â´Ïï½ï¼ Ba
Help us understand the problem. What is going on with this article? ãã®è¨äºã¯ãGunosy Advent Calendar 2014ãã®21æ¥ç®ã®è¨äºã§ãã Gunosyã®åºåé ä¿¡ãã¼ã ã§Javascriptããããããã£ã¦ãaitaã§ãã æè¿Gunosyã«å ¥ç¤¾ãã¾ãããããã³ãã¨ã³ãã¨ã³ã¸ãã¢ã§ã¯ãªãã ä»å¹´ã¯Marionette.jsãããããªã¨ãã§ä½¿ã£ã¦ãã®ã§ãMarionette.jsã®ç´¹ä»ãã¾ãã Marionette.jsã®åã³ã³ãã¼ãã³ãã«ã¤ãã¦ã¯ã ããã¥ã¡ã³ãã¨ã½ã¼ã¹èªãã®ãä¸çªã ã¨æãã®ã§æ¸ãã¾ããã ä½æ ãMarionette.jsã使ãã®ã AngularJS使ããããªãããã¨ããã®ã¯åååè«ã§ãã åãMarionette.jsã使ãå§ããçç±ã¯ãBackbone.jsããã¨ãã¨æ¡ç¨äºä¾ããã£
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}