An Architect's View

ColdFusion, Software Design, Frameworks and more...

An Architect's View

Railo - a first look

May 23, 2007 · 6 Comments

So I looked at Smith Project a short while ago. I decided to download and install the new Railo 1.1 Beta today to see what it has to offer. I downloaded the Railix "Live" Linux install and then just edited the start/stop scripts to use the Mac OS X Java install instead of the one packaged with Railo (easy: remove jre/bin/ before java in each script; you may also need to change bash to sh in the #! line in each script). First thing I noticed: Railo 1.1 is fast! It starts in just four seconds and seems to be very fast running most of my standard sample apps. It happily runs Fusebox 5.x and doesn't seem to have a problem with ColdSpring either (I haven't tested that extensively yet). Railo claim Model-Glue and Mach II run well and so far I have no reason to doubt that. Transfer ORM is beyond Railo's reach due to reliance on coldfusion.runtime.* Java classes. What impressed me most, however, was what I found in the admin console. Some of it has not yet been localized (so it's a bit odd to see a mix of English and Deutsch on some pages) but you can configure a lot of behaviors within the compiler / runtime system. You can configure the engine's locale, timezone and time server. You can also configure the default character set used for template files, rendered HTML and for "resources" (more on that below). For components, you can configure what the base class CFC is - so you can use the built-in Component.cfc or a base class CFC of your own. You can choose which template is used to auto-generate documentation, allowing you to override the Railo default. You can also choose whether THIS scope behaves as PUBLIC (like CFMX) or PRIVATE, PACKAGE, REMOTE. You can also have Railo automatically invoke getXxx() / setXxx() when you access xxx as a direct property which I know a lot of people will like (I'm a little sketchy on exactly how this works since the option hasn't been localized yet in the admin!). There are a number of options for controlling scope behavior, including a "strict mode" that only scans VARIABLES scope for unqualified variable names (presumably if not found in VAR scope?). You can turn session scope and client scope on and off in the admin which is also nice. Railo implements script-protect and you can control the defaults in the admin. You can also control the search behavior for Application.cfc and Application.cfm / OnRequestEnd.cfm. All of the above applies to the web administration console. Railo has the idea of a server administration console and then a separate web administration console for each "web" installed. The server admin provides defaults for every web (that can all be overridden obviously) as well as a number of per-server settings. At a server level, you can have the server automatically update itself from the Railo website. You can restart the server (useful if you don't have easy access to the box). You can manage all the security access for each individual web, disabling various sections of the admin for web users in general or for specific web contexts. Some of this is a bit like sandbox security in CFMX (but not as sophisticated in terms of file system access). I can imagine this level of control being very appealing to some developers although the impact on framework behavior needs to be very carefully weighed with some of these features, I suspect. I mentioned resources above and that needs a little more explanation. The idea behind resources is that several tags can take a "resource" URI rather than just a file path. A resource can be a local file path, an FTP file path, a datasource or an in-memory space. This allows you to transparently copy a file from a remote FTP server to storage in a database, for example, using just CFFILE. It's a fascinating idea. For more details, read Railo's documentation (you probably have to create an account and login to access this).

Tags: coldfusion · railo

6 responses so far ↓

  • 1 Chris // May 24, 2007 at 2:02 AM

    Sean,

    the not localized section in Railo's component admin section says this:
    If there is no defined member (property) available, Railo will check if there is a suitable "getter" or "setter". Example:
    "myComponent.properyName=",
    If "myComponent" does not have a property "propertyName", Railo will check if there is a method "getPropertyName".

    That's the translation. But, actually I think, in the example "getPropertyName" in the last sentence should be "setPropertyName".

    Chris
  • 2 Gert Franz // May 24, 2007 at 3:55 AM

    Hi Sean,

    I just have to add, that resources can be used everywhere. Tags, functions, mappings, customtags everywhere. Railo 1.1 is based on resources. So you can define a mapping to a ftp resource and copy a file to it with <cffile> and not with cfftp. You can even use for instance cffm in order to browse through the mapping's file system. I will present it at Scotch.
    And I must correct, that the database resource is still in development status. I deleted the note relating to the database resource from the customer center. But since the Railo resource is in the public interface, you can create one of you own for nearly everything. SFTP, SCP, CVS, WebDav etv. After that just use <cffile> etc. No extra work necessary.
    BTW, Chris Schmitz is just translating the remaining texts from german to english. Sorry for the missing translations.

    Gert

    Railo Technologies GmbH
    gert.franz@railo.ch
    www.railo.ch
    http://groups.yahoo.com/group/railo_talk/

  • 3 Andrew Powell // May 24, 2007 at 5:15 AM

    " You can also have Railo automatically invoke getXxx() / setXxx() when you access xxx as a direct property"

    This behaviour exists in Fash today. It's called implicit getters and setters.
  • 4 Peter Bell // May 24, 2007 at 5:23 AM

    Damn you Corfield. Here I am moving along quite happily and looking forwards to Scorpio and now you mention all of these oh so cool features in Railo.

    Guess I'm gonna have to ask around at Scotch. I've heard rumors Railo will be sending a representative!
  • 5 Sean Corfield // May 24, 2007 at 7:53 AM

    @Chris, yes, I figured that's what it said (I studied German for five years but my vocabulary is not so good these days). I was a little surprised it implied that THIS scope was checked first before getter / setter functions - I would have expected it to check for the function first and use the direct property if no function existed.

    @Gert, thanx for the clarification. I did not get a chance to try resources but it's a very interesting concept.

    @Andrew, do you mean Flash? I believe C# also has something similar. And, to be fair to CFMX, there are also times when it does this too, e.g., handling web service return objects.

    @Peter, I'm also looking forward to Scorpio. A lot! All my current projects require CFMX because they either depend on event gateways (which no other engine implements) and / or Transfer ORM (which relies on some CFMX internals and therefore won't run on anything else). That said, I find Railo's configurable approach to CFML behavior very appealing and can imagine writing CFML apps with the admin configured in a "non-standard" way to get the semantics I would prefer in some of these areas (especially making THIS scope private and using the implicit getter / setter settings).
  • 6 AJ Mercer // May 28, 2007 at 2:05 AM

    Railo being at Scotch on the Rocks is no rumor - they are a sponsor no less!!

    Announcing a new version @ SotR- now that is a rumor to spread :-)

    I have been assured by Gert that the next official release will support getMetaData(). It might they be able to support ColdBox and Farcry.

Leave a Comment

Leave this field empty: