I'm build an JS app that posts restaurant suggestions to users via a simple chat interface. I'm trying to reverse-engineer the movie assistant app, but I’m not sure how to write the part where the JS app posts data from DB to the UI. Unlike the movie assistant I would be using a simple text interface similar to the one the dialog-tool example features. I see two solutions:
- The JS app updates the dialog profile variables and the dialog then posts those to the UI. This means than I can also store additional variables, such as opening hours, etc and show those on user request. On the other hand I would have to blank out the profile variables every time the user searches for a place.
- This screenshot, shows a different approach where the JS app posts results directly in the UI. The app would only posts when the variable search_now = yes. I think this is similar to the movie app.
Which of the two solutions is ideal? Thanks!