I’m an iOS developer who has only passing knowledge of front-end web development, but I would like to migrate my iPhone app to the web.
For example, on my iPhone app the user presses a button. This button triggers a http php request which returns a json string containing some text information and image urls to display images on the device.
How do I replicate this in a browser? I would like the user to be able to press a button which will refresh the image and text on the web page without requiring the page to be reloaded. I would imagine this would best be done using javascript, but I’m not sure where to start. Any short explanations of the logic behind this would be greatly appreciated. Links to tutorials also welcome. And of course snippets of code are also accepted.
The technology you are looking for is called AJAX. It allows you to fetch data without reloading the page, using javascript.
There is a great guide to this here: MDN AJAX Tutorial
After fetching the data you will be able to work with it using javascript (like updating the images, etc.).