2) "Hello World, I try to imagine a user to whom this is of value...."
Its only an example of an example. But new user of a programming language, build system etc looks for Hello World. Its of no earthly use expect allowing to new user to confirm compiler works as expected and binary runs. It takes up no room but there is no commitment to it being there at the end if you find it a problem.
Sorry, I did not meant to make this about "finding a problem". But rather "pointing out more potential".
I am aware, this is an "example of an example". And for that, it could have been an empty "program Foo; begin end;".
- It shows the infra structure (e.g. meta data, repo structure, ...).
- It gives some ideas of what the "example system" would have to comprise.
So, indeed my introduction about the lack of "value" was wrong. My apologies for that.
I thoughtlessly used this as an opener, to bring up the idea of tutorials (see meta-data below) as something to comprise. Your example just happens to the kind, that IMHO could be made into a tutorial.
IMHO, this really would need to be a tutorial.
Sure, this model would support a tutorial series, but it would be silly discussing content before the framework is agreed on.
framework and content are somewhat bound together....
The more is known about the content, the better the framework can be planed.
Sure "KISS" is a could principle. And we can add more as we get there.
But
- meta-data files will have to be extended too, and once the first version of the "example mgr" is out, meta-data requires backward compatibility.
Planing ahead, can help with that. E.g. planing for different example kinds: component-behaviour, tutorial, comparing-related-features, ...
- The form and place of storage (folder vs zip ...) are also long term decisions.
- Compatibility (and/or integration) with OPM, is yet another "hard to change" decision.
As pointed out: OPM packages already contain examples. So our meta data, and storage requirements should allow such OPM packages to be recognized.
So the below is not about what to implement now.
But about, what to consider when making decisions.
The OPM integration has still a lot of unconsidered points.
Well, I guess - ideally - the "example window" (in its new form) will show everything that is (or has) example(s).
- installed
- online
- and if our online DB is separated from OPM, then also OPM packages with examples
But in reverse, if a user browses OPM packages, and if they (or some of them) have meta-data about their examples:
- Should then the local OPM browser window, not also allow to filter by "has example" ?
- And if the local OPM browser window, can show "only with example", should then the local OPM browser window not also be able to show the entries from the new example repo?
(Especially, since the new example repo could also contain examples for OPM packages. Just examples that have not been bundled with the OPM package itself.)
Note that:
- "local OPM browser window" and "OPM online database" are separate entities.
Changes to the "local OPM browser window" do not affect the maintenance work of the "OPM online database".
- Adding "example meta data" to OPM packages may affect that maintenance.
But this is independent of changing the "local OPM browser window". This would be desirable, even just for the new "example window".
So,
unless we want to exclude OPM packages from having examples (within the example window), it seems to me that the two need to be very closely coupled.
We can have separate databases for the two indeed. IMHO that works well with any point I mentioned above.
It does mean however:
- the example system must access both databases.
- Contributors must deal with two teams of maintainers to submit their work.
The latter is, if they submit work in both categories. OPM packages, that just happen to include examples would be dealt with by OPM maintenance, and thus the OPM maintainer would also decide about some additions to the examples list.
Anyway: Just my two pennies.
If it is thought better to limit the extend, then that's that.
Also if the idea to add those later,
and the hope is that the code will be easy to change, even if it was designed without taking those possibilities into account, well then hopefully this will work out.
Otherwise, consider taking them into account now.