my question is going to be somewhat philosophical and "architectural oriented" so bear with me.
Right now we have existing Java web application built on top of Spring and JSF(facelets) with maven. These are basically our tools that limit our scope of possible solutions.
Now to the point. We need to implement a fork of this application that will be running on different domain for different "end consumers" and implement some change requests for both versions, but code base of these versions will probably always be ~90% same. Same change requests can be defined for implementation in both versions simultaneously BUT separate change requests only for chosen version might come as well. We have no control over what change requests there might come in later in project (but we are expecting quite a few). The differences in functionality may occur both on bean and view part of the application.
We don't want to create 2 completely separate projects as implementing changes might sometimes mean implementing them twice. THE BIG ISSUE is that we expect to have even more forks in the future so the effort might multiply even further.
The question is what ways of control or architectural patterns can we introduce to promote better maintainability of our projects. One solution might be for example:
- using Spring profiles to inject proper components based on current fork of application and completely separating view (xhtml) implementation.
In summary we are looking for best way to implement application wide changes that can be isolated and activated only based on some context variable (how to propagate it everywhere?).
Any input, idea or new perspective is appreciated.