Category: ColdFusion

Oct 21 2009

I am now speaking at CF.Objective(ANZ)

This will be my first time as a speaker at at (any) conference. My session, entitled 'Future proofing your application development' is aimed at people that are struggling with CF OO syle development that is now prolific in many of the big and popular frameworks. It will take a pragmatic look at how you develop now, with steps you can take to easy yourself into this world, if indeed you decide that it is for you.

I will also be arriving in Melbourne a day early to attend the Inaugural FarCry DevCamp at Melbourne Law School and will be show casing the new Paterson's Extranet bult on Farcry 5.2

Posted by AJ Mercer at 11:50 AM - Categories: ColdFusion

Oct 8 2009

ColdFusion Builder Beta 2 - Custom Dictionary

I have been very happy with CFB beta 1, but hanging out for beta 2 to see if some minor annoyance went away. So I have downloaded, uninstall beta 1 and installed beta 2. Then had to reimport all my projects, then discovered I had to get my snippets back and then realised my custom dictionary for Farcry CMS would be gone as well. Make sure you back your stuff up first ;-)

One of the silly things with beta 1 with custom dictionaries is that you had to merge the XML into the ColdFusion dictionary (cf8.xml or cf9.xml). This seemed crazy as Eclipse and CFEclipse you would just drop your custom XML file into the correct directory, add an entry in dictionary.xml and it was good to go.

Well, I am happy to report that Adobe have not only addressed this issue, but they have taken it up a notch as well. All you have to do now is create a directory called 'Custom' and drop your XML files in there and you are done!

Read full instruction to create custom CFML dictionaries for ColdFusion Builder

Download Farcry CMS custom dictionary for Eclipse

0 comments - Posted by AJ Mercer at 9:35 AM - Categories: ColdFusion | Farcry

Sep 7 2009

Sign up for a piece of the CF.Objective(ANZ) action

The cf.objective(anz) committee have been working around the clock over multiple timezone and international banking laws and are now ready to accept your registration for CF.Objective(ANZ) 2009 in Melbourne, AU on November 12-13. Get in before October 12 for early bird price of $769

The conference speakers and program has been locked in and many Sponsors are getting behind this event.

Posted by AJ Mercer at 9:33 AM - Categories: CFML | ColdFusion

Aug 22 2009

A CFML framework for the rest of us - Reclaimed

After taking a look at FW/1 I posed a blog tittled 'A CFML framework for the rest of us'. Shortly afterwards, I got a comment (slightly tongue in cheek) from Chris Peters say that was ColdFusion on Wheels catch phrase / slogan.

I have not looked a cfwheels for a long time; about when the ownership changed hands and I think it may have had some issues with Railo (v2). So I downloaded and installed on Railo 3.1 and got the welcome page up :-) That motivated me to look at the excellent cfwheels documentation and do through the examples. The tutorials are very basic, but give you a good understanding of the philosophy behind cfwheels (which is based on Ruby on Rails).

I also took the opputunity to take a look at Russ Johnson's CMS built on cfwheels call Splash CMS. So far all I can say, besided saying it looks great, is that it does run on Railo 3.1; which will be no surprise to those that know Russ. I am hoping this will be a good project for me to dig into and see how to build applications with cfwheels and will blog about it shortly.

0 comments - Posted by AJ Mercer at 9:00 AM - Categories: CFML | ColdFusion | Railo

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.

3 comments - 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.

0 comments - 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: CFML | ColdFusion