I feel approach 1 is not clean or safe, because it couples the back end and front end. Backend owner: In my current use case, the backend is owned internally, but an answer for both use cases would be helpful. ReservationEnd: backendData.reservationEnd, ReservationStart: backendData.reservationStart, Explicitly adopting a data structure from the back endĬonst backendData = queryBackend('/reservationdata/query').Implicitly adopting a data structure from the back endĬonst data = queryBackend('/reservationdata/query'). There are the following two ways of retrieving data from the back end (the example code assumes the retrieval of some reservation information from the back end). I'd like to figure out which way of receiving data from the back end is the better one (= clean, robust, and best practiced). I'm using a REST API to retrieve data from my back end at my front end.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |