CFJS 1.1.12

This release contains a small change to the DateFormat() function.

[More]

CFJS 1.1.11 (Bug Fix Release)

Just a quick note to let folks know that all branches of CFJS (both jQuery and non-jQuery) have been updated with a bug fix for two of the list functions, namely ListContains() and ListContainsNoCase().

[More]

CFJS Revisited (update)

I've successfully added HTMLCodeFormat() and HTMLEditFormat() functions to CFJS and have checked the new code into the repository as version 1.1.10.

But I've got more to do. Looking through some old notes, I found that I still needed to add the following:

  • NumberFormat()
  • ArrayAverage()
  • ArrayClear()
  • ArrayDeleteAt()
  • ArrayInsertAt()

I will of course, still be working on a demo page as well.

[More]

Open BlueDragon Has Been Released!

As of May 3rd, Open BlueDragon has finally been released into the wild, and is available in a variety of formats from their download page. Two versions are available now, and others are coming soon!

Open BlueDragon J2EE WAR Distribution 11 MB
Open BlueDragon Preconfiged Jetty Instance (Ready2Run) 24 MB
Open BlueDragon Preconfiged Amazon EC2 image (Ready2Run) coming soon
Open BlueDragon Preconfiged VMWare image (Ready2Run) coming soon

Let's start putting this thing to some good use! And when you've got a site running on OpenBD be sure to tell everyone on the OpenBD mailing list!

New Atlanta to Open-Source Java Version of BlueDragon

I caught this on CF-Talk today, and immediately jumped over to the New Atlanta press release on the subject.

Vince Bonfanti, President of New Atlanta said, "This announcement is in direct response to community and customer feedback, who've seen most other web-scripting languages like JSP, PHP and ASP become commoditized as part of a free and/or open-source portion of various web application stacks."

This is very encouraging! One thing that I really, really dig about the developers of the various CFML engines out there: They listen to their users! And they don't just listen, but take action based upon what we've told them that we want.

According to the FAQ the open source version of BlueDragon will be "...nearly identical to the current commercial Java EE version of BlueDragon..." minus a few third-party commercial technologies which they cannot include. New Atlanta says that these differences will be minor [emphasis added] and will be "clearly published."

Also, according to the FAQ this new open source edition of BlueDragon will be released under the GNU General Public License Version 2 (GPLv2), just like MySQL and other popular open source projects.

I for one, am seriously pumped about this announcement! The small company I work for only uses ColdFusion on our really big projects and even then my boss doesn't like spending the money on it -- but that's his issue. For all of our smaller one-off projects I've been forced to learn a bit of PHP to work on those, and while I'm not afraid of working in PHP, I'm definitely more comfortable in CFML if only for the fact that I rarely have to look anything up! That's all just a matter of how familiar I am with the language, but I still think working with queries in PHP (without any frameworks like Cake and the like) is damn stupid. I just dislike the way they work. I spent almost a half a day once just trying to figure out how sessions worked in PHP! It would have been a lot easier if they had something like application.cfm or application.cfc.

Okay, so this wasn't meant to turn into a tirade on my dislike of PHP, but it's very nice to see a heavy hitter like New Atlanta stepping up and open sourcing their CFML engine.

Let's make sure everyone and their dog knows about this! Let's get some link love happening!

http://www.dzone.com/links/open_source_cfml_engine_on_the_way.html

http://digg.com/software/New_Atlanta_announces_free_open_source_BlueDragon_edition

Adobe releases security patch for ColdFusion

Hi folks,

Rey Bango just passed along a link to this blog entry of Phill Nacelli's about a security problem in CF7 and CF8. It looks a bit old (November 14, 2007), but I'd never heard of it. Oops!

So, I thought I'd pass along the word in case I'm not the only one who'd never heard of this problem.

Here's Adobe's summary of the problem:

"An error in ColdFusion MX7 and ColdFusion 8 applications could allow an attacker to hijack user sessions. This issue does not apply to customers using J2EE session management."

Here's a link to more information about this problem and how you can make sure that your server is updated. http://www.adobe.com/support/security/bulletins/apsb07-19.html

Simple ColdFusion 8 PDF Inspector

Hi folks,

I'm working on a project where I programmatically fill in government PDF forms. In today's case -- Lien Applications.

Well, the first thing I've got to know about the PDF file is:

  1. Is it really an interactive form? (if it's not I'll have to try and add form fields by hand with Adobe Acrobat Pro)
  2. If it's already an interactive form, then what's the structure of that form, and what are the names of the form fields?

The client I'm doing this for has stores in nine different states, so that's nine different versions of basically the same form -- but every state is a little different. At first I wrote a really quick and very specific CF program to give me this information. But now that I'm on my second and third form I decided that I'd rather spend a few minutes building a tool which would accept a path to my PDF and upon clicking a button give me the information I needed.

So that's what I did. And here's the code. Improvements could probably be made, and if you like, you're completely welcome to do so. But what's here works perfectly for my purposes.

[More]

jQuery + AjaxCFC Tutorial Part 3: Debugging

If there's one thing that's for certain it's that Ajax is very cool stuff, and everyone it seems is using it. It allows us as developers to provide for that slick desktop app sort of feel inside of a browser.

On the other hand: debugging ajax calls can be a serious pain in the butt! There are tools out there to help us though: Fiddler, FireBug, GreaseMonkey, Venkmen, etc. and those are fine, but Rob Gonda has provided us ColdFusion programmers with even more functionality when it comes to debugging our XMLHttpRequest calls.

[More]

jQuery + AjaxCFC Tutorial Part 2: Handling Complex Data

Okay. It's late. Really late. But, I'm back -- I know you're thinkin' who the heck are you? -- and part two of my jQuery + AjaxCFC tutorial is finally here. I've been stressing over not having finished this sooner, but I hope some folks will still find it useful.

[More]

Win a free license for ColdFusion 8!

Kalendar is a cool calender framework written using a custom tag and some CFCs. The Kalendar team is running a design contest for this sweet little open source app.

If the UI you design is deemed the best one, you'll win yourself a brand-spankin'-new license to ColdFusion 8 (standard edition).

Details on the contest can be found on TJ Downes' blog.

If only my css skills were up there with the big boys, I'd give it a shot... oh, and there's a matter of having the time ;o)

Good luck to all who enter!

Cheers!

jQuery + AjaxCFC Tutorial Part 1: Erratum 1

In part one of this tutorial series I noted the mechanism by which I enable/disable log4javascript using the CF variable 'JSIncludeList' along with a boolean 'ShowLog4JS'.

<CFSet ShowLog4JS = false>
<CFSet JSIncludeList = "">
<CFIf ShowLog4JS>
    <CFSet JSIncludeList = ListAppend(JSIncludeList, "log4j")>
</CFIf>

I also made mention of the following helper functions:

$.AjaxCFCHelper.setDebug(false);
$.AjaxCFCHelper.setBlockUI(true);
$.AjaxCFCHelper.setUseDefaultErrorHandler(true);
$.AjaxCFCHelper.setSerialization('json'); // json, wddx

I have to admit that I'd not used any of these functions before, but I wanted to at least make everyone aware of their existance. Well, I used the first one on the above list today while helping a friend to debug some code. It turns out that

$.AjaxCFCHelper.setDebug(true);

turns on log4javascript! So, basically I reinvented the wheel, and Rob already had us covered with a mechanism to turn on and off log4javascript.

If I learn anything new between now and when I finally get part two of this tutorial written (probably this weekend), I'll be sure to post another quick errata.

Cheers!

jQuery + AjaxCFC Tutorial Part 1: Setting Up Your AJAX Call

I've recently received a couple of emails from individuals on different mailing lists asking for help using Rob Gonda's AjaxCFC with jQuery. More specifically, what to do with complex data (i.e. a CF query object) once it's come back from the ajax call.

In the case of both the emails I received asking for help, the writers wanted to know (in general) how to update an on-screen table with new records based on the data returned from their AjaxCFC call.

It sounds like a bit of a tutorial is in order, and since I couldn't easily find one on the net, I thought I'd better write one.

[More]

Comming Soon!

I've been stupid busy at work recently writing code for two client's both of which have deadlines that need to be met, changes to be made, bugs that need fixing... you probably know the drill.

On top of that I've recently been diagnosed with high blood pressure, high cholesterol, and diabetes! Sucks to be me, huh? Anyway, the upshot is that I've really not had a lot of time to do all the things that I want to do for the CFJS project. I'm also writing a tutorial about using Rob Gonda's AjaxCFC with jQuery that I promised a few folks I'd get published soon.

So today I received an email from Trent Richardson not only offering to help with the CFJS project, but he put his money where his mouth was... or his code where his mouth was... or something, and wrote the IsValid() function that he was suggesting be added to the library! How cool is that!

This is my first open source project, so it's super cool to me that a) people are using it and b) that someone is willing to help the cause! I'm stoked. Thanks Trent!

Anyway (@Neil), I'm going to try to finish the tutorial and my goal is to get it up tonight. Things have finally calmed down a little with my clients, so hopefully I'll be able to get some work done on these projects (as well as fit in a movie or two ;o).

BTW: I just saw the Transformers movie tonight. It was awesome! And (as the folks in Hollywood are apt to do) they totally left it open for an other movie.

CFJS Ver. 1.1.6 Released

While I'm still struggling to find the time to work on new features for the CFJS libraries (IsValid, ArrayAverage, ArrayClear, ArrayDeleteAt, ArrayInsertAt, ArrayPrepend, and ArraySum), a bug in the DateFormat function had been brought to my attention by user Boyan Kostadinov. He then later pointed me to another DateFormat function written by Steve Levithan.

Steve's DateFormat function is very nice, and since Steve does some ColdFusion programming the syntax is very similar. Steve implemented his function as an extension of the JavaScript date object, but since I've incorporated his function into both branches of the CFJS library this is no longer the case. So the CFJS syntax of the function follows more closely to the syntax of CF's native function.

In Steve's implementation you could write a line of code like this:

date.format("Today is dddd");

