Entries Tagged as "Railo"

My view on CFCamp 2012

I did my first conference presentation here at CFcamp 2012. It worked out great, and got some good feedback. I actually can't wait to do another one! Hopefully, you'll be hearing from me at CF.Objective() or Scotch on the Rocks (June 2013!) soon.

So, CFcamp. It is not a German conference. It is a very international one, with speakers from France, Germany, America, Scotland, Switzerland, Belgium, England, etcetera. All presentations were in English, flyers and programs in English, so easily accessible for a Dutchie like me.

The venue was the StadtHalle Germering,

No Comments

Presenting Railo Extension Builder!

At CFcamp 2012, me and Mark Drew did a presentation about Railo extensions, and the Railo Extension Builder. Right there, we released the first public version of Railo Extension Builder.
In case you weren't there, this blog post is a short recap of the presentation. The original slides can be found on slideshare.


Railo tip: multiple assignments in one

While waiting for CF.Objective() to begin, I am doing some relaxed coding with Micha in the lobby of our hotel. It's great to be talking about and working on Railo with the main man :-)

Anyway, a new Railo tip:

paul = micha = new Person();
paul.name = 'Paul';
micha.name = 'Micha';

See the highlighted part? You can do multiple assignments in one statement!

It also works in regular CFML off course:

<cfset paul = micha = new Person() />


No Comments

Railo awesomeness: some cool functions and options

I've been working with the Railo source code all day, and noticed some cool functions within the code. I'm taking a minute to share 'em...

querySlice(query, startrow, rowcount)

This function returns a part of the original query, defined by the startrow and rowcount.

Documentation: http://wiki.getrailo.org/wiki/FUNCTION:QUERYSLICE

Example code:

<cfset q = querynew('column1') />
<cfset queryaddrow(q) />
<cfset querysetcell(q, 'column1', "this is row 1") />
<cfset queryaddrow(q) />
<cfset querysetcell(q, 'column1', "this is row 2") />
<!--- this will dump query 'q', but only containing row 2! --->
<cfdump var="#querySlice(q, 2, 1)#" abort />


Return yes/no whether the given file path is a zip file.

Documentation: http://wiki.getrailo.org/wiki/FUNCTION:ISZIPFILE

Example code:

<cfzip action="zip" source="/" file="testZip.zip" recurse="no" />
isZipFile('testZip.zip'): #isZipFile('testZip.zip')#<br />
isZipFile( getCurrentTemplatePath() ): #isZipFile( getCurrentTemplatePath() )#


This might also be possible (?) in the most recent versions of other CFML engines, but I sure missed it when I worked with Coldfusion 7 and 8.

When you need to update values in a CFC (bean or valueObject) by calling it's setters, but you don't know beforehand which values you need to set, then I always had to use <cfinvoke>:

<cfinvoke component="#someObject#" method="set#key#">
<cfinvokeargument value="#value#" />

Railo allows you to use struct notation:

<cfset someObject["set#key#"](value) />

Now that's a bit shorter and cleaner!

No Comments

Railo Tasks viewer extension - version 1.2.6

Just a quick post this time, about my newest Railo extension!

The Tasks Viewer extension shows all registered Scheduled tasks on the Railo server, ordered by web context. The detail page will show you all matching log entries (from scheduler.log), and shows a graph of Missed/Succesfull/Errored executions.

This graph is created by looking at the available log data. Logs are deleted when they have grown to 1 MB, so there might be times when you have very little info, and times when you have a lot. That is out of my control unfortunately.

Another feature is the Alert Service, which periodically sends you an email if any tasks threw an error, or were not executed at all.