-
Notifications
You must be signed in to change notification settings - Fork 21
Home
Boris Staal edited this page Feb 11, 2014
·
50 revisions
-
Joosy.Modules.Containerrenamed toJoosy.Modules.DOM -
Joosy.Application.initializehas 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:andwidgets:are now:@mapElements,@mapEventsand@mapWidgets -
@containerrenamed to@$container -
elementsare getting assigned to@$nameinstead of@name -
elementsare now lambdas: use@$element()instead of@element. Lambdas make them both lazy-loadable and always actual. Therefore@refreshElementsis now obsolete and deprecated. -
@refreshElementsand@onRefreshdo not exist anymore! If you used them to reload your elements – drop it. Otherwise (and this probably mean you override it) – removesuperand consider renaming it for a better semantic. - First arguments of
eventsare now wrapped into jQuery - The deprecated mode of
Events.unbindwhen it was able to unbind by callback is removed. Proper way to unbind:
binding = entity.bind 'event'
entity.unbind binding-
@helpersmethod of Page, Layout, Widget was renamed to@helperand 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
@widgetnow 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@pagehelper 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.aliasis nowJoosy.Module.aliasMethodChain -
Joosy.Module.aliasStaticis nowJoosy.Module.aliasStaticMethodChain -
Joosy.preloadImagesremoved in favor of existing jQuery plugins that can now be included via Bower -
@taghelper was split into@tagand@contentTaghaving Rails-compatible interface -
Joosy.Resources.Basedoesn't exist anymore -
Joosy.Resources.RESTcallbacks interface changed to Node.js style witherroras a first argument(error, instance, data, xhr) -> -
Joosy.Resources.REST#finddoesn't accept 'all' anymore. It has#allinstead -
Joosy.Events.Namespaceis not accessible publicly anymore. Use#eventsNamespaceinstead -
Joosy.Resourcenamespace renamed toJoosy.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:.sendand#sendthat 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
- Resources can be additionally included from
- 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-railsgem -
ResourcesandFormseparated from core - Complete AMD support
- Core (without
ResourcesandForm) 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
Applicationworkflow:
#= 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
@mapElements
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.Cacheradded 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
unwaitmethod that works just likeunbindbut forwait