General Architecture Question

Discussions

General J2EE: General Architecture Question

  1. General Architecture Question (1 messages)

    Problem Definition:

    Need to show a number (tracking number) on every page of my web application. This number is referenced by the pageID. There is a style, which checks for the pageID and displays this appropriate tracking number. More than one page can have the same tracking number. PageIDs are prone to frequent changes with in the development phase not even between releases.

    Note: No App Server involved.

    Option-1:

    tracking numbers are put in a property file, where it is keyed with pageID.

    Option-2:

    tracking numbers with pageIDs are put into database. Style which prints the tracking numbers uses some helper class and gets the appropriate tracking number.

    Option-3:

    tracking numbers which are stored in database are loaded when the server comes up as a singleton object and Tracking Numbers style uses that object just to get appropriate tracking number (which is pre loaded).

    My Preferences:
    Option-2 is totally ruled out. The subtle difference between option-1 and option-3 is property file vs database.
    I understand that all metadata type of information should be put into property file and data should be put into database. But in this case where the pageIds and Job numbers are frequently changed, and development team does not have good control on database data, I would prefer property file.

    Can anybody else second my preference? If yes please give another good reasoning to convince my design to rest of the team. If not please tell me why not.

    Your help is greatly appreciated.

    Thanks
    Madhav
  2. Resource Bundle (JSTL)[ Go to top ]

    I would use a ResourceBundle (property file). The pageID would be the key, and you would define the value. You could use jstl:
    <fmt:bundle basename="yourFile">
      <fmt:message>getPageID</fmt:message>
    </fmt:bundle>
    BTW, what do you mean by pageID?