Viewing by month: July 2005

Jul 14 2005

Model-Glue's Many Names

Model-Glue wasn't always called Model-Glue. It went through a few names, and they all have something to do with how it works. I thought it might be fun to share them, as it gives some insight into the thought behind the framework:

1. Call And Answer

Ripped from a Barenaked Ladies song, "Call and Answer" talked about how I wanted a framework that used a message / listener format where events called out messages and controllers answered.

2. Model-T

"You can have it in any color you want, as long as it's black."

The framework enforces some rules, and they're largely unshakeable. Sometimes it'd be easier to just connect tab A to slot B, but going through the proper channels enforces some level of application design.

3. SilentPartner

I wanted a framework that got out of my way. I needed to spend more time on my application than I did working with the framework, so I designed Model-Glue with this in mind: be there when I need you, shut up when I don't.

2 comments - Posted by Joe Rinehart at 10:38 AM - Categories: Model-Glue

Jul 12 2005

I don't server-side validate forms

Seriously, I don't. I'll do the basic client-side validation provided by CFForm and CFInput, but I don't validate a single form-scoped variable on the server side.

Why?

It's so low-level and rigid. Why write all that validation logic bound directly to FORM.favoriteColor? Wouldn't I like to keep it, and maybe re-use it on FORM.secondFavoriteColor?

Now, I'm not saying you should _trust_ your form data - not by any means! In fact, I think what I do nowadays is even stricter!

Here it is:

Everything from the user (or from whatever form+url value collection your framework of choice provides) is a string. Therefore, I can can back it with a simple bean with favoriteColor and secondFavoriteColor properties, and blindly set those properties to the values coming from form.

In the bean, I can then write validation logic that does both type and value checking. (Or, even better, I can seperate this logic into a Validator component that I compose the bean with in its constructor.)

Instead of writing a routine, or a filter, etc., to validate FORM data, I can then blindy populate a bean and ask it if its valid!

Why's this nice? It allows me to use the same validation logic across all of the boundaries of my application - HTML UI, Web Services, or even a one-time CSV import script. Yippee!

Thanks to Rob Gonda for asking me a question via e-mail that led to this post!

6 comments - Posted by Joe Rinehart at 12:54 PM - Categories: ColdFusion MX

Jul 12 2005

Microsoft doesn't get "Refactoring"

Well, I just found out why Microsofts APIs have issues: they don't get the concept of refactoring. Or, at least, I assume they don't, because MS Word's spell checker doesn't think it's a word!

4 comments - Posted by Joe Rinehart at 7:47 AM - Categories: Off Topic

Jul 8 2005

Model-Glue "Bleeding Edge" Available

Over on the Model-Glue listserv (http://lists.topica.com/lists/modelglue), I'd talked about setting up a nightly build / bleeding edge site for Model-Glue. Well, you're now free to grab the latest code whenever you want: I've allowed read-only anonymous access to the Subversion (SVN) repository I'm using for Model-Glue.

Disclaimer: What's on the site is the _development_ code. That means I don't guarantee it'll run at all, much less that APIs in the framework won't change before the next release. Use stuff from this site for development purposes!

If you'd like to take a gander at the code, point your favorite SVN client (I like TortoiseSVN - http://tortoisesvn.tigris.org/) to:

svn://clearsoftware.net/clearsoftware.net

A quick explanation of the modules:

/clearsoftware.net - This is the new version of my site/blogging engine I'm slowly working on. The app that's in there is just an admin console. If you run it, it won't do much. However, the code may be of interest to folks building m-g applications.

/ModelGlue - Where MG code is stored

/ModelGlue/ModelGlue - The framework itself

/ModelGlue/ModelGlue Distribution Files - License, Readme, Etc

/ModelGlue/Documentation - Duh.

/ModelGlue/modelglueapplicationtemplate - The app template

/ModelGlue/modelgluesamples - The sample apps

4 comments - Posted by Joe Rinehart at 7:00 AM - Categories: Model-Glue

Jul 8 2005

Model-Glue @ WikiPedia

I got a fun e-mail this morning from Dave Shuck letting me know that someone's added Model-Glue to WikiPedia. It's at http://en.wikipedia.org/wiki/Model-Glue, and is linked to from the main ColdFusion page at http://en.wikipedia.org/wiki/ColdFusion.

1 comments - Posted by Joe Rinehart at 6:08 AM - Categories: Model-Glue

Jul 7 2005

London: "Particularly barbaric"

If you're like me, you probably check the blog aggregators before CNN. A series of explosions in the Underground and on double-deckers occured this morning in London, and have been attributed to terrorism. Blair calls them "particularly barbaric," and I thoroughly agree - attacking unsuspecting people on mass transit systems is a cowardly, shameful act.

2 comments - Posted by Joe Rinehart at 7:41 AM - Categories: Off Topic

Jul 6 2005

*hiccup*...Hello, CF7!

Sorry for the interruption, and thanks for the e-mails about my site being down - we've been (well, Doug has been) upgrading some things. I'm now running on CF7 in production, woohoo!

1 comments - Posted by Joe Rinehart at 10:45 PM - Categories: Site News