In Django, is there a difference between how someone creates a package meant for developers to use in a django project vs how someone creates a plugin/extension/app meant for users of a django app?
It’s clear to me how there would be differences in getting it so the end person (developer or non developer) would be able to install/use it (not that I know in detail how folks do that either), but it’s unclear to me to what degree it would differ on the creation side of things, if at all. I should probably also mention I ask about this stuff in the context of Django, but I’m also starting from a place of not understanding it in any context (aside from being the end user of other people’s creations).
Relatedly, is this terminology roughly accurate?
- django app [in this context] - how someone can silo some code into a neat, self-contained thing so it can then be added in a reusable way to any django project’s installed apps with whatever other settings it might need to be used. Generally intended for all users to get its functionality when added to a django project.
- package - meant for developers to use; it extends your project’s code if you opt-in to adding it. A package is a django app and a django app becomes a package by […providing some extra meta information about its packaging…somehow… …in some format…somewhere…] which then allows it to be considered a package ready to be used by others and listed on PyPI
- plugin - meant for users to use; it extends the django project’s code if a user opts-in [which would add it for only their use and not other users…somehow…[I see the words API/webhooks being in these docs a lot so I think that’s related to this piece somehow?]
- e.g. pretix plugins, NetBox Plugins
- extension - a synonym of plugin, but it’s used for other domains that aren’t web apps (e.g. browsers, desktop apps)
- e.g. Chrome extensions, Visual Studio Code extensions
- Highly uncertain of this definition…mainly because I couldn’t find an example of a Django extension (since I’m pretty sure django-extensions is a package…so maybe extension is a synonym for both a plugin and a package?)
- integration - meant for users to use, a third […thing…also made as a django app…?] that provides a bridge between two other projects by being kind of like a software equivalent of a dongle/adapter that has a side that adapts to each project; it can be made “officially” by either one of the two projects or it can be made by a third-party that is independent and unrelated to either project. Maybe created just like a plugin but so that it’s double-sided instead of single-sided?
Or are these terms more interchangeable in practice?
Asking because, in my quest to understand, I was trying to find example Django projects with documentation about how to create a plugin for their project because I figured that would make the distinctions more apparent, but then I got more confused about the terms. A few more examples below to give a sense why I’m getting confused as I search in the wild:
- Wagtail names them “third-party packages” but they seem more aligned with what I thought was the definition of a plugin. Some of the descriptions of these packages call themselves plugins.
- There was an example plugin package for Open edX, so that does make me think creating a plugin (for users) vs a package (for devs) would be a very similar process (or exactly the same?). Open edX also has “frontend plugin slots”
- Saleor (first quote source, second quote source) uses almost all these terms, but distinguishes between them (which implies to me being that plugins and apps are actually very distinct beasts)
-
Extensions
Saleor has two ways to extend its functionality:
and
Plugins Overview
caution
We are in the process of deprecating plugins in favor of apps. If you plan on building a new integration with Saleor, we recommend using apps instead.
Plugins offer a mechanism to extend Saleor’s Python core with new functionality.
-
Relatedly, I also welcome recommendations for any related Django-specific how to/tutorials for creating packages and/or plugins (bonus if more beginner friendly but anything is helpful)