CFCamp Notes: Lucee 5 and 6

October 21, 2019

Moved to a regular release cycle

  • Doing an incredible amount for the budget
  • Hard to give people the transparency on where the funding comes from, what it’s spent on, etc.
  • Moving financials to Open Collective
  • Easier for people to get involved, donate, etc.
  • Improve the transparency
  • Ultimately, the constraints are more budget related than anything else

Noticeable uplift in interest lately

  • More people moving to Lucee from a variety of diff businesses and SaaS providers
  • Means more in terms of compatibly questions, number of people reaching out for support, etc.
  • That’s impacting our ability to get on to larger feature dev
  • Keeping pace with the changes coming from Adobe
  • And dealing with day to day support requirements for people wanting to move to the platform

Important Point

  • This is not a commercial business
  • Support is handled by member partners
  • Challenge moving from commercial world is expecting the level of support and delivery they’re used to
  • We need to do better
  • More money gives more options
  • Tremendous number of regular contributions
  • Not just about money, also about time and infrastructure
  • The little contributions (in time or money) do make a big difference

Impact

  • Shorter release cycles
  • Having more dedicated QA resources
  • Good start to 2020
  • 13 members now pledged support for the association this year
  • As well as bunches of corp and member supporters
  • DistroKid and Rasia have pledged some significant support by way of in kind Java resources to really help accelerate the project
  • Adding a full time Java developer to the project to improve release cycles, help Micha and Igal

Neo - The Lucee mascot
(Every Lucee version was named after a dog)

Focusing on shortening the release cycles
Important to know things are coming, bugs are fixed, pull requests are done, etc.

If you want to contribute -
Can do so with just $10/month
That helps everything

Taking different extensions and having them maintained by individual companies

  • Helpful because now more areas can be focused on
  • This will speed up releasing extensions, so things aren’t out of date so quickly
  • Ten24 will take over the Hibernate extension
  • Ortus has several extensions already available
  • Extensions are way easier to maintain
  • The community can help take care of them

If you don’t work with a thing every day, maybe you shouldn’t be the ones maintaining that source code.
Have someone that does use it every day maintain it, makes more sense.

How Can I Help?

  • Become a member, supporter, or patreon
  • Supporter is $10/month
  • Patreon - still sorting out the details

In the last year

  • Lucee 5.3 RC, final will be out soon
  • A few sprints for version 6 laid out
  • Things are evolving so fast
  • A release cycle that takes over a 1 year is too long
  • Should be a continuous release cycle

New Things in Lucee

Listeners for Datasources

  • Possible globally / per datasource / per query
  • Allows you to take a query, add a listener CFC to it
  • addListener()

MailListener.cfc

Tagging queries

Can add a data tag to the query, if you want to flush just queries with a particular “tag”, you can do:

<cfobjectcache action=“clear” filter=“customerdata”>

And any query tagged as “customerdata” will be cleared from the cache. So queries all referencing the same table(s) can be cleared, but everything else stays in the cache.

Lucee 6

Focus: integrating Java and having more possibilities to use CFML outside of Lucee so you can pass CFML code to Java

Can do java calls directly in CFML:

java.lang.stringBuilder function createStringBuilder( String str) type="java"
{
java.lang.StringBuilder sb = new java.lang.StringBuilder();
if( str!=null ) sb.append( str );
return sb;
}
sb = createStringBuilder( “foo” );

We have lots of function calls in a project that were extremely dependent on performance
So this is now added as a supported feature

Can also do this with a closure:

someMath = function( int x ) returntype="int" type="java" {
int y = x + 4;
return y;
}

Can also put these "Java functions" in CF Components!

Can mix and match w/ CFML functions in the same CFC

Script Templates

  • You can do CFML templates w/ the extension. .cfs what can have script code directly
  • (similar to .js files)
  • No <cfscript> tags needed
  • can also do ```cfml tags``` to switch back to tags inside a template.

Listeners

CFquery listener="#listener#"

  • Listener has 2 actions: before() and after()
  • Can see the query, manipulate them
  • Change the sql statement before it runs
  • Useful w/ TeraData ala a Query Band
  • Can also add listeners via Application.cfc

So the listener would run for EVERY CFQuery in the app:

this.query.listener = {
before = function(){ ... }
after = function(){ ... }
}
<cfquery async=true>…</cfquery>

exec this query in a separate thread.

<cfmail>
Can define a listener here too
At both the tag and in Application.cfc
This was in Lucee 5.3 but it was read-only, now it’s expanded
Can change the “from” address when you’re on the Test server in 1 place for every email going out, etc.
Useful for GDPR support too.

this.mail.listener={
before = function(){ … },
after = function(){ … }
}

Query - added support for Indexes

<cfquery name=“qry” indexName=“task_id”>
    select * from tasks
</cfquery>
QueryRowByIndex( qry, 2 )
QueryRowDataByIndex( qry, 2)
QueryGetCellByIndex( qry, “title”, 2 )

Also available as member functions
At the moment you can only define 1 index but maybe multiple indexes in a future version

More

  • Newly introduced features from other CFML engines
  • New functions including findLast() findLastNoCase()
  • Updated bundled libraries