U
U
Urukhayy2016-11-25 15:02:03
Java
Urukhayy, 2016-11-25 15:02:03

How to organize many abstract classes in a portable framework (library)?

Task: It is
required to implement several different projects that use similar functionality (logic, data), with the exception of some extensions from each project.
One of the solutions is to move the general abstract functionality into a library and include it in every project.
But as more and more new projects are combined with this library, it becomes clear that the previously rendered abstract functionality is insufficient and requires fine tuning.
Example:
There are 3 companies that have differently organized connections between groups of employees, but there is a common functionality: dismissal, promotion. We take out the main functions in the abstract class of the library. But it turns out that in company #1, groups of employees should be arranged in a hierarchy (one department is nested in another), but company #2 does not need nesting. If the nesting of employees is implemented in the general functionality, it will not be used at all in some projects. You can make another class in the library that inherits from the main functionality and extends it with nesting functionality for groups of employees. But what if you need a lot of similar extensions of one abstract class? What if one extension excludes the other?
In addition, if people from another company want to use the framework (library), who have nested groups of employees, but do not have the dismissal functionality, then what to do? After all, the library has already implemented abstract classes with the dismissal functionality.
One side of the question: How can you implement a convenient and wide library without knowing the details of the projects that will work with it, but knowing their general concept?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Doniy, 2016-11-25
@doniys_a

From what I understand, you have a Factory and
Linker
To implement a convenient and wide library, you first need to think about its architectural representation and extensibility.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question