The way we set the region is by passing a jQuery selector to the area we want to use. one region for the navigation menu, another for the main content, etc. However, more complex apps will be able to use multiple regions to better breakdown the application’s complexity, using e.g. Since our application is simple, we’ll be using only one. This region corresponds to an area that we will use in our application. Within that file, we’ll start a Backbone.Marionette application, and add a region to it ( code): The first thing we’ll do is include our application within a javascript file that we include in index.html. So go ahead and grab the zipped archive containing all you need to get started, or get the initial commit from github. Since this is a tutorial, we’ll start with all the necessary static assets already in place (CSS, libraries, etc.). It guides you through developing a complete Marionette application, and will teach you how to structure your code so large apps remain manageable.Īlso, since this tutorial was written, Marionette has evolved with new functionality and better techniques to write scalable javascript apps. Update (June 2013): I’ve written a book on Marionette. You can also follow along by checking out out each git commit. Simple, no? Besides, on the internet, everybody likes cats -) If you want to skip ahead and checkout the code, it’s on Github and you can see it in action on this jsFiddle (the image assets have been replaced with placeholders). So what’s the app going to be? It will simply allow cats to be ranked within a list: click “up” the cat is more popular, click “down”, the cat is less popular. But beyond getting a simple walkthrough, you’ll also be able to compare the app we write to the original, and see how Backbone.Marionette makes your life easier when writing Backbone apps. This tutorial will show you how to use Derick Bailey’s Backbone.Marionette to build a simple application. The original application is at and all design assets (CSS, images, etc.) are from there. In this series of posts, we’ll cover writing a simple Backbone.js application as a primer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |