Photo from Chile

ValidateThis 0.98 - A Ton of New Stuff, and Two Important Changes

I've just released version 0.98 of ValidateThis, my validation framework ColdFusion. This update has been long in the making, and has been contributed to significantly by a number of folks including Adam Drew, Marc Esher, Chris Blackwell and John Whish. As always, the latest version can be downloaded from the ValidateThis RIAForge site. There are so many new features and enhancements that I'm going to divide them up into a number of posts, so this post will just include a summary, as well as a discussion of a couple of important changes that will impact all existing users. I'm going to start with a discussion of these changes.

The Folder Structure of the Distribution has Changed

A big thanks to Adam Drew for reorganizing the code repository and the distribution for the framework. This change won't impact any of your code, but it does mean that what you do with the download, in terms of which folders go where, has changed. The framework itself is now contained in the root of the distribution, whereas before it was in a folder called ValidateThis. This means that you can simply unzip the entire zip file into your local /ValidateThis folder. The sample applications are now contained in a folder called /samples, so if you don't want to include these in your project, simply delete this /samples folder after unzipping, or move it elsewhere.

A Change to Metadata that Needs Your Attention

In order to add a cool new enhancement (dynamic parameters) I've had to revisit the way that metadata for parameters was being specified. This examination led me to change the format of the param element. Because of this format change, any rules that you may currently have defined that use parameters will need to be changed as well, in order to use this and all future releases of the framework.

The good news is that the change is simple and easy, and Marc Esher has even contributed a regular expression that can be used to automatically update all of your xml files via Eclipse. The truth is that the previous format was actually flawed, so not only will this new format enable this cool new feature, but it will also position the framework better for future enhancement.

[More]

A Git Workflow for Open Source Collaboration - Part I - Introduction

As some of you may know, I'm the lead developer on an open source project called ValidateThis. I changed the version control software that I'm using for the project from Subversion to Git almost a year ago, and I've been very happy with Git ever since. There was a bit of a learning curve to Git, particularly as I'd never really used the command line much, and it's pretty much required with Git, but that was actually one of the reasons for the switch - to give me the impetus to really learn how to work with Git.

I am lucky enough to have several contributors to the project, and they made me aware recently that the fact that the source is housed in a Git repository is interfering with their ability to make contributions. They all have plenty of experience working with Subversion, but Git is quite new to most of them. Simply learning the syntax of Git is no problem, but what many people find difficult, me included, is figuring out how to change their workflow, as working with Git can be quite different from working with Subversion. So I decided to do some research and come up with a proposal for a workflow for all of the contributors. We're going to give it a try and see how well it goes. If changes need to be made, we'll make them. My hope is that the workflow we devise is one that can be used by other open source projects as well, if they choose to do so.

I am going to describe this workflow in detail through a series of posts on my blog, this post being the first installment. The series will likely contain the following posts:

  • Introduction
  • Setting Up Your Local Environment
  • Developing Code
  • Submitting Code to the Project

[More]

Automagic Validations for ColdFusion Objects - CFUnited Slide Deck Available

As promised, the slide deck from my presentation at CFUnited about ValidateThis, a validation framework for ColdFusion, is now available. Download it in PDF format here. Here's a description of the session:

Automagic Validations for ColdFusion Objects

This session will provide an overview of, as well as a detailed how-to about a Validation framework for ColdFusion. The title is a slight misnomer, as, although the framework was originally written to work inside an object-oriented application, and remains an ideal solution for that, it has recently been enhanced to work with simple ColdFusion structures as well. This means that anyone who is looking for a better way of addressing their validation requirements, both on the client side and on the server side, can now benefit from the framework, even if they are not using objects.

The main benefit of the framework is that it will automatically generate all of your client-side and server-side validations for you, from a simple set of metadata. This frees you from the drudgery of writing similar validation code over and over again, and also eliminates the possibility of adding bugs into your application via your validation code. The framework, called ValidateThis, is being actively developed by myself and a number of other contributors, so not only is it extremely functional and flexible right now, but new features are being added continually. If you are interested in finding out more about it, including exactly how to implement it in a new or existing application (and it's dead easy), I encourage you to take a look at the material.

Getting Code Assistance in Eclipse when Creating ValidateThis XML Files

Although ValidateThis, my validation framework for ColdFusion objects, can accept metadata in a number of formats, my preferred method is via an XML file. This file defines all of the validation rules for a particular object, and can, obviously, be created using any text editor. If, like me, you are using Eclipse as your IDE (which includes users of ColdFusion Builder), you can enable code assist thanks to the XML Schema Definition (XSD) that I created for ValidateThis. This post will describe how to enable that feature.

What is an XSD?

XSD stands for XML Schema Definition. It is the successor to the Document Type Definition (DTD), providing a description of the required structure of a particular type of XML document. XSDs are themselves written in XML, which makes them both machine- and human-readable. They are therefore an excellent source of documentation about the type of XML document that they describe, and they can also be used to validate an XML document and to enable code assist when editing an XML document.

[More]

CFUnited is Almost Here - Learn about Validations and ORM

As I'm sure many of you are aware, the final CFUnited will be starting in a little over a week. Although I did attend a couple of CFUN's in the past (when they were a one-day event), this will be my first CFUnited, so I'm pretty excited about it. It will be great to meet even more people than I usually do at other conferences, such as cf.Objective() and NCDevCon, and I wanted to give a final plug to my sessions, as I think they will be of interest to a lot of developers. As well, I've made some last minute changes to both sessions to cover some new material.

What Your Mother Never Told You About CF9 ORM

The ColdFusion team at Adobe have done an outstanding job with ColdFusion ORM, which now provides ColdFusion developers with access to Hibernate, an enterprise-ready, open source, industry-standard Java ORM. The documentation on how to use CF ORM in the ColdFusion docs is also quite good, providing most of what you need to know to make use of the features. The problem, however, is that Hibernate is a pretty complex tool, and in order to use CF ORM successfully you really need to understand certain things about Hibernate. This session is designed to teach you some of those things - it will cover material that is not included in the ColdFusion documentation, but that is essential to understand when working with the ORM.

Topics covered will include Hibernate Session Management, Understanding Object States, Working with Detached Objects, Concurrency and Using a Base Persistent Object. We'll also be looking at the new Transaction Management model in the recently released ColdFusion 9.0.1. If you plan on working with CF ORM and are not already familiar with these concepts I think you'll really benefit from this session. It is, however, an advanced session, so if you are totally unfamiliar with CF ORM you may find it a bit confusing.

The session is scheduled for 5:30pm (ouch!) on Wednesday, July 28th.

Automagic Validations for ColdFusion Objects

This session will provide an overview of, as well as a detailed how-to about a Validation framework for ColdFusion. The title is a slight misnomer, as, although the framework was originally written to work inside an object-oriented application, and remains an ideal solution for that, it has recently been enhanced to work with simple ColdFusion structures as well. This means that anyone who is looking for a better way of addressing their validation requirements, both on the client side and on the server side, can now benefit from the framework, even if they are not using objects.

The main benefit of the framework is that it will automatically generate all of your client-side and server-side validations for you, from a simple set of metadata. This frees you from the drudgery of writing similar validation code over and over again, and also eliminates the possibility of adding bugs into your application via your validation code. The framework, called ValidateThis, is being actively developed by myself and a number of other contributors, so not only is it extremely functional and flexible right now, but new features are being added continually. If you are interested in finding out more about it, including exactly how to implement it in a new or existing application (and it's dead easy), I encourage you to attend my session. It will be held at 3:15pm on Friday, July 30th, and is being repeated at 2:45pm on Saturday, July 31st.

I hope to see you at one, or both, of my sessions. If we haven't met before please come by and say hi.

ValidateThis 0.96.2 - Important Bug Fixes

Since the release of version 0.96 of ValidateThis, my validation framework for ColdFusion objects, there have been a few bug reports which I have tried to be quick to address. This has resulted in the release of versions 0.96.1 and 0.96.2 of the framework. If anyone has downloaded a copy of 0.96 or 0.96.1, I advise you to grab a copy of 0.96.2 from the RIAForge project page.

I'm hoping that 0.96.2 will be as rock solid as most of the previous releases, and I want to thank John Whish and Matt Quackenbush for bringing the bugs to my attention.

ValidateThis 0.96 - Not Just For Objects, JSON Metadata and JavaScript Niceties

I've just released version 0.96 of ValidateThis, my validation framework for ColdFusion objects. I guess I'm going to have to come up with a new tagline, because, as of this release, ValidateThis is no longer only for objects. This update includes a bunch of new enhancements, the most significant of which is that you can now use VT to validate a structure. That's right, you no longer need to be working with objects to make use of the framework. More details on that enhancement, and others, can be found following the summary of changes:

  • You can now use VT to validate a structure, not just an object.
  • Metadata can now be supplied in an external JSON file, as an alternative to the standard XML file.
  • You can now have multiple forms on the same html page for the same object, with different contexts.
  • A John Whish inspired package of enhancements has been added to the jQuery client-side validations.
  • A bug fix reported and patched by a user was implemented.

As always, the latest version can be downloaded from the ValidateThis RIAForge site. Details of the enhancements follow:

[More]

Previous Entries / More Entries