Project file structure?
Currently the source code is mainly divided between three subdirectories: Zotlabs, includes and library.
To me it looks like includes
is mainly old-style functional API's in the global namespace, while Zotlabs
is mainly classes within the Zotlabs namespace.
There's dependencies both ways between these locations. I.e. api's in the includes
directory depends on classes in the Zotlabs
subdirectory, as well as the other way around. Also, some code is duplicated between the two, which opens up for some potential subtle and hard to debug bugs and incompatibilities.
I've assumed that library
was mainly third-party code, that probably should be moved under composers control, but it seems like that's not entirely true. A case in point is the OAuth code which is spread across all three locations, where it seems like the part in library
at least is from the Friendika times...
Cleaning up in this will take some time, but I'd like some input in which way to move. Should we aim to get rid of the includes
directory altogether, by moving the functionality into Zotlabs
? Is there some natural axis of separation that can be used to determine what features or functionality end up where? Is Zotlabs meant to be more generic, while includes contain the Hubzilla specific parts? Should we just scrap the current directory structure and rebuild it in a more logical way? (For whatever we think is more logical :)