I received an email yesterday and a blog comment earlier from a nice person at MyEclipse. That's notable for a couple of reasons. First, that's the first person to actually leave a comment on my blog here. 🙂 That in itself is pretty cool.

Second, that contact is entirely consistent with what I've come to expect from the people at MyEclipse. I've been an Eclipse user for many years. I used to use shareware products like SitePad in the classroom, and even had a commercial license for JBuilder back in version 6. I played with IBM's VisualAge for Java when I had to, but tried to avoid it if possible.

When Eclipse 1.0 came out (at the same time as WebSphere Studio Application Developer 4), I downloaded it and tried it and was immediately hooked. WSAD wasn't bad, but it was a version 1 product despite the "4" (more evidence that not all the evil in this world is done by Microsoft). I found WSAD fascinating and frustrating at the same time. I loved the way code assist worked in both JSP's (which VAJ didn't understand at all) and in Java code. I loved the integrated debugger. I loved the way I could deploy to a server and run my apps without leaving the product. But WSAD wasn't terribly stable or easy to use, and it was pretty bloated in size. Of course, I had no idea how much worse that last problem was going to get….

(The latest version of WSAD is now called RAD6. If you don't have at least a gig of RAM, don't even bother checking it out. If you don't have almost 2 gigs, it's not worth the battles.)

Eclipse, however, was much smaller, much more user-friendly, and free. I immediately started using it in my Intro Java classes. Some instructors felt that was asking too much of the students — they shouldn't have to learn an IDE at the same time they were learning the basic language. But code assist rocked, then as now, the syntax coloring helped a lot, and having an integrated debugger at your disposal was very, very helpful. In a normal Intro Java class for me, by Wednesday everyone was asking where they could download the tool. Nobody could believe it was free, too.

The problem with Eclipse was that there was no built-in support for anything from J2EE. You could always add a range of plug-ins to help that, but the choice of plug-ins was always a dicey one and sometimes they didn't like each other. In those days I became enamored of the Sysdeo Tomcat plug-in, which allowed me to create a "Tomcat project" and use it inside Tomcat, which I could also start and stop in the environment. That was excellent, but limiting.

I think I first heard about MyEclipse around 2003. After I got over the initial difficulty (e.g., the fact that the URL was based on "myeclipseide" rather than "myeclipse" :)), I started using it in earnest.

MyEclipse has some very nice features. For example, it completely understands both web and EJB applications. You can create them, deploy them to pretty much any server, and run them there. It's got an integrated debugger that understands the server-side. It does validation of XML files. It's got a _great_ database explorer view — much better than anything in Rational Application Developer or other comparable products. It also understands the major frameworks, like Hibernate, Spring, Struts, Tapestry, and so on.

And the best part is that the product costs $30/year, or $50 if you want the version with UML support.

(As an aside, I still haven't found a UML tool I like, commercial or otherwise. They're all barely tolerable at best and seriously annoying at worst. Rational Rose is among the most frustrating, and that came from the Three Amigos themselves. Yikes.)
Rather than sell the product, MyEclipse chose a subscription model. The benefit is that you can download the latest version at any time, from anywhere. The downside is that if you let the subscription expire you lose all the functionality.

A few semesters ago I contacted the MyEclipse people and asked them for an extended trial license for my Rensselaer students. The normal trial version lasts 30 days. I wanted a version that would last a full semester. I didn't think that was too much to ask, but I've asked other companies for considerations like that and gotten nothing.

I received an affirmative reply from MyEclipse, complete with about 25 licenses, within hours.

That's the way it's gone ever since. Right before a semester (sometimes pretty close to the last minute, too :)), I send a request for extended trial licenses for the students. I always get them back almost right away. It's truly sweet.

Now for some "full disclosure" comments: the company has awarded me a free license for my own use because I recommend it in the classroom. After I exchanged email with them about my blog comments here, they even promised to send me a T-Shirt, which I have every intention of wearing.

I don't know what the upcoming Callisto release of Eclipse (3.2, due 6/28/06) with its integrated Web Tools Project is going to do to MyEclipse. I definitely plan to give them the benefit of the doubt, though. I'm sure they'll work it out somehow.

The bottom line is, I just like the product and the company. That's a tough combination to beat.


