Hello everyone!

Both all my pages and components need to perform the same database queries
where client specific stuff (language, country) determines how they are
rendered.

(a) would it be a good idea to do everything in BasePage and let
BaseComponent do a getPage() and then call all methods on there ?

(b) imagine there are 10 possible groups of users and 10 possible kinds of
sql queries for all users/visitors. These are never changing, so where and
how would I cache those queries,

(c) is it correct that instance variables within page classes are forbidden?

e.g.

Something something = null;

public Something getSomething(){
  if (something!=null) {
  return something;
  }
  else {
  something=getFromDatabase(clientSpecificParameters),
  return someting ?
  }
}

Would that be threadsafe? Or would users get random data belonging to other
users?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to