Showing posts with label Railo. Show all posts
Showing posts with label Railo. Show all posts

Saturday 18 May 2013

Another Railo feature for developers: linked structs

G'day:
This extends from my article about a Railo enhancement to replace(), yesterday.

One of the things I observed about the new replace() feature is that given it takes a struct to map its replace-tokens with its replace values, one cannot guarantee which order the replacements are made. This is because structs have no sense of order in their keys, so one ought not infer one or write any code which depends on a sense of ordering in the struct. Here's an example of what I mean:

Friday 17 May 2013

OK, another handy new Railo feature

G'day:
I have some downtime @ cf.Objective() at the mo', so looking at some of the stuff Gert showed us in his presentation. It's that or have a beer... but it's perhaps slightly too early for that. Maybe... hmmm. Anyway, whilst I mull over having a beer, I have this article in my head, so I'll type it in.

Enhancement to replace() in Railo 4.1

G'day:
Gert Franz has just given a very impressive presentation on some new features Railo has added in 4.0 and 4.1. There's too many to go through, but here's one that interested me.

In Railo, the replace() function can now take a struct containing key/value pairs which represent the substitution tokens / values to replace. EG:

Tuesday 14 May 2013

Improving ColdFusion CFML's OO-ness

G'day:
This has probably done the rounds before, but it's just put itself back within my sphere of attention, so I thought I'd mention it. It's also a good quick article to write from bed as I desperately try to ditch a cold I picked up in Ireland; before I have to sit on a plane for 9h tomorrow, to get to cf.Objective() (cue: sympathetic violins). I'm buggered if I'm gonna be hamstrung in my networking (read: beer consumption and general revelry) by a bloody sniffle.

Anyway, I just raise an enhancement request (3559652) for ColdFusion, thus:

Monday 8 April 2013

A reader asks me: "CF10 for a new start up?". Answer: no

G'day:
Goodness: someone asking me for advice. How risky is that? Anyway, it's interesting I guess, and the person said I could use this as a blog article topic, so that's precisely what I'm doing. What I reproduce below is the completely unexpurgated, other than removing a couple of references which identify the correspondent/client/project. At the person's request, I have fixed a couple of typos from the original too. NB: the links below are from the original email, not something I added. I can't / won't vouch for their merits (one way or the other).

Thursday 4 April 2013

OpenBD's attitude disappoints me sometimes

G'day:
This is not the article I was thinking of writing today. But this is just too daft not to repeat.

The other day there was some discussion on the Railo Google group about some weirdness with JSON validation, which is worth a quick read. In summary, it seemed to the original poster that there was some false positives coming through. Being a literalist I observed that none of the examples were actually JSON according to JSON's own spec, as well as the RFC. Micha and I agreed to disagree - kinda... I'm sure Micha doesn't care about my opinion ;-) - as to whether Railo should stick to the spec at the expense of breaking existing code. He suggested the more moderate route.

Thursday 28 March 2013

How did you come to be using Railo? (survey results)

G'day:
I've got 80-odd results for the survey I started the other day. This was one of the best and fastest responses I've had on the various surveys I've run on this blog. I wonder if this is because it was just a very short survey (one question), it was something people felt like responding to, or just that more people read this blog these days? Dunno. Anyway: no-one cares about that.

So: the results. Firstly I'll repeat something I touch on with each of these surveys I do, and that Mark Drew alluded to in a comment against the original article relating to the survey. With the mechanisms available to me, these surveys are not reflective of a very broad population base and this can have a hand in pre-determining the results.

Sunday 24 March 2013

How did you come to be using Railo?

G'day
I've concocted a quick survey, which simply asks how you came to be a Railo developer, IE: whether they have come from a history of using ColdFusion or BlueDragon, or straight to Railo having not used any other CFML engine.

The survey is here now closed. The results have been posted.

Wednesday 13 March 2013

Here's a Question

