J
Jeremy Martin
Hi,
Just want a bit of advice regarding a 3-tier Web App.
Currently I have a DB class that fills its details on the constructor
and in the class contains many other classes. So basically the
constructor is completely filling out the entire class.
This is good because at anytime using that class I know the data is
complete, however I am worried about how much data is being stored in
the class. I store all my session data in the Database and I think
because of the size of the classes it is degrading performance
significantly.
Basically I would like to know what is too much data being stored in a
single class instance or should I query the database only when the data
is needed rather when the object is created.
Does anyone have any advise/websites they could point me to. To give u
an idea here is a small sample class hierarchy ignoring any simple
types.
Assessment
HeadTeacher : TeacherClass;
MarkingTeachers : TeacherClass(ArrayList);
Structure : StructureClass;
Questions : QuestionClass; (arraylist)
SubQuestions : SubQuestionClass; (arraylist)
StateLevels : StateLevelClass (arraylist)
Many Thanks
Jeremy
Just want a bit of advice regarding a 3-tier Web App.
Currently I have a DB class that fills its details on the constructor
and in the class contains many other classes. So basically the
constructor is completely filling out the entire class.
This is good because at anytime using that class I know the data is
complete, however I am worried about how much data is being stored in
the class. I store all my session data in the Database and I think
because of the size of the classes it is degrading performance
significantly.
Basically I would like to know what is too much data being stored in a
single class instance or should I query the database only when the data
is needed rather when the object is created.
Does anyone have any advise/websites they could point me to. To give u
an idea here is a small sample class hierarchy ignoring any simple
types.
Assessment
HeadTeacher : TeacherClass;
MarkingTeachers : TeacherClass(ArrayList);
Structure : StructureClass;
Questions : QuestionClass; (arraylist)
SubQuestions : SubQuestionClass; (arraylist)
StateLevels : StateLevelClass (arraylist)
Many Thanks
Jeremy