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.
Strengths and Weakness in the Java programming lang and api's: 1) Api's problems: I have heard about api's in java when used together are not compatible and or become "brittle". I would like to know what experiences any of you had with this? I have not, but I am still a beginner/intermediate.
2) Speed and Java vs Other langs: Also how much faster is Java in comparison to perl and VB ? I have heard so many complains on java being so yet I have rarely if ever heard people complaining about VB or perl being slow! Double standard yes, but I want to know of the facts!
3) Bruce Eckel and others have complained ( rightfull so ) Primatives are not fully objects, ( when using the uppercase primatives ) the objects for primitives and not readable and writable, to my knowledge they are only readable. Yes java has and should have C style primatives that are not objects for instances in which one needs speed. But There should be primatives in java that are fully objects also to be able to use. PS: I have not programmed in java for a month so if any mistakes are here I am sorry.
1) Brittle is an OO concept not a Java concept. It has to do with the tight coupling that occurs when you use inheritance instead of composition (interfaces). When you sub-class your implementations are closely aligned to the super-class making them brittle (not flexible). I am not sure how this relates to the API's? 2) the JIT compiler that comes by default with the JRE and is turned on by default has taken care of most of the speed problems that Java started out with. 3) Primitives are called primitives because they are not objects. So you will not find them in any class. Java is ALMOST a pure OO language, except for the primitives which were allowed for efficiency, and for the String Literal behavior which is a shortcut and adds efficiency, and arrays which have some specific non-OO behavior other than that it is completely OO. Notice that C++ is not a pure OO language, VB is not even CLOSE, etc. There ARE a few pure OO languages out there though.
[This message has been edited by Cindy Glass (edited April 12, 2001).]
"JavaRanch, where the deer and the Certified play" - David O'Meara
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Joined: Sep 27, 2000
What I was trying to say is that, with primitives in the java language, we should be able to choose to use primitivest that are not objects and primitives that are pure objects and not the the " wrapper classes" which are not like the object String or Object in the java.lang. API. What I meant with Brittle (brittle meaning easy to break, fragile) meaning that some api's may not work well together the opposite of AWT and Swing in which both work well together.
With Java's speed people are still complaining about java speed even with jdk 1.3. Because it is not fast like C++,and C. It needs to be 90+ percent of the speed of C and C++ or people with attack java unfortuately. Also I would like to know how much faster is Java to perl and VB ? I have heard so many complains on java being so yet I have rarely if ever heard people complaining about VB or perl being slow! Double standard yes, but I want to know of the facts!
Originally posted by erich brant: What I meant with Brittle (brittle meaning easy to break, fragile) meaning that some api's may not work well together the opposite of AWT and Swing in which both work well together.
Have any examples? I am not aware of any cross API incompatibilites.
With Java's speed people are still complaining about java speed even with jdk 1.3. Because it is not fast like C++,and C. It needs to be 90+ percent of the speed of C and C++ or people with attack java unfortuately. Also I would like to know how much faster is Java to perl and VB ?
This is one of the sillier things I hear every once in a while. First off, for 99.9% of applications, it is network latency and database access that cause programs to be slow whether they are C, C++, or Java. If it takes 5 seconds to make a connection to the database who cares if C takes 200 milliseconds and Java takes 300 milliseconds to process the data. I have run comparisons between C and Java against huge LDAP databases and have found no difference between C and Java when it is run through a JIT compiler.
Michael Kay said that he has improved his XSLT processor performance �by a factor of 20� by applying various optimization techniques. quote: �It is often said that Java is slow. There is some justification in this, but the statement needs to be carefully qualified. Many people imagine Java is slow because it generates interpreted bytecode rather than native code. This used to be true, but not any longer with today's just-in-time compilers. Raw code execution speed is usually almost as good as -- sometimes better than -- the equivalent code written in a compiled language such as C. Where Java can have a problem is with memory allocation...�
[This message has been edited by Mapraputa Is (edited April 27, 2001).]
Originally posted by Mani Ram: I think this should be moved to one of the Java in General forum!
Well, it had been lying dormant and unnoticed for over two years, well out of sight. I don't know about any other moderators, but I know that I for one don't have the time or energy to go through the entire history of this or any other forum to shuffle around posts that may have been made to the wrong forum sometime over the past few years. This may have actually been the appropriate forum back then. While I appreciate the heads up, my suggestion for anyone who stumbles on a long dead thread that they think might belong somewhere else would just be to let it lie dormant and forgotten. [ October 07, 2003: Message edited by: Jason Menard ]