Search Results

There are 15 item(s) tagged with the keyword "coldfusion".

  • Displaying: 1 - 10 of 15
1. RTFM carefully when applying CF hotfixes!

Here’s a quick tip for anyone who may be seeing some odd behaviour after applying a ColdFusion hotfix (as well as a reminder to myself to be more careful next time...).

I've just applied the latest security hotfix to my web server, and everything seemed to have worked fine - except that I suddenly started receiving a bunch of ColdFusion error notifications from a couple of my websites.

Read More
Tags: ColdFusion
2. How I Got Started In ColdFusion

As seems to be required now, here is my contribution to Steve Bryant’s How I Got Started In ColdFusion Day:

Having graduated from university in 1996 with a degree in Classics and – slightly more usefully – a reasonably popular Clint Eastwood fan site (”The Page With No Name”; I had a lot of spare time at uni…), I found myself an entry-level web monkey job at Future Publishing.

I started purely building the HTML pages; all the heavy lifting was done by a few techie guys, using Active Server Pages in VBScript (long before ASP .NET, so in what would now be called ASP Classic). We used various Microsoft technologies – anyone out there remember IE channels? (I think we may have been a launch partner for them…) Over the next few years I picked up bit of ASP here and there, and before long I was a techie guy myself.

Read More
Tags: ColdFusion
3. Using CFTHREAD to speed up your web service calls

I’ve recently taken to using the excellent Postmark to send out all the transactional emails from my web sites. For just 0.15 cents per email, you get the benefits of increased deliverability and a great API to track and manage any undelivered mail.

If you like, you can send your emails simply by using Postmark’s SMTP servers – a really quick way to migrate to their system. But the real power comes when you start using their API. I’m not going to go into detail about how to set this up here, but in short you just have to send your message as a JSON object via HTTP Post.

And this is where threads come in. There are some web services you will use – for instance, payment gateways – where the returned result is critical to the continuation of the page request. But others – as well as Postmark, I also send API requests to MailChimp for mailing list subscriptions – where you really don’t need to know the outcome.

Read More
Tags: ColdFusion, Postmark
4. Integrating Portcullis into FW/1 applications

If you need to protect your FW/1-based site against SQL injection and cross-site scripting (XSS) attacks – and you do! – you can do a lot worse than use John Mason’s Portcullis. It’s a single CFC which scans and sanitises your Form, URL and Cookie scopes, and optionally sets up a blacklist of repeatedly-offending IP addresses.

Read More
Tags: ColdFusion, FW1
5. EM/1: email templating for FW/1

As you may have noticed from some of my recent posts, I’ve recently started to use Sean Corfield’s FW/1 as the framework for my sites, and it’s revolutionised the way I write code.

One thing I feel is missing, though, is the ability to send emails from within the app. This seems to me to be a fundamental requirement of nearly every web app – although I also understand Sean’s wish to keep FW/1 as lean and stripped-down as possible.

I first started by creating an email service to handle sending emails, but this meant having to make a reference to the service in every controller that required it; so I decided to try to “extend” the FW/1 framework with a native implementation.

Read More
Tags: ColdFusion, FW1
6. CF9 ORM and Apache’s mod_rewrite

Here’s another problem I’ve run into with ColdFusion’s ORM (there seem to be a few of these recently…).

I’ve only just started running a CF dev environment under Apache on my Mac – I was previously running IIS under VMWare. The problem comes when using Apache’s mod_rewrite for URL rewriting.

Read More
Tags: ColdFusion, ORM, mod_rewrite, ISAPI_rewrite
7. Custom buildURL() method for FW/1

UPDATED: The functionality has now been rolled into the framework as of version 1.2, so the hack is unnecessary. The methodology for overriding a framework method still applies, but let me reiterate: be very careful what you change, and look out for any code changes to the overridden method in future releases!

My (first) FW/1 application consists of two subsystems: public and admin. The public subsystem is the default, so if I invoke a URL action without a subsystem specified explicitly, it will use ‘public’.

Of course, if you use the buildURL() method to create your links (which you should be doing!) it will always prepend your action with public: – which I find a little untidy, especially when using SES URLs.

Read More
Tags: ColdFusion, FW1
8. Using include within cfscript

I’ve only recently started using cfscript to code my components, and today ran into this little problem…

I have an Application.cfc, written in cfscript, and I want it to include a settings file which contains the different settings between development and production servers (so I can update the Application.cfc file without having to worry about altering settings before copying it to the live server).

It looks something like this (simplified, of course!)...

Read More
Tags: ColdFusion
9. CF9 ORM relationships – hasProperty oddity

In my CF9 ORM application, I have a magazine object. Each magazine has a single genre (e.g. Craft, Sports, etc.) – so I have a many-to-one relationship set up on the magazine.cfc. It all works nicely, until I want to try removing the genre from the magazine.

If I create a new magazine entity, the genre property contains an empty string (confirmed by dumping the object). And the hasGenre() method returns false.

Read More
Tags: ColdFusion, ORM
10. FW/1’s populate() method uses named arguments

Just a quick tip for anyone using FW/1’s populate() method to populate their objects.

I ran into a problem where my auto-generated setters were being called correctly by the populate() method, but my explicit setters were not. And because FW/1 ignores any error generated here, I couldn’t work out why this was…

Read More
Tags: ColdFusion, FW1
  • Displaying: 1 - 10 of 15

Didn't find what you were looking for? Refine your search and try again.

Search: