Empty "namespace" for .lucee tags?

66 views
Skip to first unread message

Adam Cameron

unread,
Apr 16, 2015, 6:36:50 AM4/16/15
to lu...@googlegroups.com
G'day:
Is using an empty "namespace" for .lucee tags really... a good thing? What was the thinking there (that is not a passive aggressive way of saying "I don't think there was any", it was a legit unloaded question).

It looks a bit odd, and despite empty namespaces being legit, it doesn't sit well with me for some reason.

EG:

<:script>
mail=evaluate(url.mail);
</:script>
<:if hasMail>
     <:mail subject=mail.subject from=mail.from to=mail.to>
         <:output>#mail.body#</:output>
     </:mail>
</:if>

-- 
Adam

Michael Offner

unread,
Apr 16, 2015, 7:13:21 AM4/16/15
to lucee
the decision was between no namespace at all and this one or something like "l:"
We (the LAS Members) decided to have a namespace but the shortest one possible.
it looks maybe odd to you, because it is new what makes it also special.

Micha

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/34d81cb5-a2da-4cb3-9c1e-e72c8d1f4ef1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Cameron

unread,
Apr 16, 2015, 7:17:42 AM4/16/15
to lu...@googlegroups.com


On Thursday, 16 April 2015 12:13:21 UTC+1, Micha wrote:
it looks maybe odd to you, because it is new what makes it also special.


Don't be patronising Micha.

I assure you namespacing on tags is neither new nor special to me.

I am just unaware of a precedent of vendors with their own tagsets opting to use an empty namespace. I my own hack-about code? Sure. But as an "official" usage? Nope.

Hence the question.

-- 
Adam

Michael Offner

unread,
Apr 16, 2015, 7:44:46 AM4/16/15
to lucee
On Thu, Apr 16, 2015 at 1:17 PM, Adam Cameron <camero...@gmail.com> wrote:


On Thursday, 16 April 2015 12:13:21 UTC+1, Micha wrote:
it looks maybe odd to you, because it is new what makes it also special.


Don't be patronising Micha.

I assure you namespacing on tags is neither new nor special to me.

that is is not what i meant on the contrary, i'm expecting that seeing tags like this are very common to you
<lu:cee /> 

so it looks odd to you to see something not following that pattern I ASSUME.

Like for example seeing a Java class names not starting with a upper case letter or method names starting with upper case letters gives physical pain to me ;-)

CFML is ignoring any "tag rule" (of course this are the most extreme examples):
<cfif susi == "whatever">
   <cfset x=1>
   <cfreturn x>
<cfelse>
   <cfreturn null>
</cfif>

should be something like that:
<cf:choose>
   <cf:when condition="#susi == "whatever"#">
      <cf:set x="#1#" />
      <cf:return expression="#x#" />
   </cf:when>
   <cf:otherwise>
       <cf:return expression="#null#" />
   </cf:otherwise>
</cf:choose>

so you see, we are away from any xml standard anyway with the Lucee and the CFML dialect and this to our benefit.
In that case the second example looks off, at least to me, simply because i'm more common with the first one.

 

I am just unaware of a precedent of vendors with their own tagsets opting to use an empty namespace. I my own hack-about code? Sure. But as an "official" usage? Nope.

My point

Hence the question.

-- 
Adam

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.

Adam Cameron

unread,
Apr 16, 2015, 7:53:38 AM4/16/15
to lu...@googlegroups.com


On Thursday, 16 April 2015 12:44:46 UTC+1, Micha wrote:
[snip]

Yeah, thanks for all that.
 
 

I am just unaware of a precedent of vendors with their own tagsets opting to use an empty namespace. I my own hack-about code? Sure. But as an "official" usage? Nope.

My point

Hence the question.


So to try to get a clear answer, the answer is "we decided to use the 'namespace' sort of syntax (<namespace:tagname>) instead of a 'prefix' (like CFML does <cftagname>), but we opted to have an empty namespace instead of a 'vendor-specific' one to save some typing". That's pretty much it, yes?

Okey doke.

-- 
Adam

Sean Corfield

unread,
Apr 16, 2015, 12:28:11 PM4/16/15
to lu...@googlegroups.com
I must admit I had expected <l:if> etc and initially thought the choice made in Lucee 5 was "a bit odd" but now I’ve had some time to look at it, I rather like the empty prefix.

I’m assuming this will now disallow a (cf)import tag with an empty prefix?

You used to be able to do:

<cfimport prefix="" path="…">
<bar attr="123"> <!— calls bar.cfm in my custom tag folder —>

Sean

Alex Skinner

unread,
Apr 16, 2015, 5:42:38 PM4/16/15
to lu...@googlegroups.com

My view on this was based on what I saw as the options:

1. No name space, which I really didn't like as i felt it conflicted with say html tags and it felt wrong I think people like the visual seperation and context.

2. a lucee name space is more to type and the file already has .lucee

3. a shorter name space ?

The reason I really like <:output>#Header</:output> is that it allows at a glance for me to easly visually scan

<:output>
     <h1>#args.header#</h1>
     <ui:thumbnail image="#args.image#" />
<:/output>

HTML vs core vs imported namespace

I like it

A

--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages