I have some problems witch model to use, using Beans/Servlets/JSP.  Each has his pro's and contr's.
 
For instance: i have a DBase with a table regarding cars information, so i make an apropriate bean containing the information about a car, the 'carBean'.
Now i want an app to search for all the red cars.
model 1: i write a servlet witch makes 1 query to the dbase and from that information create all the carBeans. ***1 DBaseConnection
model 2: i write a servlet witch gets all the id's of the red cars, makes new carBeans (initialising the id) and then let the beans themselves get their information from the dbase. ***  x DBconnection (one for each  bean).
pro model 1 : 1 query
pro model 2 : if we decide to give the carInstance a new attribute, we only must adjust the carBean.class and not all the app's witch make/use such beans.
 
 

GIF image

Reply via email to