Hi all,
I’ve been developing a website/webapp using Anvil that has some specific requirements. I have an approach I’ve been using to putting all the pieces together, but would like to run it by those of you who’ve done this sort of thing before. I’m particularly interested in hearing from people who’ve been running a site with similar requirements for some time, so have a good idea of what works well and what doesn’t.
I stalled on development of this a couple of years ago when I tried to break it out into prod/dev versions. With three Anvil apps that share some data tables, that process just was too cumbersome.
Now that I’m coming back to it, I know I need some major rewrites to take advantage of new Anvil features (great job Team Anvil at adding cool new features!), so I figured it was a good time to revisit the entire architecture and see if those of you with more experience had some lessons learned to share.
Let me describe the requirements, then I’ll describe how I’ve organized things to meet them.
-
The website uses pretty URLs, not ones with #!
So https://example.com/page1 not https://example.com/#page1 -
The static parts of the website are not served by Anvil
I don’t want to build an entire CMS in Anvil, I have other solutions for generating static content pages, and static pages are easier for web designers to work with. This also takes Anvil usage out of the “casual user browsing” category and puts it into the “person has spent money” category. -
The dynamic parts of the website are served by Anvil
I’m building a shopping cart, checkout system, and account system that integrates with the static website
There are other Anvil apps that interact in this system, but do not directly integrate with the static website. I’m fine using hash routing on those apps (they’re private apps, not public pages I want indexed by search engines)
What I’ve done so far (this is based on a design from several years ago, before we’ve had a lot of Anvil improvements):
-
Built a static site using a Python based static site generator
I looked through a bunch that were focused on blogs, and found https://urubu.jandecaluwe.com/start.html that matched the way I think, and allowed me to write some custom Python code to generate the site from a list of product descriptions. -
In the static site templates, used iframes to embed specific Anvil forms
This works reasonably well, although it’ll take a web designer to make the forms fit in with the rest of the site
Any ideas for a better way to architect something like this?