Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Design Doubt - App Customisation for Customers

Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Sir/Madam

We have a J2ee Application , kind of product.
Initially designed for a customer, now the product is asked by different customer, each have their own small customizations.

Developers have put If(Conditions) in the code for the customer, but we feel ,we need to arrive at a design pattern or kind of design
to cater to different customers and at the same time maintain the product in long time

a. For Functioanlity we have interfaces and each customer specific thing in different Implementation classes
Option 2

Can anyone suggest best practices in design patterns.
Posts: 4179
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on what type of customization you are talking about. If you are talking about cosmetic changes, then the goal would be to take everything that is 'data' and remove it from your code, put it into other resources:

1) Push 'things that change' into configuration files. These tend to be email address, links to other sites, people's names... Also database configurations.
2) Use resource files whenever you can. Icons, button backgrounds, etc... can all be stored in resources, then attached to the application at run time (maybe referred to in a configuration file)
3) Make heavy use of CSS for the look and feel of the application, and keep the CSS open and available to be changed.
4) Use JSPs for the page layout. Make sure you keep them HTML templates only - with no business logic or code - simply display. Then the layout can be customized easily without fear of changing function.

Things get more complicated if you want to customize application functionality. In this case, you are probably best looking into 'Dependency Injection' and one of the many frameworks which provide J2EE implementations for it.
My previous laptop never exploded like that. Read this tiny ad while I sweep up the shards.
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic