signal-noise / datasupply

Data Supply is an opinionated data processing, provision and presentation library of components for Javascript
MIT License
0 stars 0 forks source link

Breakdown of Uniform #3

Closed digitaljohn closed 3 years ago

digitaljohn commented 4 years ago

Just a start... will fill out more shortly.

Check here: https://github.com/signal-noise/uniform/blob/breakdown/breakdown.md

digitaljohn commented 4 years ago

Started playing with code to discover architectural decisions. Feedback welcome at this point. Not all problems have been figured out yet :)

tomgp commented 4 years ago

I like the idea of a schema at the import stage.

Unlike Marcel I'm not convinced we need a query syntax though, if we're not having a relational model and we're mostly dealing with 'rectangular' data then basic array methods are pretty powerful. If we do need something higher level then taking a few bits of lodash or some other non-opinionated array manipulation library seems a lower bar both in terms of on-boarding people and maintenance

Maybe provide a suite of accessor methods for filtering?

const countrySelector = selectOnProperty('country');
const listOfCountries = fullData.filter( countrySelector('GB') )
digitaljohn commented 4 years ago

I like the idea of a schema at the import stage.

Unlike Marcel I'm not convinced we need a query syntax though, if we're not having a relational model and we're mostly dealing with 'rectangular' data then basic array methods are pretty powerful. If we do need something higher level then taking a few bits of lodash or some other non-opinionated array manipulation library seems a lower bar both in terms of on-boarding people and maintenance

Maybe provide a suite of accessor methods for filtering?

const countrySelector = selectOnProperty('country');
const listOfCountries = fullData.filter( countrySelector('GB') )

Your example needs the full data in the frontend to be able to get just one country. We need to be able to filter at query time I think?

marcelkornblum commented 4 years ago

I like the idea of a schema at the import stage. Unlike Marcel I'm not convinced we need a query syntax though, if we're not having a relational model and we're mostly dealing with 'rectangular' data then basic array methods are pretty powerful. If we do need something higher level then taking a few bits of lodash or some other non-opinionated array manipulation library seems a lower bar both in terms of on-boarding people and maintenance Maybe provide a suite of accessor methods for filtering?

const countrySelector = selectOnProperty('country');
const listOfCountries = fullData.filter( countrySelector('GB') )

Your example needs the full data in the frontend to be able to get just one country. We need to be able to filter at query time I think?

Surely an interface similar to the above would be able to execute a server-side query for just the filtered data using lazy loading?

Either way I think we're closer to agreement than not ...