Can .cfm files and .lucee files coexist and share variables?

I have wondered what the goal of .lucee is. I haven’t tried it out yet.
If we can arbitrarily mix .lucee and .cfm files together, then it will
serve a good platform for migrating legacy code to a more modern code base,
without switching to an entirely new language, like Clojure, for example.
So, can .cfm files and .lucee files coexist and share variables?

This page gives a little info in regards to that; though I haven’t actually tried it out.

https://bitbucket.org/lucee/lucee/wiki/Lucee_5_Dialect_Lucee

It seems you can include .lucee templates in .cfm templates and also call .lucee components from within .cfm as well.

Hi Tony,

You are right. The doc does say you can mix the two types of files. I
don’t know why I missed that. Now it makes more sense, Lucee will become
an convenient choice for companies to re-write their legacy apps, depending
on Lucee’s popularity.On Sunday, April 26, 2015 at 3:28:43 PM UTC-7, Tony Junkes wrote:

This page gives a little info in regards to that; though I haven’t
actually tried it out.

https://bitbucket.org/lucee/lucee/wiki/Lucee_5_Dialect_Lucee

It seems you can include .lucee templates in .cfm templates and also call
.lucee components from within .cfm as well.

The wiki article says:

You can also mix the “Lucee” dialect with the “CFML” dialect,
so you can for example include a Lucee template in your CFML
template or call a Lucee component from your CFML template …

So it means this works:

<cfinclude template="stuff.lucee" />

But says nothing about doing:

<:include template="stuff.cfm" />

I presume it does, but the article should state it clearly.

It would also be interesting if the article could give a brief overview
of how the dialect works technically - i.e. if I wanted to create a
special .peter dialect with rules that differ to both CFML/Lucee, what
would be involved? (Does it involve editing core code, can it be done
with an extension, etc.)

See my comments between the lines …

Micha

The wiki article says:

You can also mix the “Lucee” dialect with the “CFML” dialect,
so you can for example include a Lucee template in your CFML
template or call a Lucee component from your CFML template …

So it means this works:

    <cfinclude template="stuff.lucee" />

But says nothing about doing:

    <:include template="stuff.cfm" />

I presume it does, but the article should state it clearly.

I did, we will do a blog post about the dialect and based on this content
also improve the text on this page.

Yes, you can also include CFML templates in Lucee template.
The only limitation you have is that a Lucee component cannot extend a CFML
component visa versa.

It would also be interesting if the article could give a brief overview
of how the dialect works technically - i.e. if I wanted to create a
special .peter dialect with rules that differ to both CFML/Lucee, what
would be involved? (Does it involve editing core code, can it be done
with an extension, etc.)

No this need core changes, you cannot do this in a extension. In the code
the dialect is controlled via the following constants
CFMLEngine.DIALECT_LUCEE, CFMLEngine.DIALECT_CFML, we chosen this way so we
could extend this in the future, we have no plans at all to do this, but we
always do our code as open as possible as long this does not produce a
overhead for us or for the runtime.Am Samstag, 2. Mai 2015 schrieb Peter Boughton :


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+unsubscribe@googlegroups.com <javascript:;>.
To post to this group, send email to lucee@googlegroups.com <javascript:;>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/20150502201538.000041cb%40sorcerersisle.com
.
For more options, visit https://groups.google.com/d/optout.