Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,744 members, 7,806,039 topics. Date: Tuesday, 23 April 2024 at 10:33 AM

Value Objects In Java - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Value Objects In Java (1174 Views)

I Need A Detailed And Expert Help In Explanation Of Classes And Objects In C++ / I Want To Develop A Software In Java To Calculate CGPA / How Do Io Create Ribbon Ui In Java (2) (3) (4)

(1) (Reply) (Go Down)

Value Objects In Java by harryobas: 5:24pm On Jun 13, 2013
Both reference and value objects are complementry concepts used in every mordern object-oriented software system.In java, the concept of a value type is reduced to mean "primitive data types" like integer, float, or string.The most prominent advantage of value objects over conventional reference objects is that value objects are side-effect free since values cannot be referenced, they cannot be shared in different contexts thereby omitting many of the side-effect problems that haunt large conventional object systems. Also value objects are inherently more efficient than reference types in terms of performance.Pure object-oriented proramming languages like java for example suggest to implement everything as an object.My experiences in a number of development projects suggest that this approach is counterproductive, if not outright harmful. In my projects, i therefore do not only work with conventional object types, but also with domain-specific value types to overcome the problems a naïve object model causes. Some examples of value type abstractions include dates, currencies, monetary amount, account numbers, address etc. Values in computing are instances of value types. Want value objects in java? Then check out JValue a value object framework hosted on sourceforge.
Re: Value Objects In Java by javadoctor(m): 6:53pm On Jun 13, 2013
So?
Re: Value Objects In Java by harryobas: 7:28pm On Jun 13, 2013
@javadoctor my point is that java does not provide native support for implementing user-defined domain-specific value type. Which is a shame becos the concept of value types in object-oriented paradigm is as important as reference types. C# for example provides this support through the use of Structs.
Re: Value Objects In Java by javadoctor(m): 3:52pm On Jun 14, 2013
That is very wrong ,it seems u don't understand the very fundamental concepts of object and classes. The primitive types are of wrapper classes and do not require the keyword new in instantiating an object,when u say String s ="name":
Its the same as saying String s = new String("name"wink; . Since String is a type from a wrapper class doesn't nt require explicit declaration. If I name a class Order,for instance an order class entity used to represent items in an arraylist shopping cart. That array list is restricted to a type Order class object.hence your object type is defined. In summary,one u name a class,u have created a type.
Re: Value Objects In Java by kambo(m): 5:12pm On Jun 16, 2013
harryobas: @javadoctor my point is that java does not provide native support for implementing user-defined domain-specific value type. Which is a shame becos the concept of value types in object-oriented paradigm is as important as reference types. C# for example provides this support through the use of Structs.

i dont really understand wat u sayg. Doesnt d ability 2 create used defined types thru classes empower the programmer 2 create all d types he cud ever fantasze about?
If u can create a class u can model any entity!
The available frame wrks are created for operational enhancements to d language to circumvent som bottle necks imposed upon by d particular language's world view of how to do thngs - and the bottle necks are INEVITABLE since every position of operation adopted by language x will involve trade offs, pros and cons!. Enlighten me som more on wat ur sayg!
Re: Value Objects In Java by javadoctor(m): 6:46pm On Jun 16, 2013
@kambo I don't like u in person but I'm afraid I have to agree with u on this one.
Re: Value Objects In Java by kambo(m): 9:39pm On Jun 16, 2013
javadoctor: @kambo I don't like u in person but I'm afraid I have to agree with u on this one.

havg any degree of negatve feelgs against a fellow poster on a bland forum like this is immature. Think how ridiculous it wud seem if a perl, fortran , bcpl,forth, programmer said this . Negatves, transient fadg technologies - not wrth it. everythg is fadg away. Call d garbage collectr on antiquated attachments.

(1) (Reply)

Programmer Vs Developer / A Student Needs Your Advice.PLEASE! NAIRALANDERS / Where Can I Get "C# How To Program" Textbook

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.