So, some time ago, I posted here with the promise to address some questions. Now seems to be a good time to actually do so, for some of them.
- Why doesn’t it have a better name?
- Why isn’t there a better web site, source code repository, and all the other infrastructure?
Yay, us. We’ve changed the name, in response to comments. After quite a bit of discussion (and running off in all directions), we ended up settling on GenXDM, which amuses those of us who are gen-X-ers (which is all of the current committers). What do you think? Better?
We have also had to concede that we don’t yet have the community around our code that would convince folks at Apache to sponsor the project. So we’ve created a repository, and can generate a website, and have a good mailing list, and … well, there’s this blog, as well.
That’s what we’ve done. There are also two questions I’d like to address now (without making this post too chunky).
- Has the opportunity for an in-memory API other than the DOM already passed?
- Why not use an existing in-memory tree model API, then?
Now, a discussion of the DOM is liable to become rather heated. Note that I need to restrict the discussion to Java alone. In my opinion, the opportunity for DOM to achieve credibility passed about five years ago—which doesn’t prevent it from being the dominant model. The problem is that there is almost zero possibility of displacing an API with so broad and deep a network effect all at once. The DOM is too many places, in too much code. If you have to hold your nose and use it, then why make things harder by using some other tree model as well?
That’s the problem that all of the alternative XML tree model APIs in Java have faced, for the last ten years. There are already better tree model APIs out there. But if the developers of an XML processor want to reach an audience, to build a community, to see their code widely adopted, then they have to acknowledge that the DOM is dominant (except in certain niches). In the development of GenXDM, we also faced and acknowledged the problem. The GenXDM solution is deliberately built in a fashion that allows the DOM to continue in use. We don’t like it, but we build on top of it—and also on top of alternative tree models. It’s basically the same pattern that you’ll see in a number of applications/processors, where the XML tree model layer has been abstracted, so that the code can run over multiple different models. As a rule, this has been done as a tangent, a side effort, and as a consequence tends to be the least common functionality across models. GenXDM differs significantly: we’re providing an XDM API, which defines the utility that must be made available. It may mean enhancing the tree models inside the bridge code, in one way or another. Supporting multiple tree models is one of our central goals, not a tangent. We’re doing it well.
In other words, we are using existing tree model APIs for XML—not “an” existing model, but “any” existing model (for which a bridge has been written). In doing so, we expect not only to not fight DOM’s network effect, but to make use of it.
Suppose you have an idea for an application or processor for XML. If you write it for the DOM, you get to use the DOM. Lucky you. You also get to integrate with other DOM-targeted processors. Write it for GenXDM, and you get to use a much less odious API, and you get to integrate with other DOM-targeted processors. Just inject a DOM bridge. When operating in isolation, inject whatever bridge you prefer. Down the line, when other processors also target GenXDM, inject whatever bridge you prefer.
It will take us some time to convince folks that this approach will work, but it has the advantage of not forcing massive disruption of existing code.
Enough proselytizing for now, I think. Take a look at the code, won’t you? Maybe you’ll find it useful.
Here’s the rest of the list of questions; I will get to them, in time.
- Why should I implement now?
- What’s the advantage to using gXML?
- What is this “bridge” or “handle/body” pattern and why should I care?
- What can it do right now, today?
- Can it really grow to do all the things the developers say it could do?
- Give me some numbers!