docpad
docpad copied to clipboard
Get rid of Backbone Models for native javascript objects
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.
:+1:
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.
This may actually help with memory consumption and performance too, so I've linked it to #529