File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes jsp and bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "jsp and bean " Watch "jsp and bean " New topic

jsp and bean

Shaji Ravindran
Ranch Hand

Joined: Jan 12, 2002
Posts: 39
Hi all,
When creating javabeans for using in jsp,is it good to create a single large bean for more jsp's to use or keep the bean small for two-three jsp's,which is performance wise better option.
Thanks in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Performance-wise, it's usually better not to use Java at all. What Java is giving you is productivity.
You're far better off breaking up the project into beans based on functionality than on trying to guess where the bottlenecks will be (experience has shown repeatedly that they'll be somewhere else anyway).
Only if you actually SEE performance problems AND you've MEASURED to find out WHERE they are should you start warping the program structure and then only to the extent needed to solve the problem.
It's much easier to optimize a working program with a good logical structure than to repair a broken "optimized" program.
[ January 14, 2002: Message edited by: Tim Holloway ]

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: jsp and bean
jQuery in Action, 3rd edition