Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 422711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:06:30+00:00 2026-05-12T19:06:30+00:00

Have seen some similar questions: What is the difference between a JavaBean and a

  • 0

Have seen some similar questions:

  • What is the difference between a JavaBean and a POJO?
  • What is the Difference Between POJO (Plain Old Java Object) and DTO (Data Transfer Object)?

Can you also please tell me the contexts in which they are used? Or the purpose of them?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:06:30+00:00Added an answer on May 12, 2026 at 7:06 pm

    JavaBeans

    A JavaBean is a class that follows the JavaBeans conventions as defined by Sun. Wikipedia has a pretty good summary of what JavaBeans are:

    JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool. Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that they can be passed around as a single bean object instead of as multiple individual objects. A JavaBean is a Java Object that is serializable, has a nullary constructor, and allows access to properties using getter and setter methods.

    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 must have a public default constructor. This allows easy instantiation within editing and activation frameworks.
    • The class properties must be accessible using get, set, and other methods (so-called accessor methods and mutator methods), following a standard naming convention. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties.
    • The class should be serializable. This allows applications and frameworks to reliably save, store, and restore the bean’s state in a fashion that is independent of the VM and platform.

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

    POJO

    A Plain Old Java Object or POJO is a term initially introduced to designate a simple lightweight Java object, not implementing any javax.ejb interface, as opposed to heavyweight EJB 2.x (especially Entity Beans, Stateless Session Beans are not that bad IMO). Today, the term is used for any simple object with no extra stuff. Again, Wikipedia does a good job at defining POJO:

    POJO is an acronym for Plain Old Java
    Object. The name is used to emphasize
    that the object in question is an
    ordinary Java Object, not a special
    object, and in particular not an
    Enterprise JavaBean (especially before
    EJB 3). The term was coined by Martin
    Fowler, Rebecca Parsons and Josh
    MacKenzie in September 2000:

    “We wondered why people were so against using regular objects in their
    systems and concluded that it was
    because simple objects lacked a fancy
    name. So we gave them one, and it’s
    caught on very nicely.”

    The term continues the pattern of
    older terms for technologies that do
    not use fancy new features, such as
    POTS (Plain Old Telephone Service) in
    telephony, and PODS (Plain Old Data
    Structures) that are defined in C++
    but use only C language features, and
    POD (Plain Old Documentation) in Perl.

    The term has most likely gained
    widespread acceptance because of the
    need for a common and easily
    understood term that contrasts with
    complicated object frameworks. A
    JavaBean is a POJO that is
    serializable, has a no-argument
    constructor, and allows access to
    properties using getter and setter
    methods. An Enterprise JavaBean is not
    a single class but an entire component
    model (again, EJB 3 reduces the
    complexity of Enterprise JavaBeans).

    As designs using POJOs have become
    more commonly-used, systems have
    arisen that give POJOs some of the
    functionality used in frameworks and
    more choice about which areas of
    functionality are actually needed.
    Hibernate and Spring are examples.

    Value Object

    A Value Object or VO is an object such as java.lang.Integer that hold values (hence value objects). For a more formal definition, I often refer to Martin Fowler’s description of Value Object:

    In Patterns of Enterprise Application Architecture I described Value Object as a small object such as a Money or date range object. Their key property is that they follow value semantics rather than reference semantics.

    You can usually tell them because their notion of equality isn’t based on identity, instead two value objects are equal if all their fields are equal. Although all fields are equal, you don’t need to compare all fields if a subset is unique – for example currency codes for currency objects are enough to test equality.

    A general heuristic is that value objects should be entirely immutable. If you want to change a value object you should replace the object with a new one and not be allowed to update the values of the value object itself – updatable value objects lead to aliasing problems.

    Early J2EE literature used the term value object to describe a different notion, what I call a Data Transfer Object. They have since changed their usage and use the term Transfer Object instead.

    You can find some more good material on value objects on the wiki and by Dirk Riehle.

    Data Transfer Object

    Data Transfer Object or DTO is a (anti) pattern introduced with EJB. Instead of performing many remote calls on EJBs, the idea was to encapsulate data in a value object that could be transfered over the network: a Data Transfer Object. Wikipedia has a decent definition of Data Transfer Object:

    Data transfer object (DTO), formerly known as value objects or VO, is a design pattern used to transfer data between software application subsystems. DTOs are often used in conjunction with data access objects to retrieve data from a database.

    The difference between data transfer objects and business objects or data access objects is that a DTO does not have any behaviour except for storage and retrieval of its own data (accessors and mutators).

    In a traditional EJB architecture, DTOs serve dual purposes: first, they work around the problem that entity beans are not serializable; second, they implicitly define an assembly phase where all data to be used by the view is fetched and marshalled into the DTOs before returning control to the presentation tier.


    So, for many people, DTOs and VOs are the same thing (but Fowler uses VOs to mean something else as we saw). Most of time, they follow the JavaBeans conventions and are thus JavaBeans too. And all are POJOs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have seen some similar questions here on stack-overflow, but in my application i
Okay I have seen some very similar questions here but none seem to be
I have seen some similar questions on stackoverflow and on searched on google too
I have seen some questions similar to this on the internet, none with an
I have seen some similar questions here, but the answers dont solve my problem.
I have seen some related questions but none focusing on the specific problem I
I've seen some similar questions on stack but I don't think this is a
I'm trying not to duplicate questions obviously as I have seen some questions/answers regarding
I've seen some similar questions, but nothing quite like what I'm trying to figure
I have seen a few similar questions but I am trying to achieve this.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.