Boris Staal edited this page Feb 11, 2014 · 50 revisions
Clone this wiki locally


1.2 Feather

Road Map

Migration Guide

Backward Compatibility Violations

  • Joosy.Modules.Container renamed to Joosy.Modules.DOM
  • Joosy.Application.initialize has lost the first argument and is not aware of "application name" anymore. Applications in fact don't have names at all. Instead it accepts {templater: {prefix: '...'}} as one of possible options to achieve the same result – make templater use prefixed JST paths.
  • elements:, events: and widgets: are now: @mapElements, @mapEvents and @mapWidgets
  • @container renamed to @$container
  • elements are getting assigned to @$name instead of @name
  • elements are now lambdas: use @$element() instead of @element. Lambdas make them both lazy-loadable and always actual. Therefore @refreshElements is now obsolete and deprecated.
  • @refreshElements and @onRefresh do not exist anymore! If you used them to reload your elements – drop it. Otherwise (and this probably mean you override it) – remove super and consider renaming it for a better semantic.
  • First arguments of events are now wrapped into jQuery
  • The deprecated mode of Events.unbind when it was able to unbind by callback is removed. Proper way to unbind:
binding = entity.bind 'event'
entity.unbind binding
  • @helpers method of Page, Layout, Widget was renamed to @helper and changed behaviour. To make it include module of Helpers you should pass an object directly: @helper Joosy.Helpers.Foobar. If, on the other hand, you pass a string, it will proxy local method as a helper: @helper 'method'
  • Helper @widget now accepts up to three parameters (instead of two). CSS-like class assignation is not supported anymore. Use third parameter instead:
@widget 'div.class', ...               # deprecated
@widget 'div', {class: 'class'}, ...   # actual
  • @yield() for layout template is gone! Instead of that you should use @page helper that accepts two arguments: tag to use as a wrapper for the page content and attributes to assign to the tag (id can not be set):
!= @page 'div', class: 'content'
  • Joosy.Module.alias is now Joosy.Module.aliasMethodChain
  • Joosy.Module.aliasStatic is now Joosy.Module.aliasStaticMethodChain
  • Joosy.preloadImages removed in favor of existing jQuery plugins that can now be included via Bower
  • @tag helper was split into @tag and @contentTag having Rails-compatible interface
  • Joosy.Resources.Base doesn't exist anymore
  • Joosy.Resources.REST callbacks interface changed to Node.js style with error as a first argument (error, instance, data, xhr) ->
  • Joosy.Resources.REST#find doesn't accept 'all' anymore. It has #all instead
  • Joosy.Events.Namespace is not accessible publicly anymore. Use #eventsNamespace instead
  • Joosy.Resource namespace renamed to Joosy.Resources
  • Resources collection are deprecated in favor of new Joosy.Resources.Array
  • Resources are not function by default anymore (.get('field') and .set('field', 'value) instead). It's now optional by @extend Joosy.Modules.Resources.Function.
  • Resources do not include Identity Map by default anymore. It's now optional by @extend Joosy.Modules.Resources.IdentityMap.
  • REST Resources do not include direct methods named by HTTP methods (.put, .get, ...). Instead they define two methods: .send and #send that have similar interface and accept method as a first argument.
  • Resources, Form and Preloaders are not included into core anymore.
    • Resources can be additionally included from #= require joosy/resources
    • Form IS DEPRECATED but still can be additionally included from #= require joosy/form
    • Preloaders ARE DEPRECATED in favor of Sprockets::Preload



  • Core assets separated from Ruby and switched to Node builders and environment
  • Node-based static project generators and builders
  • Bower-based dependency management
  • Rails integration separated from Sprockets and moved into joosy-rails gem
  • Resources and Form separated from core
  • Complete AMD support
  • Core (without Resources and Form) can work with either jQuery or Zepto
  • Overall API interface became totally consistent
  • Full HTML5 History support (including comfortable default bindings)
  • Resources rewritten and now include a set of base-level generics for scalars, hashes and arrays
  • Joosy does not depend on Sugar.js internally anymore. It is still included by default but switching it off doesn't blow anything!


  • Feather ships with built-in ES5 shims
  • Resources got new methods to interact with forms and save data
  • Numerous potential sources of memleaks eliminated
  • Joosy Router (working in hashchange mode) is not limited to '#!' anymore. '#' is default but any path prefix can be used using Joosy.Router.prefix.
  • Core code decoupled. Modules can now be loaded separately from main Application workflow:
#= require joosy/modules/events

class Foo extends Joosy.Module
  @include Joosy.Modules.Events
  • Mapping moved from attributes to class helpers:
# before
elements: {}
events: {}
widgets: {}

# now
@mapElements {}
@mapEvents {}
@mapWidgets {}
  • Elements mapping extended
  container:                           # Deep nesting support
    element: '.selector'
  foo: '$container.$element .bar'      # Selectors inlining

# Assignees made to start with $
@$container.$element()  # '.selector'                
@$foo()                 # '.selector .bar'
  • Joosy.Modules.Resources.Cacher added to the core.
  • Resources allow to define attribute accessors (including nesting fields) working as JS properties


  • Multiple events allowed to be specified within 'mapEvents'
  • Widgets made to support beforeLoad
  • Events extended with unwait method that works just like unbind but for wait