14 May 2015 P8.0

I’ve updated my book with the following changes:

  • the filtered collection has been corrected, as I realized during testing for my new book ( https://leanpub.com/marionette-testing) that it’s possible for a model definition to have a collection property. Therefore, the fallback code covering that case has been removed.

Happy coding.

22 April 2015 P7.0

I’ve updated this book to remove functionality marked as deprecated since Marionette 2.3.

Please download a copy of the current code base if you plan on continuing to use it: it is temporarily available at github.com/davidsulc/marionette-gentle-introduction/archive/master_old.zip.

The changes are:

`addInitializer` has been removed. Instead, we simply add an event listener for the `start` event. Check out sub-chapter “Adding a router to ContactsApp” (p. 71) for an example.

Regions are no longer used. This lead to the following changes:

  • `addRegions` isn’t used to add regions to our app anymore. Instead, we create a top-level LayoutView to hold our sub-views. Take a look at chapter “Displaying a static view” (p. 5) to see how that plays out.
  • Naturally all calls to `XXXRegion.show()` have been replaced with `regions.XXX.show()` (search for `regions.main.show`, for an example).
  • We’ve also had to replace our `dialogRegion`: instead of having a dedicated Region sub-class to handle dialogs, we implement the desired behavior on the `regions.dialog` view container instance. Refer to chapter “Managing dialogs with a dedicated region” to see what I mean.

In addition, the persistance management code has been revamped. This is for compatibility reasons with the book on testing I’ve started working on (read more about it at leanpub.com/marionette-testing). You can consult the updated code in chapter “Using web storage for persistance” (p. 235).

That’s all for now, I hope you’re enjoying reading!

28 January 2015 P6.0

Fixed some minor typos and updated URLs for some libraries used in the book.

13 October 2014 P5.0

This release fixes a few minor typos.

09 July 2014 P4.0

The book has been updated for Marionette 2.0. Here are the changes made :

  • the application’s “initialize:before” and “initialize:after” lifecycle events have become “before:start” and “start” respectively
  • the itemView collection/composite view property is now called “childView”, itemViewContainer became childViewContainer, and the “itemview:” events prefix is replaced by “childview:”
  • the “appendHtml” function is now called “attachHtml”
  • the Layout view is now called LayoutView

In addition, a new feature (`getOptions`) has been covered in the “Handling Data Latency” chapter (or look at commit).

Naturally, this updating process meant all of the Git commits and book content had to be modified and updated, which is extremely error prone. Hours have been spent going through each commit in the book, and the book text itself to make sure everything is in working order. Should some mistakes have crept in, don’t hesitate to report them on the book’s errata page.

02 April 2014 P3.0

  • only “<%- %>” is used to output content. The original book used “<%= %>” which doesn’t except HTML and was a major brain fart on my part (it can lead to XSS issues, e.g.);
  • the last update indicated that Backbone couldn’t parse query strings anymore. Well guess what: it now can again using the new “execute” function (see page 171);
  • content was added at the end of the “Extending from base views” chapter, refactoring the code to use a “triggers” hash;
  • documentation links to request-response and commands have been update, as they’ve moved on the Marionette site;
  • a bonus chapter from my latest book has been added, covering how to connect to a remote API.

That’s all for now, enjoy building your apps!

28 January 2014 P2.0

There was a bug in the app (see github.com/davidsulc), where if you deleted all the contacts and tried creating a new one, the app would throw an error. This was due to using local storage (where we need to specify model ids manually) and incorrectly assuming the contacts collection is populated when computing the highest id.

The code repository has been updated, as well as the code sections in the book refering to it (p. 148 where it gets introduced, and p. 166 where it is displayed again). Please note that YOU MUST UPDATE the book in order for the Git commit references to be correct (and for the links to the online repository to work).

Minor update to fix the Bootstrap site link.

11 November 2013 P1.0

First electronic release.

×