I am very much an amateur developer. I have written a web app which uses parse-server as a backend.
My question revolves around how agnostic the frontend should be to the backend (parse server)?
For example, on the client side (browser), I query the parse-server for data - let's say using function
GetData(). My web app then renders that data to the user - say, using
GetData() returns an array of Parse Objects - so the client side rendering function requires the data is an array of Parse Objects.
Essentially, my code is locked into using parse-server. If I ever decided to I wanted killer feature 'X' that's only available in, say, Firebase then I can't move easily.
For me, I have no plans to move backend but wanted to know how this is done in the professional circles?
ShowData() be written in such as way that it requires the data in a generic format (e.g. JSON); and
GetData() would ensure that whichever backend is used (parse, firebase, etc) it would always return data in the same format (JSON or whatever)?
Or is the way I have done it perfectly normal?