On Tue, May 24, 2022 at 6:31 AM Dmitry Katsubo <[email protected]> wrote:
> I have analysed the code and I see that most of the classes (e.g. those > needed to parse XML) are located in guacamole module, which probably > cannot be used as dependency for an extension. So it looks that about 5 > classes are to be copied as is to "new extension" module. Does not smell > good in terms of code reusability. > You should use gaucamole-ext as the dependency for the module, plus whatever individual dependencies you need. If you have to add other dependencies, that's fine - I think if you were to examine the pom.xml files across the project you'd see that there are some dependencies that are duplicated. Is it the maximumly-efficient way to go? Maybe not; however, it allows the extensions to be pluggable/interchangeable, and for the framework of Guacamole to be re-used for other things. It's a trade-off, and sometimes absolutely efficiency is sacrificed for compatibility, ease of reuse, etc. > I am OK that the changes I suggest do not fit the common perception about > how API should be organized. For me it is more logical to keep 10 lines of > code patch that perfectly fits my needs rather than re-invent the extension > that will be a copy-paste of existing code with no added value. At the end > of the day that what OpenSource is about. > You're certainly welcome to modify the code you have to fit how you want to do it - I would say _that_ is at least one of the things that Open Source is about. As a project, our goals may be different from your individual use-case, and that's okay - you have the source code, you can modify it as you see fit. However, the changes that you've suggested are not ones that we're willing to incorporate into the main code base for the project as they stand today, for the reasons already mentioned. -Nick >
