CFML is a tag based language. When tags need arguments or options passed to them, they are passed as attributes. This is an integral part of what makes CFML so easy and so productive. But sometimes, having to pass attributes can be a hindrance. Consider a simple example, a
...
...
It’s just an example, but it’s not pretty at all. And this same is true if you conditionally want to add query caching, or specify an SMTP server in
Scorpio solves this problem in the simple and elegant fashion we’ve come to expect from ColdFusion. In Scorpio you can pass all tag attributes as a single structure, an ARGUMENTSCOLLECTION. Here is a simple
...
As structure members can be added conditionally, passing optional attributes becomes a simple matter of conditionally adding members, as seen here:
...
This new syntax can be used by all sorts of tags, including
Leave a Reply