XML Schema Is Dead, My IDE Supports RELAX
Have you heard? There is an earthquake in XML land. Tim Bray, the founding editor of the XML 1.0 specification, pronounced the death of XML Schemas:
Tim Bray: Elliotte Rusty Harold’s RELAX Wins may be a milestone in the life of XML. Everybody who actually touches the technology has known the truth for years, and it’s time to stop sweeping it under the rug. W3C XML Schemas (XSD) suck. They are hard to read, hard to write, hard to understand, have interoperability problems, and are unable to describe lots of things you want to do all the time in XML.
The time has come to declare it a worthy but failed experiment, tear down the shaky towers with XSD in their foundation, and start using RELAX for all significant XML work.
Long time readers of this blog will be familiar to RELAX NG through the numerous blogs I've posted back in 2003:
As you can see from the posts, I learned RELAX NG for a very pragmatic reason: I wanted to use the fantastic nXML XML editor by James Clark, implemented as a major mode of GNU Emacs. Since I consider GNU Emacs one of my IDEs (the others are: IntelliJ IDEA, Eclispe, NetBeans, MS Visual Studio, and bahs+vim (maybe that one is a stretch)), I can rightly say that my IDE supports RELAX NG, and I've been using it to edit my XML files, mostly XHTML files for the JNB and my weekly status reports at work.
Unlike Eric, I did take time trying to learn XML Schemas, I tried and tried, several times, most recently this summer, when I was looking into SOA and Web Services and the whole WS-* stack. I failed each time. It's like I went through the XML Schemas University and flunked. The thing is simply knowledge-acquisition-resistant and gray-matter-intolerant.
What about all the WS-* stuff that's so heavily reliant on XSD? I don't think it is wise to either rework the specifications to retrofix RELAX NG in place of XSD or throw the stack away all together. What is done is done. What is working is working. I think I can tolerate it as long as I don't have to look at them, or worse, to produce them by hand, because I can't within reasonable amount of time. (But don't tell Ken.)
What about all the people who learned XML Schemas and succeded and liked it and are pumped up every morning saying to themselves "Great, I get to work on XML Schemas today. I'm a lucky man."? I'd say indeed you are lucky because XML Schemas is embedded deep in modern IT infrastructure. Go work for my technology vendor to hide all the mandatory XSD stuff from me. And I'm sure people like me would love to through all of our XML Schemas work your way.
Strangest Corner Cases of Java Generics? I Can't Wait!
(Via Lambda the Ultimate)
Gilad Bracha in O'Reilly Book Catalog: Java Generics and Collections covers everything from the most basic uses of generics to the strangest corner cases. It teaches you everything you need to know about the collections libraries, so you'll always know which collection is appropriate for any given task, and how to use it.
Anton van Straaten: The part that scares me is "...from the most basic uses of generics to the strangest corner cases." I shudder to think about the strangest corner cases of Java generics that Phil can come up with!
The 45 Irrefutable SOA Facts
I've seen the list many times. However, more and more people are linking to it. For example, Steve Vinoski granted the list "big picture" status today.
What American Accent Do I Have?
Bob Lee says this quiz really works.
| What American accent do you have? Your Result: The Inland North * You may think you speak "Standard English straight out of the dictionary" but when you step away from the Great Lakes you get asked annoying questions like "Are you from Wisconsin?" or "Are you from Chicago?" Chances are you call carbonated drinks "pop." | |
| Philadelphia | * |
| The Northeast | * |
| The Midland | * |
| The South | * |
| The West | * |
| Boston | * |
| North Central | * |
| What American accent do you have? Take More Quizzes | |
Sun Frees Its JDK
I'm travelling today. I'm in Seattle, Washington for a few days of whole day meetings. I didn't get a chance to surf the internet until 8:30pm local time.
The first thing I noticed is that I got a lot of hits on some of my old "Free Java" blog entries. "Hmm, did they really do it?" I thought. I checked Sun's Java web site, and sure enough, there it is—the announcement webcast, and more importantly, the source code, under the GNU GPL licance v.2:
classLoader.cpp:
#ifdef USE_PRAGMA_IDENT_SRC
#pragma ident "@(#)classLoader.cpp 1.180 06/11/08 09:15:10 JVM"
#endif
/*
* Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* .
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*
*/
#include "incls/_precompiled.incl"
#include "incls/_classLoader.cpp.incl"
// Entry points in zip.dll for loading zip/jar file entries
typedef void * * (JNICALL *ZipOpen_t)(const char *name, char **pmsg);
typedef void (JNICALL *ZipClose_t)(jzfile *zip);
typedef jzentry* (JNICALL *FindEntry_t)(jzfile *zip, const char *name, jint *sizeP, jint *nameLen);
typedef jboolean (JNICALL *ReadEntry_t)(jzfile *zip, jzentry *entry, unsigned char *buf, char *namebuf);
typedef jboolean (JNICALL *ReadMappedEntry_t)(jzfile *zip, jzentry *entry, unsigned char **buf, char *namebuf);
typedef jzentry* (JNICALL *GetNextEntry_t)(jzfile *zip, jint n);
static ZipOpen_t ZipOpen = NULL;
static ZipClose_t ZipClose = NULL;
static FindEntry_t FindEntry = NULL;
static ReadEntry_t ReadEntry = NULL;
static ReadMappedEntry_t ReadMappedEntry = NULL;
static GetNextEntry_t GetNextEntry = NULL;
static canonicalize_fn_t CanonicalizeEntry = NULL;
So indeed, the Sun JDK will become dual licensed—under both the GPL and existing commercial licenses. This is the same licensing model of MySQL and Oracle Berkeley DB.
This makes the Sun JDK the third major free software/open source implementation of the Java programming language. The others are the GNU Gcj/GNU Classpath, found in Fedora Core and Debian Linux distributions for quite a few years, and the Apache Harmony, the Apache licensed Java implementation sponsored by IBM, Intel, BEA, etc.
I believe Sun's move ensured the long term survivability of the Java. And for that I thank Jonathan Schwartz and the Sun Java team. I also think amid all the festivities surround Sun, we shouldn't forget the people who worked on the alternative free software Java projects like gcj and GNU Classpath. It is them who forced Sun's turnaround on their licensing stance.
Back in May I wrote:
Me: ... I think Sun will open source Java. If not tomorrow, then within this year.
(If they don't, I'll give up Java altogether and become a Ruby-on-Rails fanatic.)
I'm really glad that I don't have to become a Ruby-on-Rails fanatic. Ruby the language seems to have hit some snag in the feature/schedule department for the new promised virtual machine.
Help: MySQL on Windows XP Hates Newbies
It must be the blogs I read.
For some reason, I decided to give MySQL a try. You may laugh at me, but I have never installed MySQL on Windows before, not because I don't like MySQL, but because I never had the need for it, having figured out how to make the PostgreSQL from Cygwin to work.
So I went to their website, downloaded the thing, unzipped it and ran the setup.exe. Everything seems to be cool, except that after the installation, the MySQL command line tool won't run. When I select the menu item, a command window pops up, asking me for the password. I enter the password, the one I supplied a moment ago when I did the installation, and the machine beeps and the command window goes away.
I have verified that the MySQL service has started. I have also opened up port 3306 on my Windows firewall.
What did I do wrong.
Help!
And thanks.
Kyle Cordes: Scripting Your Java App
This month's St. Louis JUG meeting featured Kyle Cordes talking about scripting Java applications
"I attended one of Edward Tufte's classes," started Kyle. I know right away that I won't be able to get the PowerPoint for the talk at the end. Kyle did the presentation in Eclipse and showed code.
Kyle handed out a one page summary that contained all the main points of the talk in complete sentences and paragraphs. Since it's not very creative to simply copy that sheet of paper into this blog, I'll summarize the talk into bullet points.
- History of scripting
- Bean Scripting Framework (BSF)
- BeanShell (JSR 274)
- Groovy (JSR 241)
- Java 6 scripting (JSR 223)
- Demos
- Rhino (Mozilla's Java based JavaScript engine)
- "You won't get into trouble by using the scripting language in the JDK"
- We have been very happy using Rhino to scripting an enterprisey application
- It's surprisingly easy to add scripting support
- What's a scripting language
- Dynamic typing
- Interpreted execution
- eval
- Why script
- Configuration
- More important in commercial systems
- "Alternate hard and soft layers"
- modular & testable
- Users will use scripting to create incredible values
- Kinds of scripting APIs
- Rules scripting
- Plugin scripting
- External scripting
- Sandbox is very important (scripts shouldn't be able to see your app's internals)
Java 6 Release Date Set: December 7, 2006!
Danny Coward: You can all uncross your fingers and toes, because Java SE 6 has passed through its last stage before full release by passing its final approval ballot in the JCP Executive Committee. Java SE 6 has cleared the runway and is ready to land!
...
Comments:
GREAT!!! Well... So you're able to tell us a formal release date, now! :-)Posted by Renato Perini on November 07, 2006 at 01:46 PM PST #
Yes, December 7th, I believe.Posted by Danny Coward on November 07, 2006 at 05:09 PM PST #
Alice and Bob and Rivest and Schneier
I never paid too much attention to their names until Brian pointed it out to me. Apparently Alice and Bob are quite famous in the field of cryptography. Alice has been sending Bob secret messages for many years.
Little did I know that before Alice and Bob there were Eve and Bob. Eve is speaking out.
Java News Brief (JNB): Getting To Know Berkeley DB Java Edition
This months Java News Bried (JNB) features well-known member of the Java blogging community Weiqi Gao getting to know Berkeley DB Java Edition:
Weiqi Gao: When thinking about databases, the first thing that comes to a Java developer's mind is probably relational database servers. These servers have a communications layer that allows a remote application to connect to the database process, a SQL compiler that understands and executes SQL queries from the application, and an interactive shell that allows users and administrators to perform ad hoc queries. Berkeley DB Java Edition has none of these.
What it does have is a transaction engine that offers full ACID (Atomicity, Consistency, Isolation and Durability) semantics, an in-memory cache that manages the data using B+trees, and a persistence engine that writes log files to local disks. Everything Berkeley DB Java Edition does happens inside the same JVM instance where the application is hosted. In other words, the database is embedded within the application process as a jar file in the classpath.
These characteristics makes Berkeley DB Java Edition uniquely suitable for a wide class of applications that does not require the additional features from a full-fledged relational database server. These applications tend to have a relatively stable and small data schema, a very dynamic but usually bounded data set, and high throughput requirements.
Posted by Jonathan Schwartz on November 07, 2006 at 10:21 AM PST #