August 2007 Archives
August 30, 2007
I think ColdFusion 9 should be able to produce AIR applications.
Oh wait, I'm should probably preference this I love ColdFusion 8, and I think it's great and the CF team deserves a rest. I do, I do, and they do. I've been holding on to this idea ever since the Philadelphia stop of the AIR Bus tour, and if I don't get it out unfinished, I'll never get it out there.
Okay, so back to ColdFusion should be able to publish AIR applications.
ColdFusion is cursorily related to so many of the technologies that surround AIR. ColdFusion provides an easy webservice infrastructure you need to run remote Flex applications. These remote Flex applications can just as easily be AIR as Flex. ColdFusion 8 can now generate rich controlled HTML and JavaScript driven applications. Just like the kind of applications that can be packaged as AIR applications.
But the direct linkage between ColdFusion and AIR is missing. Its can help but only as an unglamorous background player. It shouldn't be, especially when it can produce so much of what AIR is made from.
I can envision setting something in Application.cfc like This.publishAsAir = TRUE. When the application url is browsed the ColdFusion server compiles all of the CF JavaScript libraries that are used in the application, and adds every page that is specified in another application.cfc setting, and builds it as an AIR file.
- How would this work with applications that aren't page based but url string based (like framework based applicaitons)? I have no idea.
- How would this deal with pages driven by database results? I have no idea.
- How would it hande all of the backend activity of tags like <cfmail> or <cfldap>? I have no idea.
- Would this be really hard to do? Probably, but have you seen what they've done with CF 8?
I'm thinking maybe there would be some way of limiting what gets created as the AIR components. Maybe you would have to wrap all of the application parts you wanted to use in a <cfair> tag, and it would prevent the calling of certain tags within it? I have no idea.
So am I nuts, or are the obstacles too high with this?
August 30, 2007 Posted by Terrence Ryan at 11:59 PM
Comments (8)
| TrackBack (0)
ColdFusion,
Web Development,
August 27, 2007
I found a new way to make your administrators life hell.
- Create an application mapping to a custom tags directory.
- Put a custom tag named "doSomething.cfm" in it.
- Create a ColdFusion page named doSomething.cfm in your application root.
- Call <cf_doSomething.cfm> in that page.
- Browse to that page.
- Watch your ColdFusion server die
I kinda feel like I shouldn't bother with a bug report because, well, it was a pretty stupid thing for me to do. And in fairness, it won't crash, it just can't do anything while it's processing that infinite loop.
August 27, 2007 Posted by Terrence Ryan at 9:03 AM
Comments (3)
| TrackBack (0)
ColdFusion,
Web Development,
August 26, 2007
I'm doing some serious thinking about the future of Squidhead, and I some stuff I wanted to run by the small but plucky group of Squidhead users that are out there.
It's gotten a little unwieldy to do updates for both a ColdFusion 7 and 8 version of the feature set. Additionally, the whole business objects and non-business objects version is also getting hard to support. Finally, there are a whole bunch of features I would like to support but require ColdFusion 8. So here is what I am proposing:
- Ceasing development of the current version of Squidhead.
- Starting a new development track that required ColdFusion 8 for application generation. (But then generated application could run on ColdFusion 7.)
- Dropping the non-business objects version of the code.
Once I did that, I could do the following:
- Switch database analysis over to use <cfdbinfo> for most, but not all of what I do.
- This would make adding support for other DBMS's easier
I'd be happy to hear any feedback you might have on these proposals. Assuming no one objects, I would publish one last version of the old code as 1.0, and then start pruning and working on what I would call version 2.0. (I would also come up with a more standard versioning system.)
August 26, 2007 Posted by Terrence Ryan at 11:36 PM
Comments (5)
| TrackBack (0)
ColdFusion,
Squidhead,
Web Development,
August 17, 2007
I ran into a little problem today, and haven't figured out a way around it yet.
I had a page that is slow but changes rarely, a textbook case for <cfcache>. So I added the caching statement, and ran it. It looked perfectly fine in Firefox. I went to look at it in IE 7, and the CSS was screwed up (supposed to be a centered aligned design, now all the way to the left).
I couldn't figure it out. I looked at the source code, no differences. Finally I ran a comparison on the two page sources, and discovered that <cfcache>seems to add a ColdFusion style comment containing the url of the page into source, above the doctype declaration. I couldn't see how that would cause the problem, so I submitted the source to the W3 Source validation service. It informed me that the comment style invalidates the page, because I was using XHTML 1.0 Strict.
As I see it, my workaround is to set the page to XHTML 1.0 Transitional, or stop using <cfcache> on this page.
August 17, 2007 Posted by Terrence Ryan at 12:16 PM
Comments (3)
| TrackBack (0)
ColdFusion,
Web Development,
August 16, 2007
I love the new Custom Tag Paths in Application.cfc feature of ColdFusion 8. In fact I love it so much I'm using it everywhere now. I did run into one problem though. I tried calling an application mapped custom tag from sub folder without its own Application.cfc. The custom tag call bombs. I added an application.cfc that extended the application's root application.cfc, and still no joy. I had to explicitly set the custom tag mapping in the child application.cfc to get it to work.
No big deal, but I figured I would share it.
August 16, 2007 Posted by Terrence Ryan at 11:51 AM
Comments (1)
| TrackBack (0)
ColdFusion,
Web Development,
August 14, 2007
I've been doing a fair amount of work with custom tags and JavaScript DOM manipulation. One of the things with which I've struggled with is organizing my code. Do I put the JavaScript in the custom tag? Do I put it in central .js files? What if the script I've written will only be called from one custom tag and one custom tag only?
Well I haven't worked out all of the answers, but I do have a solution for single use scripts: Use <cfhtmhead> to inject the script into the html header from the custom tag. It keeps all of the connected code together, but still does proper, degradable, properly-separated JavaScript and HTML.
Here's an example of this in use:
<cfsavecontent
variable="javascriptToInject">
<script
type="text/javascript"
language="javascript">
window.onload = focusForm;
function focusForm(){
if(document.getElementById("username")){
document.getElementById("username").focus();
}
}
</script>
</cfsavecontent>
<cfhtmlhead
text="#javascriptToInject#">
<cfoutput>
<form
action="https://#application.hostSecure##cgi.script_name#"
method="post">
<label
for="username">Username</label></dt>
<input
type="text"
id="username"
name="username"
/>
<label
for="password">Password</label></dt>
<input
type="password"
id="password"
name="password"
/>
<input
type="submit"
name="signin"
value="Sign In"/>
</form>
</cfoutput>
August 14, 2007 Posted by Terrence Ryan at 10:24 PM
Comments (2)
| TrackBack (0)
ColdFusion,
Web Development,