In this batch of letters, readers respond to 'Building user interfaces for object-oriented systems, Part 1,' by Allen Holub; the Media Programming series by Bill Day; 'What's in Java's future,' by Jeff Friesen; and 'Plug into Java with Java Plug-in,' also by Jeff Friesen ‘Building user interfaces for object-oriented systems, Part 1,’ by Allen Holubhttp://www.javaworld.com/javaworld/jw-07-1999/jw-07-toolbox.htmlReader disagrees with single-view-into-object theoryAllen, Very interesting article, indeed. In general, I agree. However, I can’t share your opinion that there is typically only one view into an object.We are currently implementing a workforce-management application, helping technical staff make plans. The main object is a work order and its associated tasks.You can display the work order and every task in a mask. This corresponds with your article.We have an overview mask that shows the most important properties of a work order in each row (we might try to get those rows produced by the workorder object; however, this only matches with the JTable model when we fetch cell editors/renderers for each cell, which is very annoying).Don’t laugh: we have a chart that shows the distribution of work orders by priority. In order to calculate the numbers, I need each work order’s priority.We have a Gantt-chart that shows the tasks vs. staff member and time. While you might think of having each task contribute its bar to the graph, with all the zooming and filtering I really don’t believe this is feasible with reasonable effort.When dispatched, the work order has a begin and an (estimated) end time. Those times can be viewed from the Gantt-chart, of course, from the mask displaying the task itself, and from the mask displaying the times in the staff member’s personal scheduler. Again, different representations of the same (model) data.In order to handle this, we are quite happy to have separated the model and the views. Of course, as I said above, I can think of having the model-objects provide their contribution to the view. But I think this increases complexity without providing an appropriate payback for maintenance. (Actually, we do use the mask-component-producing pattern in other places. We want to have the management of locations as a pluggable component to support different location management systems. So the part of the mask where the user selects the location for the task is produced by a location management object and has an interface that simply allows me to get the selected location as opaque reference when the mask has been filled.)Looking forward to your next article in the series,Michael Lipp Michael, I can’t really give your note the reply that it deserves, but the short answer is that this is exactly the subject of my next couple of columns. Nevertheless, here are some brief comments: You can display the work order and every task in a mask. This corresponds with your article.We have an overview mask that shows the most important properties of a work order in each row (we might try to get those rows produced by the workorder object; however, this only matches with the JTable model when we fetch cell editors/renderers for each cell, which is very annoying).I f I understand correctly, you’re saying that the various attributes of the work order need to be displayed in a different way on the summary than when you print a complete work order. This is actually quite straightforward to implement in a way that doesn’t violate the integrity of the object. I’ll be discussing the architecture next month and providing an implementation the month after. Don’t laugh: We have a chart that shows the distribution of work orders by priority. In order to calculate the numbers, I need each work order’s priority.A ctually, you don’t. You do need to sort the work orders in priority order, but you can do that by asking a given work order, “Is your priority higher or lower than the priority of this other work order?” This can be achieved as follows: rank = work order.compare_to( other_workorder); // Works like String.compareTo() We have a Gantt-chart that shows the tasks vs. staff member and time. While you might think of having each task contribute its bar to the graph, with all the zooming and filtering I really don’t believe this is feasible with reasonable effort.T his one is perhaps harder, but not knowing exactly what the “zooming and filtering” entails, I can’t say one way or another whether it’s feasible. My general experience, vis-a-vis performance, is that I’m constantly surprised by how fast computers are. I’d probably build a prototype of this part of the system and see if it really is too slow before dismissing the architecture. If you could give me more details about exactly what’s going on, I could give it more thought. When dispatched, the work order has a begin and an (estimated) end time. Those times can be viewed from the Gantt-chart, of course, from the mask displaying the task itself, and from the mask displaying the times in the staff member’s personal scheduler. Again different representations of the same (model) data.N o, it’s not. What you’re doing (again) is displaying only a subset of the attributes of the work order. These attributes will be displayed in an identical way everywhere that they are displayed, so there’s no problem. At no point did I say that you have to display every attribute of a given object every time you display the object. I did say that the object must be in charge of displaying its own attributes, but there’s no conflict here. I hope the rest of the articles that I’m planning will make this all clear. Allen HolubMedia Programming by Bill Dayhttp://www.javaworld.com/javaworld/topicalindex/jw-ti-media.html Reader finds Java-OpenGL bias in Media Programming seriesBill,The Media Programming series hasn’t moved past the idea that Bill Day doesn’t like Java 3D’s approach and that he endorses Java bindings for OpenGL. Enough! Now I want to hear about using Java 3D. Jay SchiraJay, I believe that we have given Java 3D a fairly good technical introduction. In fact, two of the three columns in the series dealt almost exclusively with Java 3D and included example code. I had hoped, and intended, to give Java 3D and Java-OpenGL equal footing, and to indicate strengths and weaknesses for both. In the end, I hoped to let readers decide for themselves which approach is preferable for the programs that they are writing and problems they are facing. It is interesting that you detected a pro-Java binding for OpenGL slant; I heard similar objections from OpenGL binding fans, stating there was a pro-Java 3D slant. In any event, I hope that the series taken as a whole fairly addresses both technologies for most readers. If you have suggestions as to how I could improve this, please let me know so that I can update the material in future articles, for my Web site, and for my example code archive. Bill Day‘What’s brewing in Java’s future?’ by Jeff Friesenhttp://www.javaworld.com/javaworld/jw-07-1999/jw-07-winjava.html Questions about Microsoft’s stance on JavaJeff,Very nice article, and an excellent treatment of the current situation, in my opinion. I think you’re absolutely right that it’s almost impossible to predict what’s going to happen with Java since there are so many variables in the mix. The one issue I still don’t understand is why Microsoft takes the stance it does. Why bother trying to derail Java, when it could play 100 percent within the rules as specified in its contract, still have all the Windows-specific features it could want (via JNI and native binaries), and simply outproduce and outinnovate Sun?Surely Microsoft must realize that it can’t kill off Java or even convert it into a Windows-only development tool with both Sun and IBM determined to preserve its cross-platform capabilities. So why doesn’t it simply find a way to make more money with Java than anyone else, while still adding legal extensions that serve its private agenda? With Microsoft’s developers, does anyone really doubt it could do this?I keep hoping that Microsoft will have an epiphany about this issue, but it seems to be pursuing an agenda I just don’t understand. Perhaps if it loses the lawsuit it will be forced to change its stance. I have a copy of the contract, as it was posted online some time back. I’ve always been stunned that Microsoft signed something that open-ended, particularly regarding compatibility assessments. Basically it says that Microsoft’s Java versions made with Sun’s IP have to meet Sun’s compatibility tests, and there are no restrictions or conditions at all on what those will include. If Microsoft somehow wins this lawsuit, it will set a very weird legal precedent. Lou GrinzoLou, I agree with you that Microsoft is hard to figure out. There are so many factors at work. Probably the biggest are ego and a sense of invulnerability. It wouldn’t surprise me to find out that some individuals within Microsoft feel that Java has no business competing with the company’s vision of Windows everywhere. What is ironic is that Microsoft could achieve its goals if it would focus on delivering quality products with only the required features (that is, don’t embed a pinball game within Microsoft Word). Perhaps Microsoft should rethink its Windows strategy. Instead of having several separate versions of Windows, why not a single Windows operating system with different portions of that operating system better suited to different devices (that is, a small part of Windows that runs on a smart card and communicates with another part of Windows that runs on a server)? Imagine the possibilities — but Microsoft will probably miss the boat on this idea. I try to take a neutral position as far as Microsoft or any other company is concerned (although it is not always easy). Breaking Microsoft up into smaller companies may be a good thing for it, ultimately. Innovation and quality would probably improve because of increased competition. I think that Java is here to stay for a long time. Personally, I’m teaching Java to students, writing books on Java, and seeking Java certification. I don’t think that Microsoft will be able to cripple Java — our world is moving away from standalone islands of computing and embracing a greater degree of interconnected appliances (computers and intelligent devices such as Palm Pilots, VCRs, and so on). And something needs to run on top of all those different appliances. Otherwise, the market share would be too limited for any developer to seriously consider supporting one appliance over another. If Microsoft isn’t careful, it will do itself a serious injury. Jeff Friesen‘Plug into Java with Java Plug-in,’ by Jeff Friesenhttp://www.javaworld.com/javaworld/jw-06-1999/jw-06-plugin.html Problems installing Java Plug-in with Windows NT 4.0Jeff,I’ve read your article about Java Plug-in. Perhaps you can help me with a problem I have when I install Java Plug-in in Windows NT 4.0 (I’ve only tried in Workstation). When I install it as the Administrator, it works fine in that account, but later, when I enter as another user (for example, the user “valonso”), the Java Plug-in doesn’t work. A dialog appears, saying: “Java Plugin 2.1.1 Fatal Error: Can’t start the Java Runtime Environment from “After installing the Java Plug-in in the Administrator account, if I install it as another user, it doesn’t work in that account. If I uninstall it from the Administrator account and I install it in as another user, then it works only in that account (it doesn’t work in the Administrator account or in other user accounts).So, Java Plug-in works well only in the account where you first install it, and cannot be used by other users. That is a big problem, because my application is supposed to be used by a lot of users (perhaps more than one on the same machine). Is there any patch I can use to solve this problem? Valentin AlonsoValentin, I have not used Java Plug-in in a Windows NT environment. When I wrote my article, all of my development was under Windows 95. Since Windows 95 does not have the security features that are present in Windows NT 4.0, I did not come across this problem. However, I can provide you with information on where you might be able to find a solution. As I see it, the problem appears to involve the security features. When you install Java Plug-in under the Administrator, Java Plug-in has access to various features (such as the Internet) based on the administrator’s security level. Therefore, Java Plug-in works under the Administrator. However, when you switch to another account, that account offers (presumably) more restrictive security. Therefore, Java Plug-in’s access is also restricted. However, when you install Java Plug-in under a particular user account, it makes use of the security features present for that account. Switching to another account is like switching to another group of security features. And Java Plug-in does not adapt to this other group. I’m probably way off base with the above explanation, but it’s the best that I can think of at this time. So what can you do? The first thing to do is to visit the various Java newsgroups. A quite useful one is comp.lang.java.programmer. At last count, there were over 12,000 messages in this newsgroup with many replies. You may need to do some hunting, but you can always submit a question to this newsgroup and see if you receive a reply. You could also look through the Microsoft Java newsgroups (such as microsoft.public.java.security). The second thing to do would be to visit Sun’s https://www.javasoft.com Web site. There may be some useful information pertaining to this problem. The Java Developer Connection can be accessed through this site. You can submit a question to the Java gurus at this site and see if they respond. Jeff FriesenCan Web browser JVMs be kept up-to-date?Jeff, I read your June 1999 article titled “Plug into Java with Java Plug-in,”recently. The following is the published summary for the article:“Tired of waiting for your favorite browser vendor to release a new browser that supports the latest version of Java? The good news is you no longer need to wait! Java Plug-in technology bypasses the vendor and makes it possible for your current browser to stay in sync with Java.”You do not mention how the plug-in stays in sync with the latest Java versions — you only mention how to install the plug-in that first time. I ask because I would like to keep the JVM for my company’s Web browsers up-to-date as well as identical. Currently, because of inconsistent management of the PCs, we have probably four to seven versions of Microsoft’s JVM running on the PCs (and most of them are not Y2K-compliant).It would be great if I could set up a system so that the plug-in polls a server every time it kicks off (preferably one here on-site as opposed to going out through the Internet). Is this possible through Sun’s Java plug-in?Phillip SchlesingerPhillip, Thank you for writing. As I understand, you are interested in keeping the JVMs for your Web browsers up to date (with the latest versions of Java) and identical. I spent some time thinking about this task and came up with a few suggestions. Read “Using Java Plug-in in Intranet Environments,” from Sun’s JavaSoft site: https://www.javasoft.com/products/plugin/1.2/docs/intranet.html The information on this page is useful for those situations where you would like to deploy Java Plug-in on an intranet Web server.Learn how the and tags identify versions of Java. Netscape uses an tag that contains the following two attributes: pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html" type="application/x-java-applet;version=1.2" The pluginspage attribute identifies the Web site and Web page from whence you can begin the process of installing the plugin and (in this case) JRE 1.2. The type attribute identifies the required version of the JRE. If you were to change 1.2 to 1.3 in both attributes, your Netscape browser would attempt to load a plugin with (a hypothetical) JRE 1.3 on its next encounter with this page. Microsoft uses an tag that contains the following attribute: codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0"> The tag also makes use of the following tag: <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2"> Similarly, you could change 1.2 to 1.3 in the codebase attribute and the type tag to load a plugin for JRE 1.3.If you want to keep JREs on all company computers identical, you don’t want your users to surf the Web, encounter a Web page that references Java Plug-in with a version of the JRE that differs from your company’s standard JRE, and install this software. And yet you may not want to completely prevent outside access to the Internet. So what do you do? If your company has a proxy server, you may wish to limit access to Web sites where Java Plug-in is not referenced on any of the Web pages. However, this does seem to be a rather severe approach.Once a version of Java Plug-in is installed, it is not uninstalled when another version of Java Plug-in is installed. Therefore, you may have multiple JREs (with JVMs) installed on a particular computer. As my article showed, you can override the default JRE in the Java Plug-in control panel. This could be helpful in ensuring identical JREs. Unless a user encountered a Web page with a version of Java Plug-in that differs from the installed versions, I believe that the browser would use the overridden JRE in place of the JRE that is referenced by the Web page. I haven’t had an opportunity to test this theory — but it might be a useful experiment.Jeff Friesen JavaTechnology Industry