You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a talking point than an issue, but I'm curious what the curators of the JTK feel about implementing builder patterns to some of the objects within the JTK? There are some classes that have quite a lot of constructors, and implementing builder classes might be a good way to mitigate some of that. It would be quite a large paradigm shift, but might make extending the JTK easier to manage.
In this scenario, one would then chain together any parameters they want into the builder and then output a PlotPanel. No need to add new constructors, you just modify the builder.
Anyways, it's one example. The logistics of an overhaul like this is huge, and would surely have to go through a deprecation to sunset the other constructors but I'm just curious what your thoughts are.
The text was updated successfully, but these errors were encountered:
This is more of a talking point than an issue, but I'm curious what the curators of the JTK feel about implementing builder patterns to some of the objects within the JTK? There are some classes that have quite a lot of constructors, and implementing builder classes might be a good way to mitigate some of that. It would be quite a large paradigm shift, but might make extending the JTK easier to manage.
So for example, PlotPanel has 5 constructors:
This could be reduced down to a single constructor:
And the builder will do all the heavy lifting as an public static class internal to
PlotPanel
:In this scenario, one would then chain together any parameters they want into the builder and then output a
PlotPanel
. No need to add new constructors, you just modify the builder.Anyways, it's one example. The logistics of an overhaul like this is huge, and would surely have to go through a deprecation to sunset the other constructors but I'm just curious what your thoughts are.
The text was updated successfully, but these errors were encountered: