Domain: javaworld.com
Stories and comments across the archive that link to javaworld.com.
Comments · 183
-
What about UML modeling tools?Most of the people here seem to equate GUI development environments with RAD tools for fast building of UI forms (dialogs, etc). [I do not mention the "IDE aspect" here, since few would call Emacs a GUI tool, but it can be a full featured IDE nevertheless]
There is another class of GUI tools, however, that allow you to incorporate UML diagrams within your design and development process. I guess that the two programs that best represent this class of "modeling tools" are RationalRose and Together.
RationalRose is more popular, since it was out first, and essentially set the standard, but it supports only a one-directional process (unless that has changed recently) -- design your UML diagrams, and generate code from them (some OO people actually see this as an advantage, but that's another discussion).
Together, on the other hand, is bi-directional -- it constantly updates the UML diagrams to keep them in sync with the code you are writing. As a result it has the neat property that you can actually write your code w/o going through the UML modeling/design stage, and yet you get complete UML diagrams of the code when you are done.
Personally, I am ambivalent about the utility of RAD tools for building GUIs -- they can be great for quick prototyping, but on the other hand they tend to produce code that is not very maintainable and thus not too suitable for large commercial application (although a lot of people are so used to them, that it is hard for them to see the alternatives).
On the other hand, UML modeling tools can be tremendously useful, especially in team environments. A picture is worth a thousand words, and that is very true even in programming. Even if you do not use UML for design, Together's ability to generate diagrams representing the code is invaluable when you have to take over or maintain someone else's code. It is much easier to see how classes relate to each other at a first glance, than to try to figure that out by going through the code manually.
-
Re:It is a good education language.
Also, in Java, there's no way to pass variables by reference. So, in order to have a method change a value that you pass to it, you have to encapsulate it in a class. Either a custom one, or something like Vector - which is not cleaner. Also, teaching someone to rely on Garbage Collection is insane, it teaches someone to write sloppy code. Java is not a cleaner environment, and it doesn't teach people to write cleaner code.
Obviously you don't understand the language, because your "pass variables by reference" comment is completely inaccurate as shown by this response.
I've seen Java coders who STILL can't figure out how to dispose of memory, basically don't understand the difference between stack and heap, and don't understand pointers well enough to dispose of an element of a linked list.
Secondly, this is exactly the point of high(er) level languages: To eliminate details that are better solved by the machine, or previously by someone else. I've seen C/C++ coders who still can't produce binary output by hand from their source files. They're so stupid they have to use a compiler.
No, it doesn't. By virtue of using Garbage Collection, it is taking memory management out of the hands of the developer, teaching people to be lazy when it comes to object instantiation and use
Garbage Collection is completely unrelated to the concepts of Object Oriented Analysis and Design. Automatic Garbage Collection allows one to focus on solving a problem. Forcing manual garbage collection is a step backwards in any modern language. It's a detail that the machine is better able to deal with, as it should be. Automatic Garbage Collection is a concept that can be applied to many differing programming languages and it is a detriment in none of them.
So, in order to have a method change a value that you pass to it, you have to encapsulate it in a class
Or behavior more commonly known as a side-effect. And also best to be avoided when dealing with Object Oriented Programming. A common mistake of many C/C++ programmers is to get caught in the procedural traps introduced and taught by C and adapt those same concepts, wrongly, into their OO work when using C++. This is probably the reason why you think encapsulating your value in a custom class is a poor decision. Maybe you should study the term encapsulation.
And as for your comments about ease of learning. It may be easier to learn C/C++ (which is the biggest source of problems: C is a procedural language, C++ is not, but the grouping of these two together produces disastrous results), but that ease is because people learn the wrong way to write OO code. Java teaches, or forces, the correct way. After learning the proper way in Java, you'll find that you actually write better OO C++.
Java allows you to solve problems, C++ allows you to solve details. As an employer, I know which one I'd want you to deal with. -
Re:Define a problem domain for your languagehttp://www.javaworld.com/javaworld/jw-04-2001/jw-
0 406-ai.html:Some programs are better written by software than by humans. In particular, if the program can evolve against a fitness test, it can be optimized far faster than the time in which it would take a human to identify and optimize by hand. For example, a compiler could be subjected to genetic evolution. The fitness test would always include correctness, but could also include the size of generated output, speed of generated-output execution, or speed of compiler execution.
-
Re:Hmmm...>> Java but there aren't the development tools to allow things like dynamically discovering self-documenting services on the network.
Perhaps you are posting without knowing the opposition? Have you not heard of JINI? I quote:
- Jini[tm] network technology provides a simple infrastructure for delivering services in a network and for creating spontaneous interaction between programs that use these services regardless of their hardware/software implementation. Any kind of network made up of services (applications, databases, servers, devices, information systems, mobile appliances, storage, printers, etc.) and clients (requesters of services) of those services can be easily assembled, disassembled, and maintained on the network using Jini Technology.Services can be added or removed from the network, and new clients can find existing services - all without administration.
I am not sure what issue you have with installing the Java Plugin (since I have it working on every machine here). Perhaps it is your system?
Does it matter if Microsoft ports
.NET to Linux, BSD, BeOS, etc? How many of us would even be willing to use it? Besides the inherent incompatabilities Microsoft will most likely FORCE on it, how can you even trust their product to be stable? I can't even get their page about .NET to LOAD from ANY BROWSER! Tell me that is accessible from anywhere.But enough about justified Microsoft Bashing. I am not denying that people will get
.NET because they don't know better (ie: see MSN/AOL) -- but don't fool yourself into thinking that they are creating something New, Unique, or Better. -
Re:M$ doesn't matter
M$ has ways: Remember Java?
In case people have forgotten, M$ has also successfully used the embrace-engulf-devour strategy very successfully against "threats" like Java.
In fact, that's the way the Halloween Document II recommends Linux be marginalized, and I think .NET is a credible attempt at following that advice.
The approach used against Netscape is not so relevant, but the one used against Java may work nicely. -
Re:Comments on the review, not the bookCreating a fast website with lots of server-side computing with a stateless transaction model is tricky, and some description of how to introduce caching of any kind into a load-balanced world seems like the most important single contribution a book like this would make to my library.
Here's an article covering the load balancing problem.
-
Re:CPU power needed to backend JSP pages?RAM is what counts most. Followed by disk access speed, db drivers, network cards/drivers and finally CPU.
The best machine for the job is an AS/400, but your Pentium is probably up to the task. More RAM would help heaps.
-
Re:This is Brilliant Research (not)
Revenue for AS/400 and S/390 systems continuing to decline slowly through 2005 as in previous forecasts - both AS/400 and S/390 will remain viable investments throughout the next five years -- For what, pre-y2k accounting packages that drive dot-matrix printers?!
For Java. Seeing as how it shattered some Java benchmarks by an order of magnitude. -
Here
This is a slightly old, but good article: http://www.javaworld.com/javaworld/jw-04-1997/jw-
0 4-optimize_p.html -
More JavaSpaces links...
-
More JavaSpaces links...
-
More JavaSpaces links...
-
More JavaSpaces links...
-
More JavaSpaces links...
-
Re:It depends!
CGI? and Perl?
Not if you want to handle millions of transactions, you won't.
Distributed N-tier architecture, scalable and capable of handling serious loads. Good load balancing in software and hardware. Distributed databases, LDAP for user reg's, cache for the data. Batch processes that run when there is not too much traffic to update and clean your cache. Transaction management, distributed transaction management on different systems.
Resource management, memory, RAID systems, caching, HD space.
If you want to be multiplatformed and n-tiered, go here: http://divya.com/pubs/ejb/ and here: http://www.javaworld .com/javaworld/topicalindex/jw-ti-ejb.html Or here: http://www.cs.rutgers.edu/~shklar/isas98/
And all this is just a beginning of understanding. You actually need a good Software Architect(s) in order to optimize your performance under heavy loads, good Interface Designer(s) to optimize the user interface, good graphics designer(s) to be efficient and good looking, coder(s) who do your *ml work
here is what I do for living, just click on 'Product' there. -
Learn to localize Web content
There's an article on JavaWorld how to do this using JSP. I have no idea how PHP works, but maybe the same ideas apply.
-
An interesting way to connect a DB & XML
People have discussed the database connection. I came across this article at Javaworld (via the Javalobby site). It describes a different way of using XML with databases.
Instead of converting the entire database to an XML file, which consumes a lot of resources, and has synchronization issues, this approach places an XML API frontend on the JDBC system. This creates a "virtual" XML document that other XML tools can access via DOM or SAX.
For example, they create a SAX frontend for JDBC, and use it with a SAX-based XSL tool (XT) to transform the data to HTML. So, for example, where the database encounters a column for CustomerName, the template for a CustomerName entity in the XSL sheet is triggered. To the XSL tool and stylesheets it seems as if they are accessing an XML document.
http://www.javaworld .com/javaworld/jw-01-2000/jw-01-dbxml.html -
Question regarding JSP vs. WebMacroThanks for the informative information regarding the MVC approach to servlet design. As a long time java programmer -- but new to servlets -- I am starving for good ideas/advice in this area.
My question is regarding your warnings about JSP. I not sure I understand the design differences between JSP's and the WebMacro approach. Is it that the latter is simpler to use than java?
I haven't used JSP's yet, so please forgive me if I'm missing something obvious.
BTW, another article along the same lines is Design Java servlets with the Delegation Event Model.
-
And where are the other Java Chips?Everybody was thinking of "Java Chips" a couple years ago:
- New this fall is Sun's MAJC
- Patriot shBoom (a 1996 relabelling of Chuck Moore's 32 bit FORTH chip)
- IBM's Java Chip - 1997 - apparently some extra logic hung off a PPC logic set
- Sun Scrapped their initial Java Chip
- UC Berkeley students designed one for a CS course
- Rockwell had one...
None of these have really gone anywhere in terms of influencing Java deployment.
The only way they would have been important is if:
- Network Computers had taken off, but they didn't.
- Java was getting deployed heavily in embedded systems. That factor is not evident.
-
And where are the other Java Chips?Everybody was thinking of "Java Chips" a couple years ago:
- New this fall is Sun's MAJC
- Patriot shBoom (a 1996 relabelling of Chuck Moore's 32 bit FORTH chip)
- IBM's Java Chip - 1997 - apparently some extra logic hung off a PPC logic set
- Sun Scrapped their initial Java Chip
- UC Berkeley students designed one for a CS course
- Rockwell had one...
None of these have really gone anywhere in terms of influencing Java deployment.
The only way they would have been important is if:
- Network Computers had taken off, but they didn't.
- Java was getting deployed heavily in embedded systems. That factor is not evident.
-
Re:Will book solve Swing's slowness?
True, swing is slow ate the moment. But it has been steadily improving. One of the main reasons for its perceived slowness is that it takes a long time to load the classes. Swing is a very complex framework and thus even simple swing programs load a lot of classes.
As an illustration. Back in the days when swing was still beta, you were better of running swing programs with the interpreter than than with the JIT. The simple reason for this was that a JIT compiler compiles all classes that are loaded, including those that are rarely executed. BTW. I was working on a pentium 133 with 64 Mb in those days. Even though the loading time was very high, the performance after loading was quite OK (again on a pentium 133).
What this anecdote proves is that it's not so much the raw peformance of the interpreter that is causing the bad performance but the dynamic class loading. JIT compilers generally only make dynamic class loading an even more expensive operation.
If I remember correctly it is exactly this problem (slow loading of swing classes) that is being targeted by jdk 1.3 beta. I'm really looking forward to improvements in this area.
If you are interested in how to make your Java programs faster, you should check out this article. It provides an excellent background on how Java manages its objects. -
Real benchmarks
Check out this Java World article for real benchmarks for a variety of JDKs on Intel hardware. The scalability (page 2) is both interesting and disappointing. The numbers on the Blackdown and Kaffe JVMs really show how badly a new JVM is needed for Linux. --JRZ
-
Re:but in all seriousness...What have you been able to do with the Java in your ring?
JavaRing was an implementation of JavaCard API for smart cards. The rings were manufactured by Dallas Semiconductor
Dallas Semicondutor puts JavaTM technology power in the iButton, a portable computer chip armored in stainless steel and wearable as jewelry or other personal accessory. In fact, the iButton in the JavaTM Ring gained attention as the first successful application of the Java CardTM 2.0 specification. A Java technology-enabled iButton conforms to the Java Card 2.0 specs and adds enhancements for a superior Java programming environment -- such as 32-bit Java technology integers, automatic garbage collection, and a true-time clock. Each iButton has a unique ROM registration number to which a PIN number can be attached for the same level of security banks use. Moreover, the ROM number is Java technology-accessible and supplements IP addresses, making all mobile iButtons globally addressable. Besides being physically tough and tamper-resistant, the Java technology-enabled iButton carries 800,000 transistors for cryptographic processing. A high-speed processor with a math accelerator performs the encryption to generate a digital signature in less than one second. One iButton's high-capacity NV SRAM can support multiple applications, thus maximizing the possibilities for a variety of secure Java Card technology transactions.
For more articles about JavaCard API go here.Smart cards are quite popular in Europe, where magnetic credit cards never got to the same level of popularity as in the US. Smart cards haven't taken off in the US because VISA and MasterCard are restraining competition.
-
Swing is not pure MVC.At least, swing developers wrote so in Java World. I'm somehow subscribed to it
;), though I'm not sure if the mag's called Java World.Nevertheless, the swing developers wrote that Java Swing libraries manipulate the original design pattern so that you don't have a model, view and controller object but a model and UI delegate. Well, or something like that. I think they have a reason for that: this way you have many benefits of separating model and UI code but it's still pretty simple to write apps. Hope I approximated the main theme in that article.
-
Swing is not pure MVC.At least, swing developers wrote so in Java World. I'm somehow subscribed to it
;), though I'm not sure if the mag's called Java World.Nevertheless, the swing developers wrote that Java Swing libraries manipulate the original design pattern so that you don't have a model, view and controller object but a model and UI delegate. Well, or something like that. I think they have a reason for that: this way you have many benefits of separating model and UI code but it's still pretty simple to write apps. Hope I approximated the main theme in that article.
-
Re:Some suggestions for MassacrE
It has been multi-paradigm from the start. That is one of it's strengths and one of Java's shortcomings.
To me, C++ trying to be both procedural and OO language is it's greatest weakness. Like you have heard so many times before, right tool for the right job. When I need to go low level, procedural languages like C do the job very nicely. When I need to do OO, I rather choose the language with elegant, and pure OO support, like Smalltalk, Eiffel and Java have (and now all the smalltalkers will jump out and scream how Java is not nearly as pure a OO language as ST is). Anyway, it does alot better job at it than C++ does, IMHO.
For that matter though, I've yet to see any very large systems coded in Java either.
Admittedly, I can't give you the exactly LOC counts for these projects, but some largeish Java projects I know of include:
- www.etrade.com (for a description how they use Java, check out this article)
- IBM's SanFrancisco Framework
- www.first-e.com online bank
- NextRx from Flux
- A whole bunch of application servers written in Java
I can however point to a multitude of 150,000 - 30,000,000 LOC projects written in a mixture of C/C++. Linux/KDE/NT/(Name your *NIX).
Well, perhaps this is because both C and C++ (and even Perl) have been around alot longer than Java? :)
- www.etrade.com (for a description how they use Java, check out this article)
-
Wasn't this the Microsoft killer just a while ago?Oracle's Ellison used to preach the NCA as the death of Microsoft (at least for Windows) In
his vision the only program running locally would
be netscape with java. Sun's
idea was simular
but based purely around java.
Basically the whole thing was deisgned to
make the OS unimportant on the client.
Well
Sun still makes the JavaOS machines and Oracle's
offspring company NCA is still kicking around
but they neither really took off. Strangely
enough MS's entry truely fopped.
This all leads me to wondering why Microsoft
is trying to push this forward again. What
exactly do they think they'll gain? -
Yup - going back to roots
See this JavaWorld article from a former Sun engineer. This is about Java from the embedded point of view.
-
Reporter jumping to conclusions?Unless I missed something, the IBM guy did not say that they were going to support Linux only now, just that it would be cheaper. This is pretty obvious - it's cheaper to support one OS than lots.
I think they would have difficulty trying to get everyone to use just Linux, in companies and deperatments where they currently have no Linux installations, and hence so sys-admin. This is for enterprise level stuff, so this is important.
At the moment, all they seem definate about is adding Linux support, to their current list. Migrating to Linux-only seems more like wishful thinking in the short/medium term.
(gripe mode on) If you're going to post stories like this, why couldn't you post one I submitted the other day - Sun licensing their JavaServer Pages/servlet source code to the Apache Group, and letting Apache distribute that source code under the Apache license. see the Jakarta home page and this JavaWorld article(grip mode off)
-
'open' HotSpotI'm too tired to write much (I love all-night coding sessions, honest). As some general points...
1) if you're going to use HotSpot, read all the docs. It's quite easy to write a simple 'benchmark' that goes really slow on HotSpot. (then change about 2-3 lines and it goes 20x faster)2) Performance really does vary a lot. Best are predominantly Java server-apps - typical speed-up is 2-4 fold.
3) Client/graphics don't change up because most of the time running for them is in the binaries, not Java byte-code. According to Java's creator, the graphics guys are spending all their time making the code faster and leaner the moment...
4) JavaWorld HotSpot article - checkout the VolanoMark scalability on Solaris - WOAH! (half way down)
5) Apps with heavy object usage really do benifit. I've seen one example with a compiler with a C++ and Java version. The Java version with HotSpot was 50% faster than the C++!
6) Garbage collection and memory allocation is amazing - hardly notice garbage collection any more, and some people reckon the object allocation (on the 'heap') is as fast as C++'s on the stack! (in C++, allocating to the stack is much faster than the heap)
7) The HotSpot code was designed to be highly portable
8) HotSpot is free to use.
9) HotSpot will come out under Sun's "Community Source liscence" in about 6 months. (enough time to patent everything?)
-
Javaworld
Check out JavaWorld - they have done lots of performance tests in the past including ones with other languages (C/C++ I think).
-
Has Java Progressed wrt Generic Programming?
Thanks to some changes that were made in Java 1.1, you can now do generic programming in Java reasonably well. Interested folks should check out the Java Generic Library, a "port" of the C++ Standard Template Library to Java.
One thing the author of the above article writes is that there is almost no performance penalty in using the C++ STL, but there is a considerable penalty in using the Java equivalent (all those downcasts from Object to whatever class you're using cost).
-
Eat Cookie Spam or Get the Hell Outa 'Dot
1. Another slap in the face for us cookiephobic conshies. I can't be alone in associating cookies with ASP and all things Microsoft - maybe it's the way you can't turn them off in IE3. It's a freedom thing. Anyway the cookie crumbs'll be all over your smug face when M$ patent them à la CSS/doorknobs. Would it kill you to propagate that smidgeon of state in a munged URL? Pre-cookie browsers? It's not as though - judging by your workrate of late - you're afraid of a good hard hack. It's possible to be a model Slashdotter - a 24/7 unanonymous lurker - without actually being logged in.
2. Personally, I like the "What did you think of this article?" radiobuttons ("Not worth reading","Worth reading","Very worth reading") on JavaWorld. If every comment had one of these you'd soon sort the clueful from the Kiplings. People would only vote for the ones they rated or hated because it's such a pain in the Gates to interrupt your clickstream. As for the number of moderators - why arbitrarily limit it? As someone posted earlier, it's much easier to let everyone have moderation power equal to their running approval rating. What is it ESR says about egoboo and geek credits? Words made flesh - or rather code: the more votes you receive the more you can spend. Simple to implement - well, simple for me to say at any rate :-) - and self-regulating.
3. Geek du jour, jwz, once posted a defence of some earlier eroded liberty - was it the noble right to anonymity? - where he basically said: if you assume people are gonna abuse the system they will. Treat people like original sinners and they'll crack open a few misdemeanours just so as not to let you down. Too many precautions against the dark side and you start to squeeze the force.
4. Props for what you've done so far. It's good. It's getting better. One in the eye for those who thought Signal v Noise would end in a penalty shootout.