It has been a year or two since I touched the Inkscape codebase but have recently been introduced to the idea of a "Screaming architecture by Robert C. Martin/Uncle Bob" [1, 2] in other development efforts and started to practice it. It might not be doable right now for Inkscape but goes along the idea that we want WITH_UI flag in the build system (be able to build headless inkscape that is). Also it should make it easier for new developers to understand the codebase just by looking at the file/directory structure.

### Inside "src" folder
There is nothing in the directory structure that clearly shows that this is an awesome SVG application.

1. What is the difference between "display" and "ui"?
2. Is "ui" a gui or also command line?
3. "Manipulation", it is impossible to understand what it is being manipulated with just a one-layer folder structure.
4. "Object", it is impossible to understand what an "object" is in this application without reading the code.
5. "extensions", what is the difference between a functionality implemented as an extension and right away in the core of the application? In my opinion the word "extension" is to vague.
6.  "libraries" folder, 3rd party libraries included as source code, this is good idea but shouldn't 3rd party lib folder be next to "src" not inside it?

I did a quick example on the Inkscape wiki [3]. This is just an idea and I'm not sure how feasible it is for Inkscape as I don't understand the codebase that good. The main idea is that business logic, that is SVG functionality goes into "core". The core parts knows nothing about the entrypoints (gui, command line, http API) nor data providers (file system, in-memory data storage).

2018-03-29 3:41 GMT+02:00 Martin Owens <doctormo@...400...>:
On Wed, 2018-03-28 at 21:28 +0200, Marc Jeanmougin wrote:
> inkscape
> ├── packaging/*
> ├── po/*
> ├── share/*
> └── src
>     ├── extensions
>     │   ├── dbus
>     │   ├── internal
>     │   ├── io

src/io is a collection of core utilities that is used by the entire
code-base for doing directory, settings, file, http and a few other
tasks relating to opening file streams, looking for files in known
places and looking after the differences between platforms.

It's not got anything to do with extensions (except for pointing to
where extensions can be found)

Best Regards, Martin Owens

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@...1656...784...sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel



--
Christoffer Holmstedt