Currently my company has a single internal application that our support agents use. It only supports one product at this time. Tech stack is angular on the front end and spring micro services for middleware.

We are launching a new product and the internal application will need to support that as well. However, for the new product there will be different user roles that grant permission for functionality as well as many changes such as what data is displayed in tables (new columns and buttons to act on data). There is potential that these 2 ui applications will greatly diverge in similarity. Also, it is almost certain that we will have more products that will need a similar ui for support.

The decision im faced with is:

  1. Create a separate repo for each UI application that will evolve independently.
  2. Build off of current application and add logic for showing and hiding functionality.

My concern with #1 is duplication of code and manually having to make updates in 2 (or more) repos for common functionality. My concern with #2 is that this logic will become very complex and make dev and testing really difficult.

What do you think the best option is?

  • 1
    I think you've clearly identified the two possible solutions, and the drawbacks of each. Most answers will fall into one of those two categories. There might not be a One True Answer for this. – Greg Burghardt Jul 26 '18 at 20:24
  • 2
    Duplication of code across applications is usually addressed by extracting it to libraries. – Stop harming Monica Jul 26 '18 at 21:57
  • @Goyo I agree. I think my approach will be a monorepo with both applications and a shared directory. Each app will pull in shared components where appropriate or app specific components if they differ greatly. Future state of the shared directory will be to convert the components into modules/libraries and move to a private npm repository. Angular 6 cli really helps out with the monorepo approach and creating libraries. – Anthony Jul 27 '18 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.