Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How Java Bean is reusable software component ?

 
siva chaitanya
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please i request don't give me outdated answers i keep on searching in the Google but my doubt is not clear . Reusable means java bean that is developed in one project can be used in another project right how it is possible to use in another project and what is the difference between EJB and java bean
 
Mansukhdeep Thind
Ranch Hand
Posts: 1158
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, let's say you are asked to build a GUI using SWING. Now what would happen if you did not have any pre-defined menu-bars, buttons, drop downs, text fields etc? Wouldn't every developer have to write it again and again? That is what you mean by reusable.
 
Campbell Ritchie
Sheriff
Posts: 48409
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start with this tutorial.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java beans are basically data holders. They are populated by the front end or the database and stored or presented on the other end. The link provided by Campbell above shows how you can write your own beans.
I would not refer a drop-down or a text-field as a Java bean though.
The any class can be re-usable provided the current and future implementations have common purpose for the class. Utility classes are the most re-used components.
EJB's are a whole different thing and they cannot be compared to Java beans. There is no point in finding similarities or differences among these two.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding the difference between JavaBeans and EJB: see http://www.coderanch.com/t/307693/EJB-JEE/java/JavaBeans-EJB and the link titled "EJB and JavaBeans" at the bottom of this page.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
rajesh villuri,
Your post was moved to a new topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic