Entries Tagged as 'Best Practices'

Blog post 101 and a ColdFusion 101 Series

Best Practices , ColdFusion , Misc , Tips and Tricks No Comments »

To mark the 101st post on my Blog, and to complement my thoughts on what content I wish to publish on my blog in order to keep it current, I have decided that I will be writing some material on the following areas:

  • 101 - ColdFusion variables and scopes, to include complex and simple variable types.
  • 101 - Anatomy of a ColdFusion CFC.
  • ColdFusion by Example - A series of posts that provide examples of some of the most commonly used ColdFusion Tags and Functions grouped by type, with practical examples.
  • Syntax is easy, programming is hard.  A general guide on how to concentrate more on the actual programming side of development rather than getting caught up with the syntax!
It's a tall order, I know, and it'll take discipline in order to keep the momentum going with this, but the idea is to provide some useful output during this process e.g. code snippets \ templates along the way that can be used and altered by anyone (including me) during development.

Bookmark and Share

Quick and Dirty UML with yUML

Best Practices , Online Resources , UML No Comments »

"A picture says a thousand words"

I have always been a big fan of modelling / diagramming a business' domain model and processes when desiging an application.  Not always wanting to jump straight onto a computer - I was a big fan of the old school pencil and paper for drawing out \ diagramming these as I found it helped me a) Get a better understanding of what I had to develop, the objects I had to create and their relationships and b) Helped identify any ambiguities or issues that may occur before and during development.

In the earlier days I would have jumped straight into my database management tool and started designing and developing my database tables.  Then Hal Helms taught me that the database should only exist to persist the data in your objects, and I agreed and therefore started taking a different approach to how I started out with an applications design.

I started getting into UML (Unified Modelling Language) and BPMN (Business Process Model Notation) which standardised what I was doing with regards to designing my application and helping convey what we were \ are trying to acomplish to others.

In doing so I came across a couple of useful tools that helped out along the way and one in particular I felt was worth mentioning.

That's where yUML comes in...


Source-less Deployment of Coldfusion

Best Practices , ColdFusion , Tips and Tricks No Comments »

When deploying applications to any 3rd party hosting provider or client, you may wish to consider protecting your development effort and intellectual properties (IP) by either encrypting or pre-compiling the application code.

In the attached document, I will briefly cover a number of ways in which you can accomplish this.

There are currently three methods of deploying your ColdFusion applications in an encrypted format, which ship with ColdFusion, so as to help protect your code:

   1. Encrypting templates using the “cfencode” utility.
   2. Pre-compiling and deploying templates as Java Byte code using the “cfcompile” utility.
   3. Deployment Packages as J2EE Archives (EAR or WAR files) – accomplished using the ColdFusion Administrator.

Another option is packaging your application in ColdFusion Archive Files (CAR), but this is not within the scope of this document as there is no compilation or encryption used with this method.

Further details can be found at: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=deploying_3.html

The above options all have their own behaviours, pros and cons.  These are discussed in more detail below.

The document can be downloaded from here.

If anyone has anything to add, please feel free to contact me or comment below.


Bookmark and Share

Programmer's dozen - Programming best practices

Best Practices , Misc , Online Resources No Comments »

I came across this on Simon Whatley's Blog and wanted to add it here too for anyone who reads this blog (and for easy access myself).

Excerpt from the JAOO site

"Take control of your code with these programming best practices from Kevlin Henney.  At JAOO Aarhus 2008 Kevlin used a trash can, vampires, a train wreck, whiskey and much more to make you understand and remember his 13 constructive points (a programmer’s dozen) about programming and code smells."  

As this is a must see, I have embedded the video of the presentation below:

Bookmark and Share

Ending a SESSION on Browser Close

Best Practices , ColdFusion 3 Comments »

This is something that has come up a few times recently so I thought I'd write this up. Im not saying that this is how we should do this but merely offering these as options to consider. If anyone else has had experience of this then please feel free to comment.

NOTE: I have also consulted with Ray Camden and Ben Nadel on this so some of the text I have borrowed from their responses.


What we are trying to do is create a "Session-Cookie". This is a cookie that exists for the duration of the browser, but expires the moment that the browser is closed. This will allow the session to "End" when the user closes the browser.

Be CAREFUL on what this means!!

This does not actually mean that the SESSION ends; it does NOT actually mean that the OnSessionEnd() method gets called. This simply means that the next time the user opens the browser, their existing session will not be picked up (if it has not yet timed out). Session-only cookies ONLY disable the browser's ability to handshake with the old SESSION, nothing more.

If you are concerned about the SESSION ending on the server and the calling of OnSessionEnd(), you can't really force that. The COOKIE expiration takes place on the client; the SESSION expiration takes place on the server.


Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds