I know what you're saying: "please, not more whining." Well
rest assured that this isn't that kind of a post. Yes, I ran into
some more problems with BD's compatibility with CFMX last night, but
I'm not bitter, I swear. I took an app that I'd written for BD
and was moving it to CF7 this evening and found four distinct bugs in
BD that gave me grief. It's worth mentioning that I'm running BD
6,2,0,226.2.28, which I believe to be a 6.2 release candidate, not the
final version, but I'm not 100% sure of that.
1) BD doesn't care if your 'var' declared local variables are at the top of a function or not, while CFMX does.
2) BD considers assignment to be an expression, while CFMX doesn't. In BD <cfreturn s = s & "text" /> is legal.
3)
BD processes CFLOGIN-based security stuff (at least when the
loginstorage is set to session) for all requests in a session that have
be logged in with CFLOGINUSER, regardless of whether CFLOGIN is
actually on every page. In other words, on CFMX you have to have
CFLOGIN run on every page to use the cflogin framework, while on BD you
just have to have it run once per session. Personally, I like
BD's interpretation, but all it takes is adding a self-closed CFLOGIN
tag right after your CFAPPLICATION tag to make it work on CFMX.
4)
BD doesn't seem to validate return types on CFFUNCTION quite all the
way. I had a function with a numeric returnttype that returned
the result of a SELECT MAX(...) ... query, and when no rows were found,
the result of the MAX call is obviously null, which isn't numeric (and
yes, I'm going to restrain myself from that rant ;). BD happily
let me return null from the method, but CFMX errored. Perhaps
because BD actually recognized the null for what it is, and let it pass
the test?
I also ran into
some issues using JS remoting (via Neuromancer) against a CFC-based web
service. I had a lot of issues with getting that all working on
BD when I first wrote the app, so I suspect I ended up implementing
some stuff that wasn't quite CFMX-compatible, but I can't say that with
conviction, so I left it off the list of definite bugs. The fix
was simple to make, so I'm not going to worry about it.
So there they are, four (and a half) points to watch out for when
moving from BD to CFMX. As I said above, I'm not bitter, because
in every case the issue arose because I made an honest mistake in
coding, and BD did what I meant without
throwing an error. Of course, in every case, BD was incompatible
with CFMX, but I'm going to put that behind me. So if you're
developing on BD and planning to deploy to CFMX, watch out for these
gotchas. Catching them as you code isn't a big deal, but having
to sweep an app for this type of stuff at deploy-time would be a bear,
especially if it's large. The first two are compile-time errors,
so they'll be caught easily, the third will be apparent as soon as you
try to log in, but the fourth will require careful unit testing to
catch, because it's a data-dependant runtime bug.