G'day:
I just saw a status update on Twitter of someone mentioning a client of theirs was moving to Railo after being impressed with Railo 4, and underwhelmed by ColdFusion 10. I have to say I think their judgement is off a bit there (ie: I think CF10 is more impressive than Railo 4... that said they're both good products, and I don't mean to take anything away from Railo when I say that), but fair enough: I'm not privy to their requirements and what's important to them so I can't really comment intelligently on the basis for their decision.

Friday 8 March 2013

Clarification about the ++ / thread-safety thing

G'day:
First things first, it's 11pm on Friday, I've just got back from being at the pub since 6pm and I have had half a dozen pints, so I don't vouch for the quality of this article.

I don't shrink away from over-stated "headlines" on this blog, but I don't like to misrepresent anything. I have a couple of things to clarify based on feedback I've had from the articles earlier today:

Friday 1 March 2013

Weirdness with interface caching: can someone sanity check this please?

G'day
I was going to troubleshoot something I read somewhere about someone having some issues with interface caching. That sounds vague, but I don't have the URL on me at the mo', and haven't got far enough to really comment on it yet.

As part of the investigation I knocked together some code, and I am seeing "unexpected results" from my baseline testing.

Wednesday 27 February 2013

How ColdFusion makes a pig's ear of ordered-argument argument collections

G'day:
Apropos of nothing, I'll just point out I'm writing this en route back from Auckland to London, via Kuala Lumpur. This entails a 10 and a 14 hour flight, with a stop to change planes at KLIA (the break is about three hours, I think). It's a bloody long haul. Worse: I did the reverse trip only a fortnight ago, so I've already seem the decent movies they have on offer for Feb (I watched Lincoln, Dredd, Seven Psychopaths, Alex Cross, Taken 2, in decreasing order of quality. The first three were good; the rest watchable). I'm writing this on my wee netbook, which runs for about six hours if I turn the screen brightness down a bit. It's awkward to type on, but it gets the job done. And happily runs CF10, Railo 4.0.2 and CFB simultaneously.

Saturday 16 February 2013

Operator precedence: difference between ColdFusion and Railo

