• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Design Doubt - App Customisation for Customers

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

Option
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.
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic