Resource bundle for dynamic content –server side or client side?

In fully RIA clients such as Flex, I got in taking a design decision –where to keep the names of the columns for a table, Server side resource bundle or Client Side resource bundle .
If number of columns is fixed, choice is rather simple –put it at client side. Having bundles at client side give flexibility to UI programmers to manipulate them as per business need.
But, Often we come across use case where the number of columns in a table are not predefined –they vary according to the result of business use cases executed. If there are fixed columns, resource bundle can stay at client side, challenge is when there are variable number of columns to deal with that?
Approach 1: I prefer keeping it at server end, and passing an Array of “column display labels” which will be used to display the names of the columns, along with actual column names. UI programmer can blindly loop through the “Labels” array and generate column names.
Advantage: Varying of column names has no Impact on UI programmer, UI team blindly iterate through Array of labels.
Disadvantage: If a column name needs to be changed, UI programmer cannot handle it independently. It should be coordinated to server side team.
Approach 2: In second approach column names can be kept in a client side resource bundle.
Advantage: UI programmers can independently manipulate the names.
Disadvantage: UI programmer will have to maintain a list of “Master Columns”. At any point in time if business case warrants adding more column, UI team should be notified and changes made in client side Resource Bundle as well. This could result in real sync up issue.

About ChandanPandey

Try to come up with a good design as by product of good coding practices

Posted on June 14, 2011, in Design and Architecture and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: