Hi,
I suspect that this a very basic question but I'm kind of new to all of this so you're patience is appreciated.
I designing a web front end to display data retrieved from a database. No big deal in that except that different users will require the data to be presented differently e.g. a status page for one user might display fields a,b,c while a status page for another user might display fields x,y,z.
The majority of the site will be generic and customer independent.
What I need to know is am I required to have a different template for each customer e.g. Cust1-Status.jsp, Cust2-Status.jsp etc or is there a more elegant solution to this.
regards
Noel
-
Customer specific presentation (3 messages)
- Posted by: Noel O'Connor
- Posted on: July 14 2004 23:14 EDT
Threaded Messages (3)
- Customer specific presentation by Bhagvan K on July 15 2004 09:02 EDT
- Good question by Matthew Wilson on July 15 2004 14:31 EDT
- Customer specific presentation by Noel O'Connor on July 16 2004 03:37 EDT
-
Customer specific presentation[ Go to top ]
- Posted by: Bhagvan K
- Posted on: July 15 2004 09:02 EDT
- in response to Noel O'Connor
hi,
As i don't know the details of your context, the following solution may involve more analysis.
option1 : XSL/XML to render jsp/html based on the input of the customer. XSL file will be parameterized
option2 : store the metadata in a table with customer id as the primary key to build the page dynamically. The challenge is linking the UI Fields to the backend DTO. [mapping can be stored in xml file]
hope that helps,
Bhagvan K
http://www.architectcorner.com -
Good question[ Go to top ]
- Posted by: Matthew Wilson
- Posted on: July 15 2004 14:31 EDT
- in response to Noel O'Connor
Hi,I suspect that this a very basic question but I'm kind of new to all of this so you're patience is appreciated.I designing a web front end to display data retrieved from a database. No big deal in that except that different users will require the data to be presented differently e.g. a status page for one user might display fields a,b,c while a status page for another user might display fields x,y,z. The majority of the site will be generic and customer independent.What I need to know is am I required to have a different template for each customer e.g. Cust1-Status.jsp, Cust2-Status.jsp etc or is there a more elegant solution to this.regardsNoel
That is not a basic question? This is a question that is tough to answer. The two solutions I ahve used in the past are:
First let me clarify customer:
A customer in this case is not like a Yahoo mail user. A customer is an organization who is using your application in a different way another group of people are using it.
1) Create a different view for each customer.
PRO: If one customer requires some wierd thing it is easy to implement when each customer has its own JSP.
Adding a new view does not reqire testing all the other views for teh given model.
CON: You have many similar JSPs to maintain.
2) Create one view that can be customized by the customer.
PRO: Smaller number of JSPs to maintain.
CON: The one view becomes very complex to meet the needs of all your clients.
The one view becomes a bear to test.
Generally I have found solution 1 to be a more maintainable solution. If using MVC this is a very easy to implement one model and one controll with one view. Then if a customer requests a change to a view you can easily add another view to the struts config or spring xml files. -
Customer specific presentation[ Go to top ]
- Posted by: Noel O'Connor
- Posted on: July 16 2004 03:37 EDT
- in response to Noel O'Connor
Thanks for your help guys. I had thought of both option 1's before posting but I wondered if there was another way.
regards
Noel