NestedTypes icon indicating copy to clipboard operation
NestedTypes copied to clipboard

Factor out object+ and Events mixin

Open gaperton opened this issue 9 years ago • 5 comments

Move core infrastructure to the separate npm package.

Events will become dependency-free. Currently it uses following things from underscore: keys, uniqueId, isEmpty, size, bind, once.

Events unit test must be taken from backbone 1.2 regression.

Events must be optimized for JIT (thus, performance test needs to be added).

gaperton avatar Feb 23 '16 17:02 gaperton

:+1:

far-blue avatar Mar 08 '16 17:03 far-blue

Done in 'develop' (src/object-plus), to be released as separate package when 2.0 will be released.

gaperton avatar Aug 01 '16 23:08 gaperton

Here. Mostly works. Awaiting to be published to npm. https://github.com/Volicon/object-plus

gaperton avatar Sep 02 '16 15:09 gaperton

looks really interesting :) I'll have to evaluate how well it will work for us as we currently require IE9 support. We are not a TypeScript team so will need to work out how to mentally translate TS docs into JS :) But it would be great to swap out our own backbone-like extending 'class' object with Object+ and gain the additional functionality and the optimisations :)

far-blue avatar Sep 02 '16 22:09 far-blue

It believe it shouldn't be the big deal to make this thingy IE9-compatible. If it's not yet.

In addition to standard backbone .extend and Events, you have mixins and native properties definitions. Events should work a bit faster. Especially when you use Messenger base class.

gaperton avatar Sep 03 '16 01:09 gaperton