Open nijotz opened 10 years ago
Ugh, I tried writing a "emberify" post-processor for flask-restless and it's gotten messy. It initially worked to simply re-arrange the data to what ember was expecting and just ignore referenced/referencing data and skip sideloading. But trying the post-processor approach for sideloading is messy 1) recursing into one-to-many and many-to-one relationships and trying to sideload those, while working with data that's already been queried and trying to re-arrange existing data 2) specifically removing data when flask-restless didn't load the many-to-one relationships, which ember will take to many there are no referencing objects 3) not being able to control the depth of recursion
I'm going to try flask-restful and write my own generic function that will introspect a sqlalchemy model and handle json conversion to the format ember.js expects, sideloading referenced/referencing data to whatever depth of relationship chasing I prefer
Some parts of the interface are super slow. Like the queue page. The rest call returns the song IDs, at which point the interface has to make n more calls for each song in the queue to get more info about the song.