Lucee – An Open Source CFML Server Platform

Highlights

  • The Good, The Bad, The Ugly
  • Administration
  • Extension Management
  • PDF generation
  • ORM & Hibernate 5.4
  • Final "Gotchas"

The Good

  • Speed
  • Modularity
  • CFConfig
  • Lucee Compiler
  • Logging

The Good: Speed

  • Reinits
  • ORM reloads
  • Test runs
  • Page requests
  • Compilation
  • Fast EVERYTHING!
  • Perf is a top priority

The Good: Modularity

  • Drop-in new extensions
  • Clear out unneeded extensions
    • (i.e. the "Form Tags" extension)
  • A big reason for Lucee's speed

The Good: Compilation

  • Remember compilation issues with methods in structs?
  • Lucee compiler is fast
  • Lucee compiler is more forgiving
  • (sometimes that's a bad thing.)
  • Easier, faster development

The Good: Logging

  • Granular configuration
    • DEBUG level for mail log
    • WARN level for datasource log
    • FATAL level for exception log
    • (all at the same time)
  • Can potentially pass this logging data to Stachebox

The Bad

  • Picky ORM
  • Extension installation
  • Font installation in the Admin
  • Chunked (large) uploads are broken
  • PDF generation (wkhtmltopdf) is broken

The Ugly

  • Positional parameters changed
  • ORM is REALLY picky
  • Hex-encoded encryption is not usable
  • Some exception info is obfuscated or missing
  • Mappings don't always do what you expect

The Ugly: Positional Parameters

var params = [];
params.append( rc.caseID );

// this bombs in Hibernate 5.4+
var results = ormExecuteQuery( "FROM cases WHERE id=?", params );
var params = [];
params.append( rc.caseID );

// this works in Hibernate 5.4+
var results = ormExecuteQuery( "FROM cases WHERE id=?1", params );

Positional parameter syntax changed in Hibernate 5.3, breaking backwards compatibility with Hibernate 5.2-

The Ugly: Picky ORM

  • Awaiting fixes from Lucee
    • Transactions with mixture of ORM and vanilla SQL throw error
    • Named savepoints are not supported
  • Positional parameters changed in Hibernate 5.3 (see above)
  • By far the biggest time investment with Lucee was in ORM difficulties

The Ugly: Broken Encryption

  • Encrypting large cases bomb on Lucee due to broken HEX encoding
  • Easiest workaround is changing the encryption method, but...
  • This is a serious issue for backwards compatibility
  • Thanks to quick action from Lucee, this is already resolved in Lucee 5.3.9.1

The Ugly: Exceptions

  • Exceptions are not always thrown when they should be
  • Tendency for missing debug info
  • cfexecute is a perfect example
try {
	_execute();
}
catch (PageException pe) {
	throw pe;
}
catch (Exception e) {
	throw new ApplicationException(
		"Error invoking external process", 
		e.getMessage()
	);
}

The Ugly: Mappings

  • Lucee enjoys making absolute mappings relative
  • if directory app/ exists in app root
    • then /app points to /app/app
  • This ruins file access
    • wirebox injections
    • new components
    • file includes

Daily Dev with Lucee

  • Administration
  • Extension Management
  • PDF generation

Daily Dev: Administration

  • CF: https://local.weat.navy.mil/cfide/administrator
  • Lucee: https://local.weat.navy.mil/lucee/admin/server.cfm

Daily Dev: Administration

Daily Dev: Administration

  • CFConfig is still the bomb
    • Removes 99% of configuration differences
box cfconfig set adminPassword=lucee1
cfconfig import from=.engine/cfconfig.json to=server.json

Daily Dev: Extension Management

  • Can add/remove extensions as necessary
  • Limit deploy size
  • Add functionality as needed
    • example: cfspreadsheet extension

Daily Dev: PDF Generation

  • PDF generation will need more attention on Lucee
  • Not pixel-perfect
  • Some features unsupported
    • i.e. page numbers
  • Highly recommend switching to wkhtmltopdf

Final "Gotchas"

  • SerializeJSON()
    • takes 4 parameters in CF
    • takes 3 parameters in Lucee
  • File functions like fileAppend()
    • CF accepts file objects
    • Lucee does not accept file object
    • Fixed in Lucee 6
  • As always, ORM
Made with Slides.com