ORM on Railo
Gert (of Railo) has just tweeted that if you ping them via their Contact form they'll give you access to the pre-release group.
This is a good chance to test your CF9 apps against Railo implementation or just to give ORM a whirl
Gert (of Railo) has just tweeted that if you ping them via their Contact form they'll give you access to the pre-release group.
This is a good chance to test your CF9 apps against Railo implementation or just to give ORM a whirl
Another one of those features that I knew was is in CF 9 but didn't know was in Railo and thats Application wide datasource name.
What this means is that in your Application.cfc (NOT .cfm!) you can set a per-application datasoure which lets you ommit the "datasource" attribute in your <cfquery> tags.
Your Application.cfc
Your test.cfm page
Pet Rescue SOS is a site I've had a hand in putting it together, put simply, is the place where you can register your pets, have them assigned a unique tag and identity number which can used to identify and locate your pet anywhere in the world. This service is available online 24hrs a day and you have access to your own registration section from where you can manage your account and pets.
Below for anyone interested is some of the tech specs:
I've been meaning to blog this for a while.
When it comes to getting rid of the amazing amount of whitespace CF can generate in your page there are quite for tricks to getting around this from multiple tags to server filters that you can use.
With Railo its a little more simplier. Log in to your admin panel, go to "Output" in the left hand side and check "Whitespace management: Removes all white spaces in the output that follow a white space".
And the price of the ticket should make the tightest of managers happy - €0,00 (thats £0.00 or $0.00). You read that right, its free as in beer, so check out the scotch-on-the-rocks.co.uk site for more information. Below are the dates and locations. I'm already registered for London and trying my hardest to get to the Amsterdam one as well.
| Location | Date | |
|---|---|---|
| Munich | October 19th | [Register] |
| Zurich | October 21st | [Register] |
| Milan | October 23rd | [Register] |
| Amsterdam | October 26th | [Register] |
| Brussels | October 27th | [Register] |
| London | October 29th | [Register] |
Railo 3.1 has been released. This see's a year of development come together for the open source CFML engine.
I've been running the beta source successfully for a couple of sites with no issues.
Check out the Press release, Whats new, download it, or even suggest new features and vote for others.
Updating Railo couldn't be easier. In case you didn't know, from the Administrator under Services go to Update and if a patch is available you can "Execute Update"
Whats even nicer is that you can change where you get your update from and if you want to be on the edge you can point the update url to http://dev.railo.ch/. This is currently looking at 0.24 and will give you access to the new looking admin (follow the links below for screenshots)
This is one of those features I know is coming in ColdFusion 9, but I don't know if its new in Railo 3.1.0.024 or been there for a while?
Anyway i've just found out you can "var" your variables in a CFC at any point. This isn't copying the way CF9 is planning on handling this by adding it to the LOCAL scope but it does mean you don't have to put everything at the top. Even though I'll most likely keep all my vars at the top for now its good to know that the following bit of code which in the past would throw an error now works fine.
[sourcecode language="plain"] <cffunction name="text" access="public" returntype="string" output="false"> <cfset doSomethingFirst() /> <cfset var b = "set second" /> <cfreturn b /> </cffunction> [/sourcecode]The Ternary Operator and Railo
With CF9 beta out the blogs have been busy looking at all the new features. There has been some great reads and they've substituted for the fact that I haven't had the time to look at the new version myself yet.
Whats also been a good experience is that they have given me the chance to learn new stuff about Railo that I hadn't realised. The first one is that it already has Ternary Operator. This is a way of writing an IF/ELSE block in a single statement:
[sourcecode language="plain"] $variable = condition ? if true : if false [/sourcecode]
So in my CFSCRIPT block I have:
[sourcecode language="plain"] <cfscript> val = (true ? "A True Response" : "A False Response"); writeOutput(val); </cfscript> [/sourcecode]
After I found the Ternary Operator on Railo I've decided to have a look over the Tags documentation, and Functions documentation viewer on Railo Wiki.
Then I came across CFStopWatch. It works like CFTimer in that its used to determine how long it takes for a block of code to execute. The difference is that CFStopWatch stores the time to execute in a variable so you can reference it later. It works by wrapping the tags around the code block you want to execute and setting the time to a variable:
[sourcecode language="plain"] <cfstopwatch label="myLabel" variable="var" > CFML logic goes here <!--- pause for 1 second ---> <cfsleep time="1000"/> </cfstopwatch> <cfoutput><p>Your code took #var# milliseconds to run</p></cfoutput> [/sourcecode] Running the above code will outputCFML logic goes here Your code took 1000 milliseconds to run
I can see me using this when running code blocks which I know might take ages, you could write of the time to a log or even send an email.