When I first started using Anvil, I expected to be able to create a full web site. When I discovered it’s for web apps, not web sites, I started using the iframe approach to embed Anvil forms in an otherwise static site.
What I wanted to do with this post is capture what would be needed to be able to create a full website in Anvil, and work out what’s missing, and hopefully start some discussion.
What’s a full web site?
When I say full web site, I mean something that can be crawled by search engines and participates in SEO practices and feels like a normal web site to a user. While some web apps don’t need to be indexed by search engines, others (like a social networking site) can benefit from that.
These are the things I think would be needed.
Ability to link to specific forms
A search engine can’t index what it can’t link to. This can currently be done by creating a startup form that looks at the URL hash and opens the appropriate destination form. Using ! after the # in the URL hash should cause Google to index the URL.
A URL in the form #!?page=add now works properly.
Ability to change meta tags based on the URL
The meta tags for SEO seem to be global for the app right now, and not something that can be changed dynamically. This isn’t as big a deal as the others, but would be a nice to have feature.
Using browser back and forward buttons to navigate
This can be done using Javascript, as shown in this post: Working with browser history to support back and forward buttons
Providing a sitemap to search engines
This should be able to be done via an HTTP endpoint that returns the sitemap.xml contents.
Providing an inexpensive way to serve static content
Websites often contain a lot of content that’s static. It’d be nice to have some way to serve that static content that didn’t have as much of an impact on compute units as the dynamic content. I have no idea what this would look like in terms of the Anvil architecture.
Others?
Are there other features I"m missing?