Category: ColdFusion

Jul 30 2009

A CFML framework for the rest of us

I have been looking at a number of frameworks for awhile but have found them to be either:

  • too complex / hard to get my head around
  • seem like overkill for the applications I build
  • have too much plumbing for my liking

and on some occasions all of the above.

Sean Corfield (Mr Frameworks) is currently working on something that I think is going to suit me nicely - FW/1. Introducing Framework One will tell you all about it.

It is a conventions based framework, like cfWheels, that does not need a lot of configuration to get started. Something that I really like is you can start your site off with just views (and layouts), and then add controllers and services in later. This means you can have a site up and running very quickly; no messing around with plumbing / listeners / general OO headaches.

Conventions and auto-wiring feels a little like black magic at first, but once you understand the rules (FW/1 documentation is really good and there are plenty of example apps), it is a joy to work with.

And for a single file framework (one CFC of about 400 lines), it is no light-weight in terms of functionality; full MVC and hooks to popular bean factories like ColdSpring. It currently runs on ColdFusion, Railo and soon Open BlueDragon.

Posted by AJ Mercer at 5:16 pm - Categories: CFML | ColdFusion | Railo

Jun 24 2009

Flush ColdFusion trusted cache from Farcry Webtop

On my Farcry production server I have enabled Trusted Cache to improve ColdFusion performance. But every time I deployed changes to my Farcry site, I would forget to flush the cache and would take my a moment ot two to realise why my changes have not taken affect.

So I have created an extension to the Farcry Admin Reload application so you flash the ColdFusion cache from the the WebTop.

You can see the code for Flush ColdFusion trusted cache from Farcry Webtop on FarcryCMS Docs.

Posted by AJ Mercer at 1:21 pm - Categories: ColdFusion | Farcry

May 14 2009

Population PDF Forms with ColdFusion 8

Now that Adobe owns ColdFusion, a lot of PDF functionality has been added to CF8. Amongst that is the ability to populate PDF Forms. This means you can pre-populate forms for clients / members - how many times have you had to fill out a form and think to yourself, 'they already know this stuff!!'

The client / member can then update any info if required. With the proper licencing, you can save the data in the PDF, or have the PDF submit the data back to the web server.

Recently I was given the job of reproducing Contract Notes for clients. The origion is produced by printing the data onto stationary; but as the client wont have the sationary, this is not going to work. No drama for me, I am a CF developer :-)

The first think I did was to open up the PDF in Adobe Acrobat and add fields to the document to create the PDF form. This document is not to be alter by the client so licencing was not an issue. In fact, I get ColdFusion to flatten the file after it is populated so the client can not modify that data and then print it.

In previous of CF, you would hvae to use CFPDF to read the document, then other CF tags to get the fields and poplaute and bluh bluh bluh - doesn't matter any more cos CF8 simplifies all that with a new tag - CFPDFFORM and it's buddy CFPDFFORMPARAM

<cfpdfform source="#pdfPath##pdfDoc#"
                 destination="#pdfPath##pdfTemp#"
                 action="populate"
                 overwrite="yes" >
    <cfpdfformparam name="Branch" value="#qryCnote.BranchName#" />
    <cfpdfformparam name="Advisor" value="#qryCnote.AdvisorName#" />
</cfpdfform>

Just add a CFPDFFORMPARAM for each form field and give it a value <hand in the air and shout> 'Clear!'

And to get rid of the form fields, just use the flatten attributes.

<cfpdf action="write"
           source="#pdfPath##pdfTemp#"
           destination="#pdfPath##pdfTemp#"
           flatten="yes"
           overwrite="yes" />

And finally, push it back to the browser

<cfheader NAME='Content-Disposition'
               VALUE='attachment;filename=#saveAsName#' />
<cfheader name="cache-control" value="" />
<cfheader name="pragma" value="" />

<cftry>
    <cfcontent type="application/pdf"
                    file="#pdfPath##pdfTemp#"
                    deletefile="yes"

                    reset="yes" />
    <cfcatch>
    <!--- prevent unnecessary log entries when user
           cancels download whilst it is in progress
    --->
    </cfcatch>
</cftry>

Posted by AJ Mercer at 3:48 pm - Categories: ColdFusion | CFML

Apr 1 2009

Railo 3.1 Open Source is here

The beta of Railo 3.1, the Open Source version, was released to day. I will update this blog entry once I have had a little play with this much anticipated release. One of the first things I will be checking out is the Extention Manager - download and install application from the Railo Administrator. Gert has been letting a few sneak peeks slip out that makes me think I will not be getting much sleep tonight (2am release in Perth).

Railo 3.1 LogoAlong with the engine, new web sites too.

If you want to know more about Railo, and will be in Sydney in May (21-22), make sure you see Gert Franz at webDU 2009.

I am offcially a Railo Fan - it says so right on their site ;-)

Posted by AJ Mercer at 2:00 am - Categories: CFML | Railo | ColdFusion

Mar 9 2009

webDU 2009

I want to go to webDU too

I am all booked in for another trip to Sydney, this time the familiy is coming as well. Fly in Wednesday lunch, check in, then on the ferry to Manly. If there is time will try and swing by Bondi too. We are planning on going to the Aqaurium one night.

Then two days for ColdFusion and web goodness for me while the family hits the Sydney town. Looking foward to catching up with CF buddies and finally get to meet Gert Franz.

After that it is off to the Blue Mountains for the weekend. Then one more look around Sydney before flying home Monday afternoon.

Posted by AJ Mercer at 2:37 pm - Categories: CFML | ColdFusion | Family Life | Railo

Jun 16 2008

New ColdFusion Podcast

Posted by Webonix at 8:57 pm - Categories: CFML | CFUGWA | ColdFusion | Railo

Jun 10 2008

Adam Lehman on Railo Open Source

I was very keen to see what Adam Lehman had to say about Railo's announcement about going Open Source and joining forces with jboss.org after has scathing attack on New Atlanta for their openBD product.

I was actually surprised, and delighted by what I read. From what I have read, Adam has personal issues with New Atlanta, which may have had a lot to do with the tone of his blog entry. But in this blog he says Railo are doing it for the right reasons and have choosen the better licence. Perhaps we can read into that - less threatening for Adobe?? Maybe Railo have been more open with their intentions; I know Gert was keen to talk to Adobe before the big announcement

There is a little confusion about what Railo will do with their Enterprise product. From may chats with Gert, I was under the impression that they would still be selling this version. I am sure Railo will clarify this shortly.

He also makes a good point about the partnership with Redhat - will Railo be tied to Jboss?
Just as Adobe's CF8 is branching out to more J2EE Application Servers, is Railo aligning itself with one?

From my point of view, a huge fan of CFML - it is all good

Posted by Webonix at 9:07 pm - Categories: CFML | Railo | ColdFusion