Exemplary Anvil app architecture?

As my project app gets more complex, I come to understand more and more the importance of good software design. I’d like to study carefully one or two Anvil apps built by experienced folks to learn by example, in the specific context of Anvil. To the extent you know the apps listed below (or other examples that should be added), which do you consider worthy exemplars of effective Anvil coding/architecture?

Which do you consider exemplary Anvil apps in terms of their architecture?

0 voters

I’m of course also interested in any other advice from experienced developers (and have received some helpful pointers in the past).

3 Likes

I guess the good software design is the one you are comfortable to master and implement it as there are many many good design.

3 Likes

Yeah, I’m realizing this might not be a well-formed question. I would probably need to be more specific about what kind of app or what kind of style I prefer.

1 Like

I found your post when looking for a more detailed build video on the ticketing system, so I can +1 on wanting to study more detailed designs.

I’d really love it, if there were a video tutorial on the ticketing build, especially since I basically have Zero clue what packages and modules are and more complex form structures where forms are components and this has it all.

I cloned the ticketing app, and then ran it, and I cant even get past the login part to see how each package displays on the screen. This is really frustrating as I wanted to be able to try and decipher how packages are made up, which bits show where and navigate around the system.

I know its a lot of work for Anvil to produce videos on these builds, but for non python background newbies who are used to looking at the way php sites are set up, it would be invaluable to me.

For example:-
What is a package, it looks from the icon, like a folder tree, but its called a package, so is it the same thing? I know it seems like a dumb question, but if you don’t know…

Why is Dashboard a form, with a sub form of Content, then three component sub forms ? What was the choice to set it up like that and how would that display because I can’t see it because of the login?

How does the main HTML fit into the scheme, there seems to be an html/css frame with a blank panel on the inside, how does that work?

So, all of these are questions that I would embarrasingly have to bother this very wonderful forum for, over and over and over… and I think I’m even getting sick of myself right now :slight_smile:

2 Likes

The docs have a section that might help: Anvil Docs | Structuring your app It doesn’t go into a ton of detail, but answers the basic question.

Note also that some level of “if it walks like a duck” is appropriate. If you create a package and it functions as a directory, treat it like one. You can do more with than that, but if that’s all you do with it, that’s fine, too.

In your clone, go to the Users data table, find the user you tried to log in as, and click the checkbox in the Enabled column. Then you will be able to log in.

4 Likes

From my memory, you need paid plan to run the app.

1 Like

The tutorial app does give a warning about it using a full Python 3 server environment, but if you change it to use a basic Python 3 server environment it seems to run just fine. I was able to run it and close a ticket from a free account.

2 Likes

This isn’t a comprehensive answer, but I think its representative:

One feature I have taken advantege of is Anvil’s foundational Form. The form is the basoc module and using forms within forms is pretty useful to break up development and to connect related components. It is also the way to make multi page apps. So centering design around forms I think is one way to take advantage of Anvil to the fullest.

2 Likes

I now have the ticketing app clone running so I can view it, it is going to be very helpful for me trying to learn how to use Anvil to its best.

It really helped as jshaffstall said, if it walks like a duck… because TBH even ducks probably know more python than me :joy::joy::joy: I’m just trying to help my daughter get on the right path for her school project as she has exams coming up and hasn’t really got the time to learn Anvil and how her python code can be amended to create a UI.

This might help as well:

1 Like