-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Desired Architecture #1579
Comments
Some comments/questions, primarily based on the experience from #1593:
public static final String FILE_FIELD = "file";
public static final String FOLDER_FIELD = "folder";
public static final String DIR_SUFFIX = "Directory";
public static final String SIGNATURE = "This file was created with JabRef";
public static final String ENCODING_PREFIX = "Encoding: ";
public static final String COL_DEFINITION_FIELD_SEPARATOR = "/";
public static String NEWLINE = System.lineSeparator();
public static final String SPECIAL_COMMAND_CHARS = "\"`^~'=.|"; It seems like
In general I think the general idea is really good though, but as I said, I do not really see how |
Where should |
Thanks for your feedback! The Regarding the constants in Regarding preferences: The (very very long-time) plan is to turn |
👍 for moving the event package to the model. I would create a class with all the standard field names, and put this in the model. Then, this could be used within the model as well. Regarding preferences: I think, too, that this should be an evolutionary process with the ultimate goal of having no preferences in there. I do not have a plan that fits all situations. What would be best:
|
There is one more thing I am wondering about: How should the GUI access preferences? Should it directly read preferences from
Or should it reuse more specific preferences classes that we introduce at various places, i.e.:
@simonharrer, @tobiasdiez, @oscargus : What do you think? At the moment the GUI does everything in the first style. Should one of the two be preferred? Or does it not matter? This is relevant for some of the refactoring work that Oscar is currently doing. |
I actually didn't understand earlier that the preferences are written to different locations as is discussed in #1626. I thought it was enough to have separate keys and everything was fine... This is then clearly relevant for moving/injecting preferences from/in logic. (Or am I missing something more?) I'd say that the GUI code should access Globals.prefs and the logic code use a special class. However, sometimes it is convenient to use the same class for the GUI. For example, the OO/LO connection has a very distinct set of preferences so one might just as well only work with those. In my recent code I think I mix a bit. Try to use a special preference class, but where it is simpler, I go with Globals.prefs. |
The idea of the specific preferences was to avoid cluttered method signatures, right? If we stick to those "specific preferences" and do not use this only as an intermediate step to methods with explicit parameters, I would use the "specific preferences" in the UI, too. |
Since we have a consensus on the high-level architecture, I now documented it in https://github.com/JabRef/jabref/wiki/High-Level-Documentation Therefore, I am closing this issue. It can be reopened if necessary and we can also discuss more specific architectural things in new issues. |
Following the discussion from today's devcall, here comes an outline of our desired high-level architecture for JabRef and some data on the status quo. This is a refinement from our high-level documentation.
@JabRef/developers Please have a look, mention anything that you find worth remarking or discussing, and eventually I will update the high level documentation to reflect our desired architecture. Here is a screenshot from my architecture modeling tool for JabRef 3.4 (apologies for overlapping arrows and numbers, there's no possibility to avoid this tool-wise):
Arrows mark dependencies and the number of an arrow reflects the number of dependencies. Dashed arrows mark forbidden dependencies, whereas complete arrows mark allowed dependencies. The model depicts the desired architecture, not the actual architecture. I manually sorted all classes of jabref into these high-level packages, for instance the
MetaData
class should be injabref.model
and that would currently lead to forbidden dependencies fromjabref.model
tojabref.gui
. Based on my sorting and the actual current source code, the architecture tool computes the number of dependencies between the packages.The content of
jabref.model
,jabref.logic
, andjabref.gui
is described in our high-level documentation. On top of thatjabref.globals
should contain bootstrapping classes and global information (JabRefMain
,Defaults
,Globals
, etc.).jabref.preferences
should bundle the classesJabRefPreferences
andJabRefPreferencesFilter
.jabref.cli
should bundle the CLI classes (already a top level package). According to the model, the only allowed dependencies in jabref should be:jabref.logic
->jabref.model
jabref.globals
->everywhere
jabref.gui
->everywhere
jabref.cli
->jabref.preferences
jabref.cli
->jabref.globals
jabref.cli
->jabref.logic
jabref.cli
->jabref.model
This is an open discussion, any comments are welcome!
The text was updated successfully, but these errors were encountered: