what's difference???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   jjfat_jjfat
Posted On:   Monday, November 19, 2001 09:27 PM

I'm really confused about beans!!
what's difference if i put several methods in one bean or two beans ???
which will be better????thanks!!!

Re: what's difference???

Posted By:   Luigi_Viggiano  
Posted On:   Tuesday, November 20, 2001 03:13 PM

it sounds like a non-sense question... think about objects, think about what this object should and should not do.


For example a person can drive(), run(), sleep(), and eat(); but a person cannot fly(), land(), takeOff(), resupply()... so it's logical to have another object for example an Airplane instance having those methods, instead of putting them all together on the Pilot class, that instead is a Person.

This is just an example. You should realize wich "entities" are composing your business and define methods thinking on responsibilities of those.
About | Sitemap | Contact