Which should return something like, "Today is Thursday". But when using the CFJS implementation to get the same result you'd need to write it like this:

/*using CFJS for jQuery*/
$.DateFormat(new Date(), "Today is dddd");

/*using CFJS without jQuery*/
CFSJ.DateFormat(new Date(), "Today is dddd");

Following is a table of the different metacharacters available to the DateFormat function. (This table is almost a direct rip from Steve's blog post which discusses his function)

MaskDescription
d Day of the month as digits; no leading zero for single-digit days.
dd Day of the month as digits; leading zero for single-digit days.
dddDay of the week as a three-letter abbreviation.
dddd Day of the week as its full name.
m Month as digits; no leading zero for single-digit months.
mm Month as digits; leading zero for single-digit months.
mmm Month as a three-letter abbreviation.
mmmm Month as its full name.
yy Year as last two digits; leading zero for years less than 10.
yyyyYear represented by four digits.
h Hours; no leading zero for single-digit hours (12-hour clock).
hh Hours; leading zero for single-digit hours (12-hour clock).
H Hours; no leading zero for single-digit hours (24-hour clock).
HH Hours; leading zero for single-digit hours (24-hour clock).
M Minutes; no leading zero for single-digit minutes.
Unlike CF we use an uppercase M to avoid conflict with months.
MM Minutes; leading zero for single-digit minutes.
Unlike CF we use an uppercase MM to avoid conflict with months.
s Seconds; no leading zero for single-digit seconds.
ssSeconds; leading zero for single-digit seconds.
l or L Milliseconds. l gives 3 digits. L gives 2 digits.
t Lowercase time marker string: a or p.
No equivalent metasequence in CF.
tt Lowercase time marker string: am or pm.
No equivalent metasequence in CF.
T Uppercase time marker string: A or P.
This is equivlant to CF's t metacharacter.
TT Uppercase time marker string: AM or PM.
This is equivlant to CF's tt metacharacter.
Z Timezone abbreviation; e.g., EST, MDT
No eqivalent metacharacter in CF.
'…' or "…" Literal character sequence. Surrounding quotes are removed. Not necessary when using mask characters as part of larger words.
CF only supports single quotes for literal spans.

The most notable differences are that I've added the 't' and 'T' metacharacters to the function. While, Steve's function allowed for 'AM' or 'am' with TT and tt respectively, he did not allow for 'A' or 'a' which is what 'T' and 't' are used for.

The other major thing to note (if you haven't already) is that this new DateFormat function also handles the formatting of time. This means that there really isn't a reason to have a TimeFormat function. However, since this breaks with CF's dogma, I've written TimeFormat such that it's really just an alias of DateFormat. Someone might use DateFormat() for all their date formatting needs and TimeFormat() for all their time formatting needs, but in reality the two functions work interchangeably.

The nice thing about having one function that handles both date and time formatting is that it replaces two other functions that were quite long, and so the overall size of CFJS just went down by a bit. :o)

CFJS: IsValid()

A request was made for a reproduction of the IsValid() function to be added to CFJS, and after taking a cursory glance at the doc page for this function, I've decided that I'll probably be releasing this function in stages. There are lots of validation types. Some, I know exactly how to accomplish, other's either might take a little more time or just don't seem to make sense in the context of JavaScript (like query and veriableName). Below is the list of types from the livedocs page on IsValid(). I've starred the ones I figure I can do pretty easily. I'd like opinions on the validation types that people would like first. Of course, I'll try to get as many of them in the first release as I can.

Type Description
any any simple value. Returns false for complex values, such as query objects;; equivalent to the IsSimpleValue function.
array an ColdFusion array; equivalent to the IsArray function.
binary a binary value;; equivalent to the IsBinary function.
boolean a Boolean value: yes, no, true, false, or a number; equivalent to the IsBoolean function.
component a ColdFusion component (CFC).
creditcard a 13-16 digit number conforming to the mod10 algorithm.
date or time any date-time value, including dates or times;; equivalent to the IsDate function.
email a valid email address.
eurodate any date-time value, including US date formats and time values.
float or numeric a numeric value; equivalent to the IsNumeric function.
guid a Universally Unique Identifier of the form "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" where 'X' is a hexadecimal number.
integer an integer.
query a query object; equivalent to the IsQuery function.
range a numeric range, specified by the min and max attributes.
regex or regular_expression matches input against pattern attribute.
ssn or social_security_number A U.S. social security number.
string a string value, including single characters and numbers.
struct a structure; equivalent to the IsStruct function.
telephone a standard US telephone number.
URL an http, https, ftp, file, mailto, or news URL.
UUID a ColdFusion Universally Unique Identifier, formatted 'XXXXXXXX-XXXX-XXXX-XXXXXXXXXXXXXXX', where 'X' is a hexadecimal number. See CreateUUID.
USdate a U.S. date of the format mm/dd/yy, with 1-2 digit days and months, 1-4 digit years.
variableName a string formatted according to ColdFusion variable naming conventions.
zipcode U.S., 5- or 9-digit format ZIP codes.


More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.4.001. Contact Blog Owner