Marionette.jsã¾ã¨ã ãã®1 Application, Controller, AppRouter Marionette.jsã¾ã¨ã ãã®2 View, ItemView, CollectionView Marionette.jsã¾ã¨ã ãã®3 CompositeView, Layout, Region Marionette.CompositeView Marionette.CollectionViewãæ¡å¼µãããªãã¸ã§ã¯ãã§ãã CollectionViewã¨éãããã³ãã¬ã¼ããè¨å®ããäºãã§ãã¾ãã itemViewContainer itemViewã®ã³ã³ããã¨ãªãè¦ç´ ãjQueryã»ã¬ã¯ã¿ã§æå®ãã¾ãã var FooItemView = Marionette.ItemView.extend({ template: '#itemTemplate' }); var Foo
ãã¥ã¼ããªã¢ã«ã®ç¶ãã ãããã伸ã°ããæãå¥ãããããããããããæ¬çªã Marionetteã®Viewã使ãã ã¾ããé·ãè¨äºã«ãªã£ãã®ã§ãå ã«ã½ã¼ã¹ããã¦ããã https://github.com/lxyuma/todo-mario ããããä½ããã® ååãæ°è¦ä½æformãä½ã£ãã®ã§ã æ°è¦ä½æããtodoã表示ããViewãä½ãã liã¿ã°ã§ãä¸ã¤ãã¤ã®Taskã表示ãã ulã¿ã°ã§ãããããæãã liã¿ã°ç¨ã®View(1ã¤1ã¤ã®Task) generatorãã¾ã使ãã $ yo marionette:itemview task --create-all --create-allãä»ããã¨ãtemplateãä½ã£ã¦ãããã åºæ¥ä¸ãã£ãã½ã¼ã¹ã«å¯¾ã㦠tagName: liãç´ã¥ãã liãã¯ãªãã¯ãããfinished:trueã«ãã¦ãç·ãå¼ãããã®ã§ã clickããã
marionette.jsã®ãã¥ã¼ããªã¢ã«ã®ç¶ãã ãããããã¯ã©ã¤ã¢ã³ãå´ã®è©±ã å ã«è¨ãã¨ãã¡ã¤ã³ã®marionetteã¯ããã®è¨äºã§ãªãããã®ï¼ãªã®ã§èªãã§é£½ãã¦ãããããã®ï¼ã«é£ã¶ã¹ãã ååã«å¼ãç¶ããgruntãèµ·åãã¦ããç¶æ ã§é²ããäºã ãããèµ·åãã¦ããªããã°ãgruntãèµ·åããã model åãã«model ãä½ãã railsã¿ããã«ãMVC,routerããããã®generatorãæºåããã¦ããã®ã§ãå¿è«ããã使ãã $ yo marionette:model task create app/scripts/models/task.js invoke mocha-amd:unitTest create test/spec/models/task.js conflict test/spec/testSuite.js [?] Overwrite test/spec
Marionette.jsã®ãã¥ã¼ããªã¢ã«ãæ¸ãã ç¹ã«ãyeoman製ã®generator-marionetteã使ã£ã¦ã railsã¿ããã«ã楽ããªãããé²ãã¦ããã éãå¤ããªã£ãã®ã§ãä½åº¦ãã«åãã¦æ¸ãã ãã®è¨äºã¯ãyeomanã«ããæºåãããnode+expressã«ãããµã¼ãã¼å´ã¾ã§ã(baucis ã¨ãã楽ãã³ãªä»çµã¿ã使ã) Marionette.jsã¨ã¯ï¼ ãã®åä½ã£ãslideããåèã«ã introduction to Marionette.js (jscafe14) from Ryuma Tsukano ã¤ã³ã¹ãã¼ã« 以ä¸ã®generator-marionetteã®githubã®ãã¼ã¸ãåç § https://github.com/mrichard/generator-marionette#install ç¹ã«ãããäºã¯ç¡ããå¤åãã projectä½æ proje
Marionette.jsã¯Backbone.jsã®ã©ããã¼çãªã©ã¤ãã©ãªã§ãã Backbone.jsã®åé¡ç¹ Backbone.jsã¯å²ã¨èªç±åº¦ãé«ããã¬ã¼ã ã¯ã¼ã¯ãªã®ã§ããã ããæ ã«ä¸è¦æ¨¡ä»¥ä¸ã®ããã¸ã§ã¯ãã§ä½¿ããã¨ãã㨠è¨è¨ãé£ããï¼ãã¹ããã©ã¯ãã£ã¹ããããããªã¬ãªã¬å®è£ ã«ãªãï¼ åæåãã¤ã³ã¹ã¿ã³ã¹ã®ç®¡çãé¢å Viewã¯åããããªå¦çãå¢ããï¼ã§åºåºã¯ã©ã¹ã«ã¾ã¨ãããããï¼ ã¨ãã£ããã¡ãªãããããã¾ãã å®éåãããããããªãã¾ã¾åæè¨è¨ãããçµæ 大ããªæè¡çè² åµãä½ã£ã¦ãã¾ã£ãäºãããã¾ããã Marionette.js Marionette.jsã¯Backbone.jsã¨æ¯ã¹ã¦æ½è±¡åº¦ãé«ãã ã¢ã¸ã¥ã¼ã«æ©æ§ãCollectionViewãViewã®ãã¹ãã©ã¯ã¿ãªã© ç¬èªå®è£ ã«ãªããã¡ãªæ©è½ãæä¾ãã¦ããã¾ãã ãããã使ãäºã§ä¸ã«æãããããªãã¡ãªãããåé¿ã B
3. ãªãMarionette? Backboneãå®éæ¸ãã¦ã¿ãã¨è²ã æ©ã â â èªç±åº¦ãé«éã â Viewã®è¦ªåãé ç½®çã人ã«ãã£ã¦ãã©ãã©ã§å¤§å¤ â â¡ç¨æãããmoduleã ãã§ã¯è¶³ããªã â ç¹ã«ViewãRouterãæ±ãã â â¢åãsourceã°ããè¨å¤§ãªéãæ¸ããã¡ã«... =>ãããã解決ããããã«Marionette 4. Marionetteã®è¯ãæ â â Viewã®æ§æãæ´çããã¦åããæããªã â Layout管ç(Viewã®é ç½®)ã®ä»çµã¿ããã â ã©ã®View使ããã§Viewã®è¦ªåé層ãæ確㫠â â¡éçºä½æ¥ã®å¹çå â ã¨ã«ããæ¸ãéãåå以ä¸ã«æ¿æ¸ï¼ â éãå°ãªãã®ã§ãèªãã®ã楽ã«ãªãï¼ â â¢ã½ã¼ã¹ãæ±ããªã â routerã¨Controlleråãã¦ãï¼ â ã¤ãã³ãé£æºã®ä»çµã¿ãæ´çããã¦ãï¼ 5. åï¼æ½è±¡åº¦ åãæ½è±¡åº¦ãé«ãããªããããªã
Backbone.js is quickly becoming the most popular framework for building modular client-side JavaScript applications. To help you tap the full potential of Marionette, Joseph Zimmerman prepared an entire eBook full of useful hands-on examples! To help you tap the full potential of Marionette, weâve prepared an entire eBook full of useful hands-on examples which is also available in the Smashing Lib
In this series of posts, weâll cover writing a simple Backbone.js application as a primer. You can see the live result here. The original application is at https://github.com/ddellacosta/backbone.js-examples/tree/master/collections3 and all design assets (CSS, images, etc.) are from there. This tutorial will show you how to use Derick Baileyâs Backbone.Marionette to build a simple application. But
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
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}