Is it difficult to develop with AMP?

It is challenging at first. The most difficult part for me was figuring out how to scale assets. AMP requires you to add the width and height for some external components and I thought they were fixed. I learnt to use the “layout” attribute and the development became easier.

The first time I had to create an AMP site was scary. I was certain there wouldn’t be enough components for it and the CSS or Javascript (JS) restrictions would prove fatal. But AMP has a big repository and I managed to get around the confinements.

It is easier to develop sites with AMP. You know where all your components are. They all have documentation and you are more likely to find people on the forums to help you. Installing components is easy - just copy and paste the JS code, or even better, use a Gulp plugin to automatically import them. I don’t have to worry about downloading a malicious library or the creators abandoning it.

Here are my criteria for a good JS script:

  • Does what is required
  • It’s easy to install
  • It’s accessible
  • It’s fast

All AMP scripts check those boxes. When it comes to accessible components, AMP is great. Many times I had installed mainstream libraries that claimed they were accessible, only to fail at testing.

My biggest fear when developing with AMP was, what if I needed custom JS?

Turned out, it is perfectly okay to have a few pages that aren’t AMP valid - they’d still be indexed by the search engines, they just won’t validate as AMP. It is usually pages that you wouldn’t need indexed - for example, a calculator that estimates the monthly payments of a truck. Even the AMP team suggests, if you don’t have Signed Exchanges, to make the cart page non-AMP in order to use cookies.

AMP also takes some of the pressure off search engine optimization (SEO). Don’t get me wrong, if the site is horribly coded, it won’t rank in Google. But if you do it right, AMP helps a ton with ranking. It is much easier to optimize AMP site since they follow best practices from the ground up.

AMP is not a magic pill. If you are a bad web developer, or a novice, it won’t make your websites amazing. It is a tool. If you don’t know anything about web performance, art direction, accessibility, etc, coding with AMP will be difficult.

As with any programming language or framework, it takes time getting used to. Don’t be embarrassed to ask for help at Stack Overflow’s AMP section. Give AMP a change and you will see how great it is!