
November 30 2007 by

Andrew Powell
Those developing AIR applications in HTML/JavaScript know that the engine that enables these applications is WebKit. Apple has just released a CSS reference for Safari and WebKit. Since AIR is powered by WebKit, this, in turn, also applies to AIR Applications.
Explanation of Terms
Supported CSS Properties
Posted in Apple | General | Spry | Adobe | Universal Mind | JSON | Air | XML | AJAX |
1 comments

July 03 2007 by

Andrew Powell
I thought I had included my slides in the previous CFUnited post, but I guess I didn't. What can I say? It was a long week.
I have my own thoughts on CFUnited and how it went this year, but will save those for later until I've had time to fully process them and can articulate them in a plain and clear manner.
Posted in ColdFusion | General | Conferences | Spry | Adobe | JSON | XML | Speaking | AJAX |
0 comments

June 15 2007 by

Andrew Powell
OK, I just got done with the last day of Flex Training. The last topic we covered was E4X. I have to say, after drinking the JSON Kool-Aid, I'm still not convinced that XML is the way go.
Read more...
Posted in Flex | General | Adobe | JSON | Air | XML |
5 comments

May 23 2007 by

Andrew Powell
Ray and I were chatting about Spry autosuggests earlier today and were wondering if the autosuggest would work with a JSON dataset in lieu of a XML dataset. We figured there was no reason why it shouldn't, if it acts like a regular dataset. So I set off on a mission to figure out if it would work.
It does. With apologies to Ray, I borrowed the basis of his code to do my own autosuggest sample:
<link href="/assets/css/SpryAutoSuggest.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="/assets/js/spry/xpath.js"></script>
<script language="JavaScript" type="text/javascript" src="/assets/js/spry/SpryData.js"></script>
<script language="JavaScript" type="text/javascript" src="/assets/js/spry/SpryAutoSuggest.js"></script>
<script language="JavaScript" type="text/javascript" src="/assets/js/spry/SpryJSONDataSet.js"></script>
<script>
var dsTeams = new Spry.Data.JSONDataSet("getJSON.cfm");
</script>
<style>
.highlight {
background-color: yellow;
}
</style>
<div id="mySuggest">
Start typing a player's name to activate the autosuggest: <br/>
<input type="text" name="search" />
<div id="resultsDIV" spry:region="dsTeams">
<span spry:repeat="dsTeams" spry:suggest="{column0}">{column0}<br /></span>
</div>
</div>
<script type="text/javascript">
var theSuggest = new Spry.Widget.AutoSuggest("mySuggest","resultsDIV", "dsTeams","column0",
{hoverSuggestClass:'highlight',minCharsType:2,loadFromServer:true,urlParam:'input',containsString:false});
</script>
UPDATE:
Here is the code for the JSON Generator:
<cfparam name="input" default=""/>
<cfquery datasource="demos" name="players">
SELECT name FROM players WHERE name LIKE '#URL.INPUT#%' ORDER BY name
</cfquery>
<cfset jsonService = createObject('component','autoSuggestWithJSON.json')/>
<cfset retArray = arrayNew(1)>
<cfloop query="players">
<cfset arrayAppend(retArray,players.name)/>
</cfloop>
<cfcontent type="application/json">
<cfoutput>#jsonService.encode(retArray)#</cfoutput>
Working Sample
Posted in ColdFusion | Spry | Adobe | JSON | AJAX |
15 comments

May 09 2007 by

Andrew Powell
I got bit by this one late yesterday.
I was pounding my head against a wall about a problem I was having. A VO I was working with passed all it's unit tests. However there was combination of methods, when used, that were causing the VO to not function properly.
The root cause was that the values of the VO were being saved in a cookie and the cookie was getting too big. Hence CF chokes on it and it the operation fails. (The data was being stored as XML. Changed it to JSON and we save tons of space, but that's another story.)
The point, however, was this: Just because an element passes your unit tests does not assure you that it will pass integration testing. There are always variables outside of your unit tests that you cannot count on.
Posted in ColdFusion | General | Test-Driven Development | JSON | XML |
1 comments