Philadelphia and Fun with RAD6

Back to Philly this week, doing servlets and JSPs with RAD6.  At least they remembered to install RAD6 this time.  Last week they didn't, and it took four hours to download and install the product.  I might even try running the updater and see what happens.

In the meantime, it's Hibernate some more.  I'm going to build the Hibernate classes from Will's Derby HRDatabase.  MyEclipse was able to generate the classes and even an ER Diagram, but I'm not sure I want to use it that way.  I also can't rely on the training clients having the product.  Still, the alternative may be Ant build files, and that hides so much.  It's working in the Rensselaer class, but I don't know how well that's going to work out when the students start their projects.

I also only ordered the shorter version of the materials for this week.  That'll give me plenty of opportunities to riff on the topics, which works well for me.


This week I've been in Westborough, MA again, teaching a servlets and JSP course. The materials are, shall we say, dated, even though they've been revised to use RAD6.

The rest of the time, however, I've been digging into Hibernate. I'll post more later, but I'm going through my list of challenges as I travel the learning curve.

Here's one. If you use the properties file for database configuration, then you just say Configuration cfg = new Configuration().addClass(…) and then cfg.buildSessionFactory() directly. If you use the XML file hibernate.cfg.xml instead, then you have to say cfg.configure().buildSessionFactory().

That took a lot of time to figure out and I can't find it documented explicitly anywhere.

Quick Red Sox comment

When I grow up, I want to be Kevis Youkilis.


Ajax (another try)

Since my previous post vanished into the ether, I'll try to regenerate it. Grr again.

I spent this week developing Ajax materials for a client. They asked me to put together a half-day of materials, including PowerPoint slides and a lab. This request had a few elements in its favor:

  1. I really like this client and want to make them happy.
  2. I like Ajax, too, and wanted to dig into it a bit more. Besides, on of my favorite technical books at the moment is Ajax in Action by Dave Crane (Manning), though I did spend a lot of time with Foundations of Ajax (Apress).
  3. The request seemed like it was going to be easy and quick. (Yeah, right.)
  4. They were going to pay me.

All good things, you must admit. At any rate, I said yes, cranked up the old MyEclipse editor, and went to town.

Unfortunately, I hadn't yet made my 10 Canonical Errors in Ajax. 10 Canonical Errors you ask? I need to make a separate post about that, but in short, my feeling is that in any new technology there are at least 10 canonical errors you have to make before you become productive. Each one will likely cost you hours of debugging time. The difficulty is that there's no way to know what those errors are before you make them. It's just part of the learning process.

Why 10? No reason. It's just a nice, round number and it's also probably a significant underestimate.

When building my Ajax demos and labs for these materials, here are a few of the ones I stumbled across.

  • XHTML is evil in at least one respect. When an element is defined in the spec to be not empty (i.e., the content model is anything other than EMPTY in the DTD), you have to write it as separate start and end tags rather than in its minimized form. Otherwise the browsers don't understand it. Yikes.

That means use <script src="myscript.js"></script> rather than <script src="myscript.js" />. The same goes for <div id="message"></div> instead of <div id="message" />. This is actually in the spec, but it took a while for me to find. Check out section C.3 here.

  • The onreadystatechange property of the XMLHttpRequest object needs to be assigned to a function pointer, not a function.

Duh, and duh. Use xhr.onreadystatechange = handler instead of xhr.onreadystatechange = handler(). The former is a pointer to a function defined in the same file. The latter is a definition of an empty function.

  • The text value of an element in the DOM is in its first child. Yeah, I've known that for years, but that didn't stop me from making that error again.
  • For an HTML form element in the DOM, you set its value using the value property. For an XML DOM element, you use the nodeValue property. Sigh.

These two I can describe together. To set a form value based on an XML node value, use

document.getElementById("name").value = doc.getElementsByName("name")[0].firstChild.nodeValue

Wow. I guess that's why we need frameworks and libraries, like scriptaculous.

In the end the materials got developed, and I used them on Saturday in my Rensselaer Developing Enterprise Applications class, too. It was an interesting experience.

Now I'm ready to go back to Hibernate materials development for Will Provost.



I just wrote a long, thorough post on my Ajax materials development this week and it vanished when I tried to save it. Grrrrrrr.