Chapter 1, Ride the Lightning with AMP, introduces AMP, why it's needed, and what it brings to the mobile web. It describes how performance affects user behavior on the web, and its effect on conversions. It explains, at a high level, how AMP solves the problem of performance. Basic AMP concepts are introduced, and AMP boilerplate code is demonstrated in this chapter.
Chapter 2, Building Your First AMP Page, builds on the boilerplate code from the last chapter. The reader will see how to build a simple blog/article content page, while highlighting the similarities and differences between AMP-HTML and regular HTML. It demonstrates what happens when you use HTML tags that aren't allowed, to introduce AMP validation. The reader will learn how to develop and debug AMP pages, making use of the AMP validator and browser console as indispensable tools. Also, custom elements are introduced in the chapter.
Chapter 3, Making an Impression - Layout and Page Design in AMP, improves on the article-style page we built in the last chapter. The reader will learn about layout support and responsive design in AMP, and styling using CSS.
Chapter 4, Engaging Users with Interactive AMP Components, looks at how to deliver better user experiences via enhanced interaction mechanisms available in AMP. Building upon the prototype from the previous chapters, the reader will learn how to develop a side-drawer navigation menu, collapsible accordion content containers, and dismissible user notifications, as well as other techniques designed to make the most of limited screen space on mobile devices.
Chapter 5, Building Rich Media Pages in AMP, shows how to add rich media to AMP pages by building out an e-commerce product page prototype, which includes product image galleries and lightboxes, as well as audio and video components.
Chapter 6, Making Contact - Forms in AMP, shows what support there is for forms and form submission in AMP. A signup form, a product search form, and a basic shopping cart are developed that will demonstrate client-side validation and error handling, as well as how to build an endpoint to process form submissions.
Chapter 7, Dynamic Content and Data-Driven Interaction, explains how to automatically populate AMP pages with data retrieved by the JSON API. The product page is improved by dynamically adding related content data retrieved this way, and the shopping cart is enhanced to allow removal of items.
Chapter 8, Programming in AMP - amp-bind, introduces a programming paradigm offered in AMP via the amp-bind component.
Chapter 9, When AMP Is Not Enough - Enter the iframe, talks about workarounds for the limitations imposed by AMP. While it provides many custom elements to provide extended behavior, there are times when AMP can't provide the functionality you need. In these cases, the desired behavior can often be achieved with iframes, using amp-iframe.
Chapter 10, Ads and Analytics in AMP, introduces the reader to the different ways in which ads can be integrated into AMP pages. Different ad types and styles are reviewed and implemented. Analytics solutions are also implemented, demonstrating how to track user visits and other trackable events.
Chapter 11, AMP Deployment and Your Web Presence, outlines a number of options to deploy your AMP pages, whether standalone or as part of a bigger web presence.
Chapter 12, AMP - Where It's at and Where It's Going, reflects on what has been achieved. It covers the recent and under-development features in AMP, and where the project is going.
Appendix A, AMP Components, provides a reference list of all AMP components.
Appendix B, Actions and Events, provides a reference list of actions and events that can be used for interactions in your AMP pages.
Appendix C, amp-bind Whitelisted Functions, provides a reference list of whitelisted JavaScript functions that can be used in amp-bind expressions
Appendix D, amp-bind Permitted Attribute Bindings, provides a reference of element attributes that support data binding