I tried it on my phone Nathan, but nothing seemed to happen when I clicked
the button.


Okay, I made the <button> bigger ;-)

It works on my Android phone and iPad tablet. What phone are you using?



That aside, I am not sure I understand the benefit of downloading html and
JSON in this way. Can you elaborate?


I'm a little confused by the question. The thing that distinguishes this
approach is not the asynchronous "downloading" of content; a very common
requirement.

I'll assume that you're referring to the automated "merging" of an HTML
template with a JSON object and appending the results to an HTML
"container", such as a <div>.

For me, this is about minimizing custom coding requirements in new
applications; hence a "utility" that is smart enough to merge complex
"data" and "layout". It's about performing that step on the client rather
than on the server.

From a UI perspective, visual transformations are more fluid. Download HTML
templates only once during the life of a page. Download data incrementally
and append additional content, such as adding to a list.

Regarding benefits, I suppose it depends on what you're comparing to. What
are you comparing it to?

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.