I am sure this is a common issue, but cannot get a good way of thinking about it.
We have a frontend where users can view, filter data etc.
Sometimes the data is formatted to make more sense, e.g. error_level is 0 and shown as “Warning”. etc.
The data is also localised when it makes sense.
Filter requests are passed through the API, translated into SQL, and executed on the DB.
The aim is to filter localised and formatted data.
Here are a few ideas:
- Show ‘options’ in frontend, i.e. HTML select to do the formatting and localisation etc.
- problem, only works for a knowable finite list of options
- do all localisation / formatting in database view (the ‘Joe Armstrong option’)
- localisation tools aren’t readily available
- do localisation / formatting in backend / frontend
- effectively have to duplicate filtering functionality in backend or frontend
Any thoughts, more ideas? Perhaps I am thinking too much about this, and the answer is obvious…