web application design

Hi there,

I wanted to pose a basic question as to what is a best approach when designing a web application. Case in point for a scholastic application:

1) thirty students login to their accounts and try to access the same information.

2) in doing so, they all call the same servlet which in turn calls a class named "StudentModel" and a method named getStudentList() which would return a 2D String array of data.

3) the getStudentList() method retrieves from a database the list of all the students in the school

Is it better to make the method getStudentList() a static method so that the servlet calls it directly as in:

String[][] data = StringStudentModel.getStudentList()?

Or is it better to make the method non-static, in which case, the servlet would have to make an instance of the class StudentModel thirty times?

What are your thoughts, pros vs cons?

Alan

[926 byte] By [ashiersa] at [2007-10-3 1:11:17]
# 1
First thing that I like the suggest is it will be better to define a class that holds student information instead of using the String arrays.
LRMKa at 2007-7-14 18:08:15 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...