Photo from Chile

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.


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:


ValidateThis 0.95 - Enhancements to the Result Object and Client-Side Validations

I've just released version 0.95 of ValidateThis, my validation framework for ColdFusion objects. This update includes some community contributions, as well as a number of features that were prompted by community requests. Here's a summary of the changes, followed by the details for each one.

  • Numerous enhancements were made to the Result object, as well as the ability to easily substitute your own Result object for the one that is built into the framework, and the ability to automatically inject the Result object into your business object.
  • Client-side validations have been enhanced so that missing form fields will not generate JavaScript errors.
  • Client-side validation code has been refactored, and includes a fix from Martijn van der Woud for the equalTo validation type.
  • More refactoring to set the stage for future enhancements.

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


ValidateThis 0.94 - More community contributions

I've just released version 0.94 of ValidateThis, my validation framework for ColdFusion objects. Once again this update includes community contributions, including some from Jamie Krug and John Whish. Here's a summary of the changes, followed by the details for each one.

  • A new boolean validation type has been added.
  • Proper optionality is now supported for all validation types.
  • The framework can locate your rules definition file with zero configuration when you pass an object into a method call.
  • A newResult() method has been added to the ColdBox plugin.
  • A getFailureMessages() method has been added to the Result object.
  • An issue with overriding failure messages with the custom validation type has been addressed.

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


Who Is Using Contexts with ValidateThis, and How?

This is being cross-posted from the ValidateThis Google group in case there is anyone who uses ValidateThis and reads this blog, but does not subscribe to that group.

I'm conducting an informal survey (consisting of this post) to find out who is using the Contexts feature of VT and how they are using it. Mark Mandel and I had an interesting conversation the other night about contexts, in which he suggested that contexts might be unnecessary with some tweaks to the JavaScript that is generated for client-side validations. As we walked through all of the use cases that I've had for contexts it seemed that he was correct (unsurprisingly - he seems to have an annoying habit of being correct about things), but I imagine that other folks may have found different use cases.

So, if I could beg a minute or two of your time, for anyone currently using VT, would you mind answering the following questions:

  1. Do you use contexts?
  2. Can you provide me with some examples of what the contexts are? I'm particularly interested in knowing what problem you are solving by using the context.

Ideally you'd post your responses to the thread on the Google group, but if you'd rather not do that feel free to leave a comment here or email me directly.

Thanks for your help with this.

Previous Entries / More Entries