2009/12/8 Pete Muir <pmuir@redhat.com>

On 8 Dec 2009, at 15:10, Dan Allen wrote:

> Oops, I was getting my URLs and URNs mixed up. Thanks for the correction.
>
> I'm torn. The fewer characters do make it easier for my brain to remember and also gives an indication that the namespace is somehow different. I don't think it would hurt as an alternative syntax.

Actually, when I originally proposed this, I was thinking that it could be an alternative syntax.

Those who prefer URLs can just stick with them. Depends on whether we want to introduce this variance, and thus one more thing to explain.
>
> Another option would be to allow users to alias one namespace to another so they can control how covenient it is. Just brainstorming.

Yeah, this seems like a better option to me :-)

But, if I understand correctly, now we have an extra step: aliasing the namespace so it's easier to remember. Then JSF developers have yet another thing to learn: how to alias the namespace.
 

I would like to know *why* this being proposed as well.

I proposed it because when I was teaching JSF 2.0 someone asked me why they had to type all that stuff before the component directory. I didn't have a good answer. I still don't, actually. I never really have understood why XML namespaces are specified as URLs.

Fundamentally, JSF developers are drowning in complexity. We should be doing everything we can to simplify instead of obfuscate. Why should page authors have to remember to put http://java.sun.com/jsf/composite before the directory name, when the directory name is the only significant part of the namespace?

And then there's precedent: With Flex, you pull all Flex components in a directory, say components/util, by doing exactly what I proposed, although with Flex, you can specify and individual component, like this...

xmlns="components/util/coolDateComponent"

or all of the components in the util directory:

xmlns="components/util/*"

If it's good enough for Flex, I don't see why it's not good enough for us. Flex, btw, is pretty popular, and is doing very well in the marketplace, and one of the main reasons is that it's conceptually simple.

Most JSF page authors have no idea what the difference is between a URN or a URL. And they have no idea why the have to specify such a long, ugly, and difficult to remember prefix to the directory when all they want to do is specify the directory.


david