Navigation
  • Home
  • Recent
  • Most Active
  • Popular
  • Blog
  • Credits
  • RSS
  •   Interaction
  • Register
  • Statistics
  •   Help
  • Suggestions
  • Contact Us
  • How to Edit
  • Help



  • [Edit]


    JavaBeans are software components written in the Java programming language.
    The JavaBeans specification by Sun Microsystems defines them as "reusable software components that can be manipulated visually in a builder tool".

    In spite of many similarities, JavaBeans should not be confused with Enterprise JavaBeans (EJB), a server-side component technology that is part of Java EE.


        JavaBeans
            JavaBean conventions
            JavaBean Example
            Adoption
            See also

    top

    JavaBean conventions
    In order to function as a JavaBean class, an object class must obey certain conventions about method naming, construction, and behavior. These conventions make it possible to have tools that can use, reuse, replace, and connect JavaBeans.

    The required conventions are:
      The class should be serializable (able to persistently save and restore its state)
      Its properties should be accessed using get, set and other methods following a standard naming convention
      It should contain any required event-handling methods

    Because these requirements are largely expressed as conventions rather than by implementing interfaces, some developers view Java Beans as Plain Old Java Objects that follow certain naming conventions.

    top

    JavaBean Example

    // PersonBean.java

    public class PersonBean implements java.io.Serializable



    // TestPersonBean.java

    public class TestPersonBean


    top

    Adoption
    AWT, Swing, and SWT, the major Java GUI toolkits, use JavaBeans conventions for its components, which allows GUI editors like the Eclipse Visual Editor to maintain a hierarchy of components and to provide access to their properties via getters and setters.

    top

    See also
     
    Search more:
     

       
    Source Privacy License Download Contact Us Atlas
    Scientus.org Dictionary (Yet Another Wiki) RC : 1.39
    This article is licensed under the GNU Free Documentation License [copyleft]. It uses material from the Wikipedia article "JavaBeans". link