• Post Reply Bookmark Topic Watch Topic
  • New Topic

java beans  RSS feed

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Is there any limitation for no of properties in javabeans?
I have an object with 320 properties can I hava a bean with this many getter and setter method
how will it effect my application
is it advisable?

Thankx
[ October 17, 2005: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i think there is no limitation on no of properties
u can have any no of properties.

about the functionality

i am not sure but it should not effect.

you can split your class

correct me if i am wrong

Thanks
pankaj
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don�t know whether there is a restriction on no of properties that can bean have.

But if you have 320 properties in a bean, it will definitely occupy more memory and will take slightly more creation time. And when you use bean in JSP file, it will have more line of codes. And chances are there that generated HTML code will be bulky � depends upon the implementation.

If you can post you business logic, I may suggest you some optimized way to achieve the same result with the less no of properties.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- There are no limits for no. of properties
- Definitely, would be a performance lack
- Results in a heavy HTML page

Re-think is your best bet. It is unlikely to have 300+ properties in a single class. You may split it rationally into several classes then make some appropriate relationship between them. In this way you will definitely acheive performance and a light HTML page. Moreover, it would be more friendly to the user as well, previously was a bit messy too.
 
Author and ninkuma
Marshal
Posts: 66676
167
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to Java in General (intermediate)
 
Let's get him boys! We'll make him read this tiny ad!
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!