G'day:
This thing still remains a bit quiet. I'm currently in New Zealand and it's nice and summery here so there's less motivation to be sitting in front of the screen typing stuff about ColdFusion. And "the screen" is only my little wee netbook which isn't the most conducive to writing code & blog articles simultaneously as I can only fit one app on the screen at a time, and even then it's only  about 2/3 the size to be useful (1024x600). Still: it's good for watching movies on the flight from London (25 hours for those who haven't done it), and it is quite impressive in that it will run CF9, CF10, Railo and MySQL simultaneously without a problem, as well as a couple browsers and CFB.

Monday 11 February 2013

Thread longevity weirdness

G'day:
Man, I've been slack recently. Sorry: sickness, my "actual real life" getting in the way of sitting in front of the computer all the time, and general malaise have been pre-occupying me. I'm sure y'all been coping without a blog article to read. I have actually been beavering away with a coupla articles, but it's all just investigation at the moment, and I've nothing written down yet.

Here's an interesting thing I encountered on Friday, and just got a chance to write some test code now.  Consider this code:

Tuesday 5 February 2013

Closure and bindings and that sort of bumpf

G'day:
I was gonna put this reply on the Railo mailing list where the question mark was placed in my head, but figured I've been a slack-arse over the last week or so, so will post it here instead.

BTW: sorry for being a slack-arse, but I've been sick for the last week (just the dregs of it left now), so my attention-span for looking at computer screens is at a minimum, and all of that is occupied by my work requirements. Outside of work I've been sleeping-off this 'flu, or watching DVDs (which equates to watching the first 15min of a DVD, then resuming with the "sleeping-off this 'flu"... I'm turning into my father and his amazing ability to be put to sleep by anything).

Friday 25 January 2013

Survey results: turning a string into an array of characters

G'day:
One of my readers pointed out to me if that if I tarry too long before reporting back on my recent survey about turning a string into an array of characters, then people would lose what little interest they have in the topic. And I admit it's not the world's most interesting topic anyhow. Anyway, I've got 35 responses, so I'll summarise the results.

Monday 21 January 2013

Railo website on Raspberry Pi with a public facing domain hosted at home

G'day:

As promised on Twitter last week, here's Chris's article on getting Railo running on Rasperry Pi.

Over to Chris...



So you are a lucky owner of a sweet Raspberry Pi, you have a typical broadband connection, some ColdFusion language skills and you would like to take advantage of all these things and roll out a little Web site hosted at home, independently from any hosting provider, and make it available to your family, friends and the rest of the world? That's exactly what I've done and I thought I'd share a step-by-step guide on how my stack has been set up so you can give it a try, amend it and/or improve it.


The guide is inspired by an excellent article by Glyn Jackson on running Railo on Raspberry Pi that I found very useful when I started this exciting journey. However, the set-up described below differs slightly as the current version of Raspbian does not allow to install the official Oracle Java JDK and for that reason I'm going to opt for OpenJDK instead. And also, we don't need to worry about the SSH configuration as it's enabled by default in more recent versions of Raspbian.
Another deviation from Glyn's config is using a wired Internet connection rather than WiFi.

Prerequisites

  1. Standard broadband connection with a dynamically allocated IP address
    If you are in the UK, it can be BT, Virgin or any other popular async broadband option (and if you are lucky enough to have an Internet connection with a static IP address, you might want to skip the section covering Dynamic DNS).
  2. A router configurable to forward traffic on port 80 to a machine on the local network
    I tested it with an Apple TimeCapsule and a BT HomeHub but other routers should provide that functionality as well.
  3. Raspberry Pi (Model B) with 512MB of RAM
    I haven't tested it on the 256 model but you might like to do it at your own risk.
  4. An SD card with the Raspian GNU/Linux distribution installed on it
    A step-by-step guide covering this topic can be found on the eLinux site. You will need direct or SSH access to the box with root permissions.

Setup summary

Possible alternatives
HardwareRasbperry Pi 512MB RAM
Operating SystemGNU/Linux Raspbian
JREOpenJDK 1.6Oracle Java provided you are running a soft-float ABI distro (e.g. Debian) instead of Raspbian
Web serverLighttpdNginx
Application serverTomcat 7Jetty, Resin etc.
CFML serverRailo 4 jarsEarlier version of Railo, Open BlueDragon (not confirmed). Adobe ColdFusion is unlikely to run on such limited hardware.
Internet domain providerDNS DynamicThere is a number of alternative free and commercial services

Power

One of the great things about Raspberry Pi is its low power consumption which means having it always on should not ruin your home budget. I'm no expert on the electricity stuff but I'm powering my Pi through a USB cable hooked to the Apple TimeCapsule which acts as our home router and is always on anyway so that means there are two devices plugged to one wall socket. Does this configuration mean a decreased power consumption? I honestly don't know but it's certainly nice to have one extra power socket available.
In my case, the Pi is connected to TimeCapsule with two cables as the wired Internet connection is also coming from it (see the picture below).


Friday 18 January 2013

How cool are the Railo guys?

G'day:
Just a quick one. Check this out. I was chatting with Adam Tuttle last night about some differences we'd noted in how ColdFusion and Railo seem to implement the hashCode() method for their respective struct implementations.  Here's some code (as per the thread I link to above):

Thursday 17 January 2013

Monday 31 December 2012

Lists with empty-string delimiters

G'day:
Blimey; three articles today. Once again, this stems from a thread on the Railo Google Group, this time regarding a bug I found in Railo (or that I think is a bug), which resulted in some questioning whether it's a bug in Railo, a bug in ColdFusion, or a bug in both. And the more I look into it, the less sure I am about it.

And the situation I found the... erm... "anomalous  behaviour" (shall I say) was in the code I was writing for the previous two articles' investigation.