Hello Anvil Community!
Note: All thoughts expressed below are personal opinions.
Development platforms and frameworks often rise and fall with their communities.
In order for Anvil to grow to its full potential, the way in which the community can develop their own packages must be simplified.
Of course there are already some excellent packages e.g. anvil-extras. However the way to create and manage a package is not quite anvil-style.
Below are some thoughts on how such a thing could be accomplished.
The Anvil landing page gets a new header menu called “Packages”
Packages is a central place (essentially just a webpage) where people can:
- Search all Anvil community packages
- Like, comment and check the documentation for the packages
- Similar to https://pub.dev/ is for flutter/dart
Create Packages ( package manager)
- In the editor there is a service which is called “package manager” (similar to user service)
- This Service allows you to publish the app as a package as well as adding package relevant data e.g.:
- You develop a package in the editor as you’d normally would
- Once you are done with a certain version → click on package manager → publish → specify version name(V0.0.1) → publish to package manager
- After that anvil creates a clone which is then hosted on the package manager space and cannot be changed from the package issuer
(This ensures that no package issuer can accidentally mess up/delete a certain version)
- Packages can be imported through the usual dependency manager in the editor.
- Difference is that you can specify a certain version e.g. anvil-extras ^1.6 or to simply follow the newest version
- Packages can be cloned from the package manager if this option is enabled by the issuer
Working together on packages
- Since the codebase is a “normal” anvil app the issuer could simply invite members to start contributing right within the anvil editor.
- In a second step the collaboration could be enhanced by:
- Adding pull requests
- Allowing an anvil app to be open source (i.e. everyone with an anvil app is a contributor)
- Or → adding directly to the underlying git-repo
This is simply an idea which obviously needs further refinement.
However this is a step which would bring anvil to the next level - and this is definitely something we as a company would strongly stand behind.
Looking forward to your thoughts on the topic!