This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
People may argue about specifics about what that term means, but it is very hard to say java is. The reason is simple, there are data types that are not objects(primitives), and if you really wanted to, you never have to use objects.
native libraries are libraries that are native to a language. The java library is one, the C++ standard and template libraries are another. Something to note about them, they are not always the best solution to a specific problem, so going outside of them for things like data structures, or even writing your own in necessary. The generic nature of them makes them useful but usually at a performance cost.
It is a fairly rare occurence that you need something else, but that fact and the fact that learning how to use libraries does not a programmer make.
�Re-use of previous work: using implementation inheritance and object composition.
�Real mapping to the problem domain: Objects map to real world and represent vehicles, customers, products etc: with encapsulation.
�Modular Architecture: Objects, systems, frameworks etc are the building blocks of larger systems.
Also, you can complement it with AOP (Aspect Oriented Programming). Supports inheritance, encapsulation and polymorphism. That is good enough for me to build build applications
with increased quality and reduced development time. If 90% of the new application consists of proven existing components then only the remaining 10% of the code have to be tested from scratch. In theory anyway.
Originally posted by Robert Hill: People may argue about specifics about what that term means, but it is very hard to say java is. The reason is simple, there are data types that are not objects(primitives), and if you really wanted to, you never have to use objects.
fred said it best. Asking "Is Java Object Oriented" is a silly question that gets asked way too often, and generally doesn't help anybody learn anything about Java, about "OO" ... and one that certainly doesn't help anybody design or program any better.
PS: Hopefully the question "What are native libraries?" was answered to your satisfaction. My answer would be:
"Native Libraries" are functions written in another language, and executed outside of the JVM. Native libraries are usually written in C or C++, and usually do something that would be inefficient - or impossible - to do directly in Java. Native functions are invoked using "JNI" (Java Native Interface). [ March 01, 2006: Message edited by: Paul Santa Maria ]
It might be a useful question if it makes the original poster research and think about what "object oriented" is and is not. My personal view of "pure OO" is everything is an object and every operation is a message. In my short exposure to SmallTalk it seemed very pure and self consistent in this way, but I won't venture a percentage pure.
I think the Java/OO community lost a lot of meaning when it moved away from the "message" vocabulary. I liked reading "1 + 2" as sending the message "+ 2" to the "1" object. It seems to encourage me to think about "ask, don't tell" designs.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Tony Morris: ...not that I advocate the Smalltalk nonsense.[/QB]
I'd find it easier to listen to what you advocate if you wouldn't label everything else as "nonsense"...
Joined: Jan 29, 2003
The name of a Smalltalk method is the method and the parameters, so I think of it as the "+ 2" or "+ n" message. Not that it matters in this discussion. Smalltalk has a certain inner beauty; the fact that it was so totally backwards from what I knew before - from syntax to design - was quite challenging and exciting. I was disappointed we did not continue with it and it didn't catch on better in the industry. I think we'd all "get" this OO stuff better if we worked so backwards all the time.
Paul Santa Maria
Joined: Feb 24, 2004
There's an extremely interesting interview with Alan Kaye (the inventor of Smalltalk) - with much discussion of what he likes (and dislikes) about Java here: