docpad icon indicating copy to clipboard operation
docpad copied to clipboard

Get rid of Backbone Models for native javascript objects

Open balupton opened this issue 10 years ago • 3 comments

Now that javascript objects have native getters, setters, and mutation observers, we could actually get rid of backbone models.

This would remove a whole lot of confusion about why toJSON() is needed etc.

It would also pave the way to having queryengine have live collections for native javascript objects.


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

balupton avatar Jan 27 '14 20:01 balupton

:+1:

pflannery avatar Jan 27 '14 22:01 pflannery

I am calling toJSON here and there and i am quite sure that most of the time i should not. We are putting a lot of metadata in the documents from external systems and toJSON is slow. If it works without me having to think of it and having all the metadata without explicit get will be a great plus.

dimitarkolev avatar Jan 28 '14 08:01 dimitarkolev

This may actually help with memory consumption and performance too, so I've linked it to #529

balupton avatar Feb 19 '14 17:02 balupton