amp-by-example icon indicating copy to clipboard operation
amp-by-example copied to clipboard

Dynamic data tools

Open lswang1618 opened this issue 9 years ago • 6 comments

Show all the different ways of fetching fresh data:

  • data fetch for amp-bind/amp-state on page load (https://github.com/ampproject/amphtml/pull/8574)
  • amp-bind + amp-list (https://github.com/ampproject/amphtml/pull/10610)
  • update-cache-request
  • clarify batching of amp-list calls
  • highlight that you can mix dynamic and cached product details

lswang1618 avatar Oct 17 '17 15:10 lswang1618

Thanks for the suggestions! Few comments:

  1. We have a sample here. Have you got specific use cases in mind for this?
  2. Which use case did you have in mind? We have two samples for this, the show more and the filter.
  3. Good point
  4. This is mentioned here as well. Anything that is missing?
  5. Can you elaborate?

sebastianbenz avatar Oct 17 '17 15:10 sebastianbenz

Thanks Sebastian! I missed some of these :D

I think it might be worth it to just have a dedicated sample that organizes these different techniques by use-case. That way we can point partners to one place for guidance. Thoughts?

lswang1618 avatar Oct 17 '17 16:10 lswang1618

We could introduce a new top-level category for these sample, e.g. 'Dynamic AMP'. This way we can keep samples smaller which makes it easier to understand the code/markup.

sebastianbenz avatar Oct 17 '17 17:10 sebastianbenz

@lswang1618 For the "update-cache-request" I don't think a sample is needed, there is no code involved and it's documented in update-cache

kul3r4 avatar Oct 26 '17 21:10 kul3r4

@lswang1618 Let me know if you have any feedback about these samples.

kul3r4 avatar Nov 02 '17 14:11 kul3r4