<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cranky Bit &#187; IT Industry</title>
	<atom:link href="http://blog.crankybit.com/tags/it/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.crankybit.com</link>
	<description>Take a byte out of tech!</description>
	<lastBuildDate>Wed, 09 Mar 2011 17:23:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Notes: Improved Flash Remoting and Adobe AIR Integration in ColdFusion 9</title>
		<link>http://blog.crankybit.com/notes-max09-improved-flash-remoting-and-air-in-cf9/</link>
		<comments>http://blog.crankybit.com/notes-max09-improved-flash-remoting-and-air-in-cf9/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 00:57:25 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MAX2009]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=334</guid>
		<description><![CDATA[These notes are taken at Adobe MAX 2009. You can use HTTPService, WebService, RemoteObject components in Flex to pull data in different ways. Now what about ColdFusion 9? ColdFusion&#8217;s Flash Remoting has been improved. So Flash applications that have ColdFusion 9 as a backend will interact much faster, and it can handle circular references. There [...]]]></description>
			<content:encoded><![CDATA[<p>These notes are taken at Adobe MAX 2009.</p>
<p>You can use HTTPService, WebService, RemoteObject components in Flex to pull data in different ways. Now what about ColdFusion 9?</p>
<p>ColdFusion&#8217;s Flash Remoting has been improved. So Flash applications that have ColdFusion 9 as a backend will interact much faster, and it can handle circular references.</p>
<p>There is now direct data translation between ActionScript and CF types, instead of previously having an intermediate Java layer that handled this. This involves changes in services-config.xml, but no code changes are required in your apps. Support for the old style remoting is still present for backward compatibility.</p>
<p>So how much faster is it? Drastically faster. Easily x9 faster, and that increases as the number of transactions occurs, according to the whitepaper Adobe has released about it.</p>
<p><strong>BlazeDS.</strong> ColdFusion 9 is now integrated with BlazeDS as the default installation.</p>
<p><strong>Configuration File.</strong> Services-Config.xml is now split into 4 files. There are a handful of ColdFusion-specific properties under the channel definition now. An &#8220;enable-small-messages&#8221; property is there and should be set to &#8220;false&#8221;. This is important for the new Flash Remoting in CF9, because BlazeDS&#8217;s default is &#8220;true&#8221;. </p>
<p>There is an AMFChannel component in Flex for the new Flash Remoting (Note: You can alternatively tell the AMFChannel component to have enableSmallMessages=&#8221;false&#8221;). Finally, the endpoint class is changed for the new CF9 one.</p>
<p><strong>Offline AIR apps with ColdFusion 9</strong></p>
<p>Now the fun stuff. ColdFusion 9 has an ORM for AIR! Build offline AIR apps without the SQL mess and conflict handling. There is a CF-AIR persistent framework for SQLite on the client side. CF keeps track of all updates to local database and synchronizes with the server, including conflict resolution.</p>
<p>By having ORM on the client- and server-side, these two are integrated through the CF-AIR persistent framework.</p>
<p>In the application code for the demo, there were customer.cfc and address.cfc persistent objects. Then a sync CFC is used for providing the fetch and sync functions for communication with the AIR client.</p>
<p>Step #1: Create the persistent CFCs.</p>
<p>Step #2: Create the sync CFC. He called it custmgr.cfc. The CFC has implements=&#8221;ISyncManager&#8221; as an attribute. Then you have fetch() and sync() methods that handle the transactions. Here you can provide your logic for handling certain scenarios, such as conflicts.</p>
<p>Step #3: On client side, create equivalent AS classes that map to the CFC via the [RemoteClass(alias="")] metadata tag.</p>
<p>Step #4: Use the CF-built AIR libraries provided to fetch data from server, with the SyncManager component. It&#8217;s very simple, practically just point it to the sync CFC and do a fetch() method. To work with the database, you then openSession() and can create new AS objects and call save() on the session to insert/update/etc.  Finally, using commit() will commit the results and invoke the sync() process.</p>
<p>On the client side, it can receive conflict notification and receive both versions of the data so that you can decide what to do with the conflict.</p>
<p>It is very exciting to have some help implementing synchronization without having to purchase LCDS. Using the CF9/AIR integration libraries will be very nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-max09-improved-flash-remoting-and-air-in-cf9/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Notes: Advanced ORM in ColdFusion 9</title>
		<link>http://blog.crankybit.com/notes-max09-advanced-orm-cf9/</link>
		<comments>http://blog.crankybit.com/notes-max09-advanced-orm-cf9/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 23:30:55 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MAX2009]]></category>
		<category><![CDATA[ORM]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=333</guid>
		<description><![CDATA[These are notes from Adobe MAX 2009 about advanced ORM in ColdFusion 9. Join Mapping. You can have a CFC whose primary table is &#8220;Person&#8221;, but it has properties that fetch values from a joined table, such as the &#8220;City&#8221; property from an &#8220;Address&#8221; table. Interesting. ORM Initialization. When application first starts, it looks to [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from Adobe MAX 2009 about advanced ORM in ColdFusion 9.</p>
<p><strong>Join Mapping.</strong> You can have a CFC whose primary table is &#8220;Person&#8221;, but it has properties that fetch values from a joined table, such as the &#8220;City&#8221; property from an &#8220;Address&#8221; table. Interesting.</p>
<p><strong>ORM Initialization.</strong> When application first starts, it looks to see if ORM is enabled. If so, it creates/loads the Hibernate configuration, the loads Hibernate mapping files, searches for persistent CFCs (you can point it at only a particular directory to speed things up), generate Hibernate mapping for persistent CFCs, then even generate the schema on the database if it doesn&#8217;t exist, and then finally build the Hibernate Session Factory. Once this is done, it will not occur again unless you tell it to, because this initial setup is an expensive operation. You can use ormReload() to force it.</p>
<p><strong>ORM Session.</strong> All ORM operations happen in the session. It provides some simple caching. The session tracks changes made to the objects. So it doesn&#8217;t actually execute SQL until a session is flushed, which happens when the request completes or when you force it with ormFlush().</p>
<p>When using CFTRANSACTION, the Hibernate session will be flushed and closed at the end of your CFTRANSACTION.</p>
<p><strong>Object States.</strong> When you create an object with EntityNew(), CreateObject(), etc, the object is transient and is not known by Hibernate yet. Once an object is saved or loaded, it is in a persistent state. The kicker is &#8220;detached&#8221; objects. If the Hibernate session ends, and object that you have will become &#8220;detached&#8221; since the session ended. So if you have lazy loading for your object, for instance, it will throw an error because Hibernate has nowhere to lazy load the object&#8217;s data. However, you can use EntityMerge() or redo an EntityLoad() to bring it back into a persistent state.</p>
<p><strong>Concurrency Control.</strong> You can use the &#8220;optimisticlock&#8221; attribute of a CFC to &#8220;All&#8221;, &#8220;Dirty&#8221;, &#8220;Version&#8221;, or &#8220;None&#8221; to control how record updates occur. &#8220;Version&#8221; is the default which uses a timestamp to check the version of the record vs. the object. &#8220;All&#8221; does a where statement of all record fields, and &#8220;Dirty&#8221; only handles the changed fields.</p>
<p><strong>Fetching strategy.</strong> How will you fetch relationships of tables? &#8220;Immediate&#8221;, &#8220;Lazy&#8221;, &#8220;Eager&#8221;, or &#8220;Batch&#8221; fetching. &#8220;Immediate&#8221; fetches everything immediately. The default &#8220;Lazy&#8221; fetches things on demand. &#8220;Eager&#8221; fetching fetches everything in a single SQL statement, good for frequently used one-to-one relationships. There was a bit of confusion in regard to &#8220;Batch&#8221; fetching.</p>
<p><strong>Caching.</strong> Session-level cache fetches data the first time and will not reload subsequent requests. EntityReload() will force a reload. Secondary-level cache can cache data across Hibernate sessions. It can be in-memory, disk, clustered. They have the default caching engine as EHCache.</p>
<p>How to use secondary cache? Enable it first. In application.cfc, use ormsettings.secondarycacheenabled=&#8221;true&#8221;. Then in your ORM CFC, the cacheuse=&#8221;" attribute defines the caching strategy (such as &#8220;read-only&#8221;, the most performant), and cachename=&#8221;" defines the name of this specific cache.</p>
<p>Secondary cache can also be used on relationships. And when using ormExecuteQuery() functions to use HQL to query the database, you can cache as well with cacheable=&#8221;true&#8221; as one of the options. This can be used in EntityLoad() too.</p>
<p>When cleaning up caches, there are ormEvictXXX() functions to remove entities, collections, and queries.</p>
<p><strong>Event Handling.</strong> Hibernate lets you set ormsettings.eventhandling=&#8221;true&#8221; to have many CFC level events, like preLoad(), postLoad(), preInsert(), postInsert(), preLoad(), postLoad(), etc. This can be used for logging or other nifty features. Wow! That&#8217;s awesome. Nice hooks.</p>
<p><strong>Interesting user questions.</strong> One gentleman asked about using an XML file as a datasource through Hibernate. That would be interesting to try/use.</p>
<p>This session could have been 90 minutes. There are a lot of advanced things that can be done with the ColdFusion integration with Hibernate from the ColdFusion API.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-max09-advanced-orm-cf9/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Notes: Managing, Monitoring, and Upgrading Your ColdFusion Servers</title>
		<link>http://blog.crankybit.com/notes-max09-managing-monitoring-upgrading-cf-servers/</link>
		<comments>http://blog.crankybit.com/notes-max09-managing-monitoring-upgrading-cf-servers/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 22:13:23 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MAX2009]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=332</guid>
		<description><![CDATA[These are notes from Adobe MAX 2009. This is what is new in ColdFusion Administrator for ColdFusion 9. Mail. You can sign mail with a keystore. You can view undeliverable email by clicking a button instead of browsing to the directory on the server. Document. You can configure ColdFusion to point to an OpenOffice installation [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from Adobe MAX 2009. This is what is new in ColdFusion Administrator for ColdFusion 9.</p>
<p><strong>Mail.</strong> You can sign mail with a keystore. You can view undeliverable email by clicking a button instead of browsing to the directory on the server.</p>
<p><strong>Document.</strong> You can configure ColdFusion to point to an OpenOffice installation on the server. This is necessary for a lot of the document integration features in ColdFusion.</p>
<p><strong>Data Collections.</strong> You can now have Verity <em>or</em> Solr collections. You can configure Solr in the Administrator. So ColdFusion 9 includes both Verity and Solr.</p>
<p><strong>Security.</strong> Since there are ColdFusion services (CFaaS) now, you can configure which IP addresses may use your server for these services.</p>
<p><strong>Server Monitor.</strong> The server monitor allows you to see how the server is using memory, which templates are running slow, the database pooling, how are template and database queries running, etc. </p>
<p><strong>Server Manager.</strong> A basic AIR app that provides a way to perform administrative functions on ColdFusion server(s). It provides a nice way to manage multiple servers at once. At the CF Unconference, this became a topic of light debate on Wednesday at lunch, because there are typical 1.0 weaknesses in the interface of the server manager that make it a little bit of a pain to use. But it is a great start, and hopefully the next iteration will be a little more fine-tuned.</p>
<p><strong>Migrating to CF9.</strong> Beware using these keywords: interface, pageencoding, finally, import, local. These are new CF9 keywords that will cause a conflict if your code was using them. BlazeDS now ships out of the box with CF9, which is great. LCDS Express Edition is no longer supported. It is recommended to upgrade from Verity to Solr. To do this, you&#8217;ll need to add engine=&#8221;solr&#8221; in your CFCOLLECTION tags. What&#8217;s more, the CFSEARCH tag will need some slight syntax changes when migrating to Solr! Ugh.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-max09-managing-monitoring-upgrading-cf-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes: Migrating from Flex 3 to Flex 4</title>
		<link>http://blog.crankybit.com/notes-migrating-from-flex-3-to-flex-4/</link>
		<comments>http://blog.crankybit.com/notes-migrating-from-flex-3-to-flex-4/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 18:57:16 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MAX2009]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=331</guid>
		<description><![CDATA[These are notes from Adobe MAX 2009. This session will help us see what problems we may encounter moving to Flex 4, as well as what new features we can use. Packages. The old mx packages are still there. But now everything new is in the spark packages. Why two different packages? At first, they [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from Adobe MAX 2009. This session will help us see what problems we may encounter moving to Flex 4, as well as what new features we can use.</p>
<p><strong>Packages.</strong> The old mx packages are still there. But now everything new is in the spark packages. Why two different packages? At first, they had them all in the same package, but the component had a prefix for the new version. It wasn&#8217;t received well. So instead, Adobe just put the new components in new namespaces.</p>
<p>The MX namespace is also called &#8220;Halo&#8221;. Don&#8217;t consider it a &#8220;legacy&#8221; namespace. These are still fully supported. Spark is all of the new stuff. The general MXML has a new 2009 namespace, but the legacy namespace is still supported.</p>
<p><strong>Graphics</strong></p>
<p>You can add graphic primitives enabling you to draw lines, ellipses, and curves, directly within the MXML. With the new FXG file format, you can import a graphic in as a vector graphic that appears as code. Cool. Using a static FXG image is great for icons or other static simple images, because its rendering is faster than an MXML graphic container.</p>
<p><strong>Flex States</strong></p>
<p>Instead of using AddChild and RemoveChild for changing states, you have includeIn=&#8221;" and excludeIn=&#8221;" attributes that go directly on components. What&#8217;s more, you can set various attributes of a component for the different states by using a dot notation. For instance, title.mystate=&#8221;Title&#8221;. This seems like a pretty drastic change.</p>
<p>With states, you have to use the OLD way with the 2006 namespace, and you have to use the NEW way with the 2009 namespace.</p>
<p><strong>Skinning</strong></p>
<p>Components all have separate skin files. This will allow you to create a custom skin for any component easily.</p>
<p><strong>Common migration issues</strong></p>
<p>Type selectors need namespaces now in your Flex CSS. For instance, if you&#8217;re styling a button, Flex doesn&#8217;t know if it is a Spark button or a Halo button. So you need to define the namespace in your stylesheet and update your selectors accordingly.</p>
<p>You must compile against Flash Player 10. This won&#8217;t be an issue if you use Flash Builder 4 with Flex 4.</p>
<p>Application.application should now be renamed to FlexGlobals.topLevelApplication. Just a direct rename.</p>
<p>RSLs are on by default.</p>
<p>The &#8220;Declarations&#8221; tag is a problem child. In Flex 4, anything that is not a display object or default property must be within the fx:Declarations tag. Even tags like RadioButtonGroup. Formatters, Effects, RPC stuff, Validators, etc. need to go in the Declarations.</p>
<p>&#8220;If Looks Could Kill.&#8221; The default theme is now Spark, which looks different than the old Halo theme. You can switch back to the Halo theme. To do so, turn on &#8220;Use Flex 3 compatibility mode&#8221; in the project properties, or go into the &#8220;Flex Theme&#8221; panel and change the theme (this is the preferred way).</p>
<p>If moving to Flex 4, try to use as many Spark components as you can. They <em>should</em> play nicely with MX components. You can intermix them together. Caveats: (1) The graphic primitives cannot go in an MX component, just wrap them with a group; (2) you cannot put MX components in Spark containers; (3) MX effects do not work on Spark graphic primitives; (4) MX navigators (ViewStack, Accordion, etc) should use NavigatorContent component.</p>
<p>Other things to watch out for:</p>
<ul>
<li>Spark components don&#8217;t support the Halo theme.</li>
<li>Cannot create spark component based itemRenderers for MX List based components</li>
<li>APIs between MX and Spark components are different (e.g. addChild vs. addElement)!</li>
<li>When using MX and Spark components together, you may see a text difference since they are themed differently. There is a TLFText theme that can help with this.</li>
</ul>
<p>So, migrating an app from Flex 3 to Flex 4 is a bit of a slippery slope. And even just beginning to use Flex 4 with current Flex 3 knowledge will require a bit of a slowdown as you undo some of those brain synapses to do things the new Flex 4 way. But these changes going forward are good for the Flex framework.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-migrating-from-flex-3-to-flex-4/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Notes: What&#8217;s New in ColdFusion 9</title>
		<link>http://blog.crankybit.com/notes-max09-whats-new-in-coldfusion-9/</link>
		<comments>http://blog.crankybit.com/notes-max09-whats-new-in-coldfusion-9/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 17:36:30 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MAX2009]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=330</guid>
		<description><![CDATA[These are notes from Adobe MAX 2009. The talk was given by Adam Lehman. First, ColdFusion 9 also introduces the new ColdFusion Builder product, an Eclipse-based IDE &#8220;to rule them all&#8221;. Because it is based on Eclipse, you can also combine other products, like Flash Builder, so that one IDE gets the job done for [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from Adobe MAX 2009. The talk was given by Adam Lehman.</p>
<p>First, ColdFusion 9 also introduces the new <strong>ColdFusion Builder</strong> product, an Eclipse-based IDE &#8220;to rule them all&#8221;. Because it is based on Eclipse, you can also combine other products, like Flash Builder, so that one IDE gets the job done for everything, whether it is HTML, CFML, JS, Flex, ActionScript, CSS, etc.</p>
<p>ColdFusion Builder also supports some interesting server integration features. You can access ColdFusion Administrator and other functionality right from ColdFusion Builder; you can see and browse all of the databases that ColdFusion has datasources for. With such functionality, you can do cool stuff like auto-generate ORM-based CFCs by pointing it to an existing database table! Now, it doesn&#8217;t generate <em>just</em> the bean CFC. It generates the entire service layer: DAO and Gateway beans as well!! Now, this obviously is just a starter step. It&#8217;s expected that you&#8217;d tweak it from that point. With the Flash Builder integration, you can take this to the next step by also generating ActionScript objects to help with Flex integration as well.</p>
<p><strong>CFML Enhancements</strong></p>
<p>Well, in CF7, they introduced Application.cfc that supported hooks for application events. But now in CF9, there is a Server.cfc with an onServerStart() method for handling that event.</p>
<p>Various other holes have been filled. You can now have nested CFTRANSACTION tags. Error catching now supports &#8220;finally&#8221;. And looping now supports CFCONTINUE.</p>
<p>Variable level enhancements: You can now pass implicit structures/arrays to tags and functions. Before you had to assign it to a var and then pass it. There is assignment chaining (a=b=c). Direct access to elements of returned arrays (i.e. myFunction()[x] couldn&#8217;t be done previously). And, finally, ternary operators! For instance, you can do something like:  a = (b&lt;c)?b:c</p>
<p>CFSCRIPT enhancements. Starting in CF9, you can now write 100% script-based code, including classes/components.</p>
<p>CFC enhancements. There is now an explicit LOCAL scope. Instead of doing var myvar=1, you can do LOCAL.myvar=1.  What&#8217;s more, you can declare a variable with <em>var</em> anywhere in the code, not just at the top. CFCs also support implicit getters/setters by using the CFPROPERTY tag. These are worth using if there is no special handling going on, because they&#8217;re 7x faster than your own getters/setters.</p>
<p>Here&#8217;s an awesome feature. You no longer have to use CreateObject() to create a CFC. You can use the IMPORT keyword to point to a directory of CFCs and have them be first-class citizens in your code. And you can use the NEW keyword to create CFCs, like user = new User(). Looking more Java-like all the time.</p>
<p><strong>How to convince your boss to upgrade</strong> </p>
<p>First, with CFIMAP, you can now access email with IMAP support, such as GMail.</p>
<p>There are many PDF support enhancements. Create PDF packages, add/remove headers and footers, optimize PDFs (down-sample images, for instance), extract text/images, high-quality thumbnails, convert Word documents to PDF.</p>
<p>There are presentation options. The CFPRESENTATION tag will generate PPT files from CFML/HTML content. And you can go the other way: Convert PPT <em>to</em> HTML or Flash. Supports Microsoft PowerPoint &#8217;97 to &#8217;08 and Open Office Presentations.</p>
<p>Spreadsheet support. The CFSPREADSHEET helps you create, read, and merge native Excel spreadsheets. This isn&#8217;t just a CSV file. This is a real Excel spreadsheet with formulas and formatting support.</p>
<p>SharePoint integration. Native access to SharePoint data and services (Sites, templates, sub-sites, web parts, and workspaces). You can get lists including data, views, and alerts and querying against lists. Users, permissions, site groups, cross-site groups, security groups, and distribution groups. Build web parts with CFML. Integrate with SharePoint Single sign-on. You may wonder, &#8220;Why is this necessary since SharePoint has web services and exposes information as XML?&#8221; Because it&#8217;s painful. ColdFusion makes it significantly easier and faster.</p>
<p>ColdFusion Server Manager. A Flex-based AIR application that helps you manage multiple ColdFusion servers. And it receives system notifications and alerts. Helps apply settings for multiple servers.</p>
<p><strong>The next generation of applications</strong></p>
<p>Coldfusion 9 ORM functionality. Powered by the Java Hibernate framework, so it is industry standard. Various ormXXX() and entityXXX() functions provide this functionality for you. With this feature, no more SQL is necessary, so apps can be developed faster (and potentially with fewer errors). CFCs will just be automagically saved. But it&#8217;s not <em>just</em> a matter of saving time on development; it also makes it so that your app is no longer database-dependent. It can point to any database server and it should just work.</p>
<p>Enhanced caching. ColdFusion is already pretty optimized for speed (esp. between CF7 to CF8). So to get more speed, developers need to use these new caching features. Using cacheGet(), cachePut(), and cacheGetMetaData(), you can save/retrieve objects from a built-in cache. Page fragment caching allows you to have a combination of static and dynamic content on a page. This provides a HUGE performance boost, depending on what you&#8217;re doing. For instance, you only want to generate a menu dynamically the first time, but then another area of the page is dynamic every time.</p>
<p>Performance gains. Okay, Adam lied. ColdFusion 9 is actually 40% faster than ColdFusion 8, with no changes to code, just upgrading ColdFusion. CFC creation is 8x faster, method invocation is 3x faster. And UUID creation is 100x faster. These are some huge bottlenecks that have been blown away. There is a performance brief that Adobe will be releasing on ColdFusion 9 in the near future.</p>
<p>Search engine. ColdFusion 9 now includes Apache Solr. Verity is still included, but so is Solr, which is actually even faster than Verity. So you may choose to upgrade to Solr! They even provide a Verity-to-Solr migration utility.</p>
<p>ColdFusion Server API. You can have direct access to ColdFusion services for CFCHART, CFDOCUMENT, CFPDF, CFIMAGE, and more. This makes it even easier to access ColdFusion mail/pdf/images services directly within Flex without having to custom code some ColdFusion code.</p>
<p>What&#8217;s more, Flash Remoting is 9x faster. It may arguably be the fastest flash remoting server-side technology around.</p>
<p>There are various JavaScript/Ajax tags, like CFMAP for Google Maps, CFMESSAGEBOX, CFSLIDER, and more. Ajax functionality in CF is powered by ExtJS 3.0 (which is nice, because ExtJS isn&#8217;t free anymore, so getting CF9 gets you a copy of ExtJS basically), and JQuery is also supported.</p>
<p>This presentation was very rapid fire, which is testimony to how feature-rich of an upgrade ColdFusion 9 is.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-max09-whats-new-in-coldfusion-9/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Notes: What&#8217;s Coming in AIR 2</title>
		<link>http://blog.crankybit.com/notes-max09-whats-coming-in-air-2/</link>
		<comments>http://blog.crankybit.com/notes-max09-whats-coming-in-air-2/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 00:32:09 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MAX2009]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=329</guid>
		<description><![CDATA[These are notes taken at MAX 2009. This is obviously subject to change before AIR 2 is launched. Multi-touch gestures. This is especially useful for Flash&#8217;s new ability to compile down to iPhone, but it will even work on tablets or laptops that support multi-touch, such as the track pad on MacBooks. Opening Files. There [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes taken at MAX 2009. This is obviously subject to change before AIR 2 is launched.</p>
<p><strong>Multi-touch gestures.</strong> This is especially useful for Flash&#8217;s new ability to compile down to iPhone, but it will even work on tablets or laptops that support multi-touch, such as the track pad on MacBooks.</p>
<p><strong>Opening Files.</strong> There is now a File.openWithDefaultApplication() method which does just what it says. So you can open data document of any type in its native app from your AIR app, i.e. open a Word document in Word from your AIR app. Executables are blacklisted, such as *.exe, *.bat, or other executables.</p>
<p><strong>File &#8220;downloaded&#8221;.</strong> You can use myFile.downloaded=true to set the bit on a file that will notify the user with a message like, &#8220;This file has been downloaded from the Internet. Are you sure you want to open it?&#8221; the first time it opens.</p>
<p><strong>Volume Detection.</strong> Listen for mounting and unmounting of volumes. Query system for volume info. So this gives you the ability to work with external volumes including optical media or attached cameras.</p>
<p><strong>Native processes.</strong> You can start native processes outside of AIR, or even reference it and launch it. This includes passing in arguments and utilizing stdin, stdout, stderr! Now, you can&#8217;t use this ability from an app that has been installed straight from an AIR file. You have to have the app in a native installer. This way, someone on a Mac won&#8217;t try to run an app that wants to run a Windows executable, or something similar. In the demo, the Mac screenshot process was invoked, and in another demo, Spotlight functionality was invoked and its output was incorporated into the app!</p>
<p><strong>File promises.</strong> Ability to tell the OS about files you don&#8217;t have yet. Gives you the ability to drag and drop files in cases when they are on the network or Internet.</p>
<p><strong>Listening on a socket.</strong> Ability for inter-application communication. Better protocol support (such as FTP). Networking utilities. You just use ServerSocket.bind() and ServerSocket.listen() methods in conjunction with an event listener to act on activity. Demonstrated it with an HTTP proxy app called HTTPeek (on Google Code). Very fast. Handles the socket connection well.</p>
<p><strong>Advanced Networking.</strong> Get network information. Support for IPv6. UDP support. A DNS resolver. More coming.</p>
<p><strong>Audio Encoding.</strong> Surprisingly, this wasn&#8217;t supported before. Now you can encode data directly from the microphone.</p>
<p><strong>Global Error Handling.</strong> You can now catch all uncaught errors and error events in your app. This is useful because on a client that does not have the debugger version of Flash, the app will just stop working. With this global error handling feature, you can log the errors to a file or over the network, or do other things.</p>
<p><strong>Accessibility.</strong> Functionality from Flash Player 10 will now be supported in AIR. It has 28 accessible Flex components, supporting MSAA (Microsoft Active Accessibility) in JAWS or Microsoft Narrator, for example.</p>
<p><strong>JavaScript Profiling.</strong> Can access profiling information via Aptana.</p>
<p><strong>Optimization.</strong> Lower memory consumption, lower CPU utilization especially when the app is idle.</p>
<p><strong>Misc.</strong> Improved printing. SQLite supports nested transactions. Exit even on shutdown (can now see when the event is not cancelable). Various WebKit enhancements.</p>
<p>Flex 3 will work for AIR 2, but Flex 4 with Flash Builder 4 will be a cleaner, more set up approach for developing AIR 2. You&#8217;ll have to overlay AIR 2 SDK on your Flex Builder 3 installation if you want to develop for AIR 2 in Flex 3.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-max09-whats-coming-in-air-2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Favorite ColdFusion Weekly Episodes</title>
		<link>http://blog.crankybit.com/favorite-coldfusion-weekly-episodes/</link>
		<comments>http://blog.crankybit.com/favorite-coldfusion-weekly-episodes/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 21:18:55 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[IDEs]]></category>
		<category><![CDATA[IT Industry]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=305</guid>
		<description><![CDATA[In light of the departure of the ColdFusion Weekly podcast (so long Matt and Peter, and thank you!), I have assembled a list of my favorite &#8220;shows&#8221; or &#8220;episodes&#8221;. Really, all of the episodes were good and worth hearing. But these episodes were fantastic. Presented in chronological order: v1.5 &#8211; IDEs of&#8230;April: Came at a [...]]]></description>
			<content:encoded><![CDATA[<p>In light of the <a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2008#3-09" target="_blank">departure</a> of the <a href="http://www.coldfusionweekly.com" target="_blank">ColdFusion Weekly</a> podcast (so long Matt and Peter, and thank you!), I have assembled a list of my favorite &#8220;shows&#8221; or &#8220;episodes&#8221;. Really, <em>all</em> of the episodes were good and worth hearing. But these episodes were <em>fantastic. </em></p>
<p>Presented in chronological order:</p>
<ul>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2006#1-5 Beta" target="_blank">v1.5 &#8211; IDEs of&#8230;April</a>: Came at a perfect time for me, because I had just switched to CFEclipse recently. So it was great confirmation for me and I enjoyed the Eclipse plugin recommendations. This episode is good for anyone still using Dreamweaver or HomeSite.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2006#1-6 Beta" target="_blank">v1.6 &#8211; Version Control</a>: Also had great timing, because I had already committed myself to exclusively using Subversion but hadn&#8217;t yet set up my Subversion server. While you&#8217;re at it, check out the follow-up episode on <a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2006#1-29" target="_blank">v1.29 &#8211; Source Control Revisited</a>. These episodes are a nice way to be introduced to version control for web development.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2006#1-10" target="_blank">v1.10 &#8211; Design Pattern Safari</a>: Probably one of the most classic episodes and a must-hear. All about design patterns like beans, DAOs, etc.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2007#2-01" target="_blank">v2.01 &#8211; Rise of the Virtual Machines</a>: Discussion of virtualization technology on both Macs and Windows. Great discussion, because I think this is an important technology for web developers; I am a big proponent of virtualization.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2007#2-02" target="_blank">v2.02 &#8211; Cryptology and Security</a>: This was very interesting because of the information that was discussed regarding encryption, hashing, and salt.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2007#2-15" target="_blank">v2.15 &#8211; Mark Mandel on Transfer</a>: Very good consideration of the popular ORM, Transfer.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2007#2-27" target="_blank">v2.27 &#8211; Selenium</a>: Discussion on testing your apps on the client side with Selenium.</li>
<li><a href="http://www.coldfusionweekly.com/index.cfm?event=showArchive&amp;year=2008#3-06" target="_blank">v3.06 &#8211; Open Source BlueDragon</a>: Discussion with Vince Bonfanti about BlueDragon going open source.</li>
</ul>
<p>I will miss Matt&#8217;s Vista rants. <img src='http://blog.crankybit.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   Thanks to both of you for all of your hard work.</p>
<p>If you&#8217;re hankering for a podcast to listen to, Brian Meloche is picking up where Matt and Peter left off with a new podcast called <a href="http://www.cfconversations.com/" target="_blank">CFConversations</a>. W00T!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/favorite-coldfusion-weekly-episodes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Radio Silence</title>
		<link>http://blog.crankybit.com/radio-silence-wwdc-2008/</link>
		<comments>http://blog.crankybit.com/radio-silence-wwdc-2008/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 14:03:09 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[IT Industry]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=302</guid>
		<description><![CDATA[Like I have done in the past, I am declaring radio silence today. I will not be check my feeds, look at any Apple news sites, or check my personal email until I can view Apple&#8217;s video stream of the WWDC keynote.  You can view the MacRumors WWDC 2008 Spoiler Free news page if you [...]]]></description>
			<content:encoded><![CDATA[<p>Like I have <a href="http://blog.crankybit.com/radio-silence/">done in the past</a>, I am declaring radio silence today. I will not be check my feeds, look at any Apple news sites, or check my personal email until I can view Apple&#8217;s video stream of the <a href="http://developer.apple.com/wwdc/" target="_blank">WWDC</a> keynote. </p>
<p>You can view the <a href="http://www.macrumors.com/2008/06/02/wwdc-2008-spoiler-free-keynote-stream/" target="_blank">MacRumors WWDC 2008 Spoiler Free news page</a> if you want to do the same.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/radio-silence-wwdc-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Biased Flash Series by AppleInsider</title>
		<link>http://blog.crankybit.com/biased-flash-series-by-appleinsider/</link>
		<comments>http://blog.crankybit.com/biased-flash-series-by-appleinsider/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 15:47:07 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[History]]></category>
		<category><![CDATA[IT Industry]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/?p=300</guid>
		<description><![CDATA[This is old news now, but it&#8217;s worth noting that AppleInsider released a 3-part series of articles about Flash. Check them out here: Part 1: Adobe in the History and Future of Flash Part 2: The Many Enemies and Obstacles of Flash Part 3: Adobe Fights for AIR with the Open Screen Project Whether you [...]]]></description>
			<content:encoded><![CDATA[<p>This is old news now, but it&#8217;s worth noting that AppleInsider released a 3-part series of articles about Flash. Check them out here:</p>
<ul>
<li><a href="http://www.appleinsider.com/articles/08/05/05/flash_wars_adobe_in_the_history_and_future_of_flash_part_1_of_3.html">Part 1: Adobe in the History and Future of Flash</a></li>
<li><a href="http://www.appleinsider.com/articles/08/05/06/flash_wars_the_many_enemies_and_obstacles_of_flash_part_2_of_3.html">Part 2: The Many Enemies and Obstacles of Flash</a></li>
<li><a href="http://www.appleinsider.com/articles/08/05/07/flash_wars_adobe_fights_for_air_with_the_open_screen_project_part_3_of_3.html">Part 3: Adobe Fights for AIR with the Open Screen Project</a></li>
</ul>
<p>Whether you love Flash, hate Flash, love Adobe, hate Adobe, or are neutral with the whole thing, this series is disturbingly prejudicial and biased. Comments on the posts even say as much. This is certainly disappointing, because I like AppleInsider, Apple, Adobe, and Flash. But these articles have a predisposition that results in negative interjected commentary in what would otherwise have been an interesting consideration of the history of Flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/biased-flash-series-by-appleinsider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tom Yager Praises AIR</title>
		<link>http://blog.crankybit.com/tom-yager-praises-air/</link>
		<comments>http://blog.crankybit.com/tom-yager-praises-air/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 18:44:17 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[IT Industry]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/tom-yager-praises-air/</guid>
		<description><![CDATA[Tom Yager, writer of the Ahead of the Curve column in InfoWorld, wrote up a nice article about AIR entitled AIR gets rich apps right. Touting Adobe&#8217;s credentials through their past record, he indicated that Adobe is a great candidate for accomplishing what AIR is intended to do: Get that web technology to the desktop [...]]]></description>
			<content:encoded><![CDATA[<p>Tom Yager, writer of the <a href="http://weblog.infoworld.com/yager/" target="_blank">Ahead of the Curve</a> column in InfoWorld, wrote up a nice article about AIR entitled <a href="http://weblog.infoworld.com/yager/archives/2008/04/air_gets_rich_a.html" target="_blank">AIR gets rich apps right</a>. Touting Adobe&#8217;s credentials through their past record, he indicated that Adobe is a great candidate for accomplishing what AIR is intended to do: Get that web technology to the desktop environment untethered from the web browser.</p>
<p>I&#8217;ve always loved Tom Yager and find his columns very interesting (although the Intel/AMD discussions lose my interest). It&#8217;s great to see him praising AIR.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/tom-yager-praises-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notes: Adobe AIR Local Data Storage Options</title>
		<link>http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/</link>
		<comments>http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 17:13:10 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/</guid>
		<description><![CDATA[The following are my notes during the Adobe AIR Local Data Storage Options webinar that was presented during Adobe Developer Week. It was presented by Greg Hamer and the slides and demo code are already online. Before getting started, note how Microsoft and Adobe are taking two different approaches: Microsoft is trying to bring the [...]]]></description>
			<content:encoded><![CDATA[<p>The following are my notes during the Adobe AIR Local Data Storage Options webinar that was presented during <a href="http://adobe.com/go/2008_developer_week" target="_blank">Adobe Developer Week</a>. It was presented by Greg Hamer and the slides and demo code are already <a href="http://halcyonsolutions.net/presos/08/airsql/" target="_blank">online</a>.</p>
<p>Before getting started, note how Microsoft and Adobe are taking two different approaches: Microsoft is trying to bring the .Net desktop development community to the web. Adobe is conversely trying to bring web developers to the desktop! (<a href="http://www.news.com/8301-10784_3-9789007-7.html" target="_blank">Kevin Lynch</a>)</p>
<p>There are four main options for AIR local storage: Local Shared Objects, File System, Encrypted Local Store, and the embedded SQLite database. Shared Objects are available in the Flash Player as well; all of these options are obviously available in AIR. Note that the data size limitation for Shared Objects does not exist in the AIR runtime!</p>
<p><strong>Performance considerations.</strong> Shared Objects read and write very quickly. File system access and encrypted local stores are typically be slow in writing. Embedded SQLite databases are typically the best combination of speed and random access of items. Greg highlighted the AIR_LocalStorage_Demo app created by Jason Williams that demonstrates the speeds of the four storage methods.</p>
<p><strong>Local Shared Objects.</strong> You can serialize memory resident data structures. Great! However, it runs in <em>synchronous</em> mode.</p>
<p><strong>Encrypted Local Store.</strong> Used to store sensitive data. The price is the slow write speeds.  Also runs in synchronous mode. All data is serialized using ByteArray.</p>
<p><strong>File System. </strong>Obviously important for management of documents. Can run in sync and async mode. The File and FileStream objects work together to point to a file and read/write data. The File object helps remove you from the pain of dealing with Mac vs. Windows environments with properties like File.userDirectory, File.documents.Directory, File.desktopDirectory, etc. It also has methods for opening Open and Save dialog boxes native to the environment as well as copying/moving/deletion methods.</p>
<p><strong>Embedded SQLite Database.</strong>  Nice thing about them is that they are self-contained in a single file and require no external software installation to begin using them (support is built into the AIR runtime). Even supports transactions. And the database supports large amounts of data: SQLite has a theoretical limit of over 2TB. Supports ANSI-SQL 92.</p>
<p>However, it&#8217;s not a full-blown enterprise database server, obviously. So you lose things like stored procedures, enforcing data type constraints, foreign key constraints, and primary keys must be integers. It also isn&#8217;t a multiuser environment.</p>
<p><strong>Session evaluation. </strong>I am unhappy to say that I was disappointed with the session. It was high-level, the coverage of code samples (when they weren&#8217;t passed over completely) consisted of merely reading the code back to us. I recommend viewing the recording if you have zero knowledge of data storage in Flex and AIR, as it would serve as a decent first-baby-step introduction for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Save the Day With Fiddler (or, Stop Barracuda From Blocking the iTunes Store)</title>
		<link>http://blog.crankybit.com/fiddler-and-barracuda/</link>
		<comments>http://blog.crankybit.com/fiddler-and-barracuda/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 22:14:03 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[IT Industry]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/fiddler-and-barracuda/</guid>
		<description><![CDATA[Recently at work, we in IT were puzzled when a fellow employee called to report that the iTunes Store would not load on iTunes for computers on our network. The problem occurred only on our network and was not Mac or Windows specific. Fiddler came to the rescue. Fiddler is a freeware tool that logs [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at work, we in IT were puzzled when a fellow employee called to report that the iTunes Store would not load on iTunes for computers on our network. The problem occurred only on our network and was not Mac or Windows specific.</p>
<p><a href="http://www.fiddlertool.com/" target="_blank">Fiddler</a> came to the rescue. Fiddler is a freeware tool that logs and allows you to inspect all HTTP traffic between your computer and the network (and thus Internet). I first heard about it at a conference when learning how to debug Ajax applications. It was especially useful when doing so with IE since there was no <a href="http://www.getfirebug.com/" target="_blank">Firebug</a> for IE (ahem, this is before the days of <a href="http://www.getfirebug.com/lite.html" target="_blank">Firebug Lite</a> and other such tools). I never really looked at it closely because, well, why do that when you could use Firebug and Firefox? <img src='http://blog.crankybit.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Well, it came in handy for this problem. The HTTP traffic between iTunes and the iTunes Store is less apparent since it is behind Apple&#8217;s veil of the iTunes interface. Fiddler revealed the exact domain names and in fact full URLs that were being requested, as well as the returned results. It was immediately apparent that our <a href="http://www.barracudanetworks.com" target="_blank">Barracuda Web Filter</a> was blocking the request, so iTunes just reported that it could not connect to the iTunes Store. When we white-listed the requested domain, everything began functioning fine.</p>
<p>Everything had been working fine with iTunes in the past. But Barracuda updates its black list automatically. So when Barracuda apparently added certain iTunes Store domain names into its black list, namely phobos.apple.com, our hardware eventually updated its lists and began blocking iTunes Store traffic on our network.</p>
<p><strong>Lesson #1:</strong> Beware the pitfalls of subscription services like Barracuda&#8217;s. They have their benefits, but they certainly can catch you unawares. <strong>Lesson #2:</strong> Use Fiddler. It is great for a lot more than web development debugging. It&#8217;s a convenient early stage network debugging tool. <strong>Lesson #3:</strong> Don&#8217;t discount the supposed dross at conferences that you think doesn&#8217;t apply to you. Perhaps years after you hear about something, you might finally come to have a need for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/fiddler-and-barracuda/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What&#8217;s Up 16 Sector&#8217;s Sleeve?</title>
		<link>http://blog.crankybit.com/16sector-riddles/</link>
		<comments>http://blog.crankybit.com/16sector-riddles/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 11:27:21 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[Apple ][]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[History]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/16sector-riddles/</guid>
		<description><![CDATA[Boy, 16 Sector is drawing this thing out longer than I&#8217;d hoped. They&#8217;ve got something up their sleeve for the few Apple II enthusiasts around us. Yes, a new piece of Apple II hardware will be coming our way very shortly. The cat&#8217;s almost out of the bag! The good ol&#8217; days of the Apple [...]]]></description>
			<content:encoded><![CDATA[<p>Boy, <a href="http://16sector.com/" target="_blank">16 Sector</a> is drawing this thing out longer than I&#8217;d hoped. They&#8217;ve got something up their sleeve for the few Apple II enthusiasts around us.</p>
<p>Yes, a new piece of <em>Apple II</em> hardware will be coming our way very shortly. The cat&#8217;s almost out of the bag! The good ol&#8217; days of the Apple //e and Apple IIgs are what really make me nostalgic. I even purchased an Apple IIgs recently on eBay and I&#8217;m just saving it in the box with plans to break it out when I get around to finishing my new attic office space.</p>
<p>For clues on the odd antics of the 16 Sector site, check the commentary at <a href="http://www.a2central.com" target="_blank">A2Central.com</a> in their post, &#8220;<a href="http://www.a2central.com/portal/?p=1468" target="_blank">More 16 Sector riddles</a>&#8220;.</p>
<p>p.s. A big &#8220;hear! hear!&#8221; goes out for that post in regard to the return of the great Carrington Vanston of <a href="http://www.monsterfeet.com/1mhz/" target="_blank">1MHz</a> fame!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/16sector-riddles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Notes: BlazeDS Revealed!</title>
		<link>http://blog.crankybit.com/notes-blazeds-revealed/</link>
		<comments>http://blog.crankybit.com/notes-blazeds-revealed/#comments</comments>
		<pubDate>Fri, 29 Feb 2008 00:10:23 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/notes-blazeds-revealed/</guid>
		<description><![CDATA[These are notes from the presentation by Tom Jordahl about BlazeDS. History lesson. Flex 1.0 introduced MXML. Originally built to be a server-based compiler. Flex 2.0 fine-tuned the product. ActionScript 3 was introduced, the Eclipse-based IDE was developed, and the server-side component was renamed Flex Data Services. That server-side product continued development and was renamed [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from the presentation by Tom Jordahl about <a href="http://opensource.adobe.com/blazeds" target="_blank">BlazeDS</a>.</p>
<p><strong>History lesson. </strong>Flex 1.0 introduced MXML. Originally built to be a <em>server-based </em>compiler. Flex 2.0 fine-tuned the product. ActionScript 3 was introduced, the Eclipse-based IDE was developed, and the server-side component was renamed Flex Data Services. That server-side product continued development and was renamed eventually to LiveCycle Data Services. Finally, a free portion was released as BlazeDS. So, its heart and heritage is in the development of Flex.</p>
<p><strong>So what is BlazeDS?</strong>  The part that lets your Flash/Flex app have remoting and messaging services via web services, remote objects, data push, etc.</p>
<p><em>Remoting.</em> Used to be Flash Remoting. Allows mx:RemoteObject tag be used to make RPC calls to the server.  Allows you to use CFCs and ActionScript or MXML together! Works with Java classes too, but obviously it is very nicely integrated with ColdFusion. This is the most familiar purpose for this kind of tool. But what else can BlazeDS do?</p>
<p><em>Messaging. </em>Publish and Subscribe functionality becomes trivial. We can have real-time pushes over the web. What exactly does this mean? Your Flash/Flex apps can push data from one client to the next without refreshes or polling the server.</p>
<p>These services use AMF (Action Messaging Format). It is fast and small: Rather than being verbose text, it is a compact binary protocol. Not that you would ever have to know that, because it just happens behind the scenes. And its specs have been released, which means it can be supported by open source and third party developers.</p>
<p>So why would you still get LCDS? Well, you get certified builds with warranty coverage and support. You&#8217;re paying for Adobe to back the product. There will even be an LCDS &#8220;Community Edition&#8221; that will basically be BlazeDS with this support. Somewhat reminiscent to Red Hat vs. CentOS: Why get Red Hat when CentOS is everything Red Hat is? Because Red Hat has official support for its product. So Adobe is making the technology freely available, and giving you the option to pay for support and official builds and bug fixes.</p>
<p>LCDS &#8220;Enterprise Edition&#8221; is still the mother of data services. This version adds the data management capability of data services.</p>
<p>The installation of ColdFusion 8 gives you the free express edition of LCDS. But this is a single CPU license. If it doesn&#8217;t meet your needs, you can configure BlazeDS for ColdFusion 8. But to do this, you WILL have to remove the LCDS Express Edition that installed with CF8. Now, if you&#8217;re just using Flash Remoting, there isn&#8217;t any burning need to go to BlazeDS with CF8. However, the messaging features have no CPU restrictions with BlazeDS, so if you are using the messaging features, you may want to go with BlazeDS.</p>
<p>What do you use with BlazeDS vs. LCDS? LCDS has the data management features: Real-time data updates, conflict detection, caching, paging, more!  RTMP channels: Direct socket connection to server, instead of the more resource-expensive HTTP. Scalability is also better with LCDS.</p>
<p>Tom indicated that Flex and BlazeDS will not be standing still. He certainly implied that <a href="http://en.wikipedia.org/wiki/Silverlight" target="_blank">Silverlight</a> is in Adobe&#8217;s sights by indicating that it is &#8220;nipping at [Flex's] heels&#8221;, suggesting that the AIR, Flex, and BlazeDS technologies will be progressing in development at a rapid pace by Adobe.</p>
<p>Tom explained BlazeDS and LCDS very clearly, albeit at a quick pace at first. My development rarely calls for the messaging features that would especially drive me to BlazeDS, but even so, it was beneficial to understand what BlazeDS is and it is good to know even when a product is <em>not </em>needed in your development arsenal, as in my case. For me, I will be using remoting only, so will stick with LCDS Express that comes with CF8.</p>
<p>Thanks, Tom.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-blazeds-revealed/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Notes: Savvy CFMeetup Presentation</title>
		<link>http://blog.crankybit.com/notes-savvy-cfmeetup-presentation/</link>
		<comments>http://blog.crankybit.com/notes-savvy-cfmeetup-presentation/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 18:08:30 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/notes-savvy-cfmeetup-presentation/</guid>
		<description><![CDATA[These are notes for a presentation on Savvy, the content management system, by Joshua Cyr. For setup, there is a cfm page that has numerous CFSETs that you have to set. After that, everything is basically good to go. It will create the database in the DSN you provide it, by simply running an install [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes for a <a href="http://experts.acrobat.com/p13566392/" target="_blank">presentation</a> on <a href="http://www.besavvy.com/" target="_blank">Savvy</a>, the content management system, by Joshua Cyr.</p>
<p>For setup, there is a cfm page that has numerous CFSETs that you have to set. After that, everything is basically good to go. It will create the database in the DSN you provide it, by simply running an install script by calling a cfm page.</p>
<p>First thing you&#8217;ll have to do when you login: Set up some templates for your site. In CFEclipse, he took a normal HTML page with content, and just started editing Savvy tags. He replaced the &lt;title&gt; with a header object, some menu navigation with a nav object, basic content with a content object. What about when you alter a template? There is an option to rebuild pages (or entire site) for when a template is changed.</p>
<p>He showed that an object can be <u>shared</u>. This way, anytime an object with that name appears on any page, changes to that object will be reflected on all of the pages.</p>
<p>Creating pages and directories, actual physical files and directories are indeed saved. This is handy for apps that do traffic analysis. Sometimes they sputter on pages that have a front controller for pages (index.cfm?page=MyPage).</p>
<p>When you create a page, you then can view each content area in the new page. Just click on it and you can edit that particular content area. The editing mechanism is pretty typical: A WYSIWYG editor, decent picture management. You can adjust settings so that the WYSIWYG editor will look exactly like you want it. Handling links is pretty simple: Can pull up a screen similar to picking a picture, except for pages. When you start typing a page name, it has auto-suggest to help. Note that the link management is very basic: It helps you create a hard link in the content, and nothing is done to warn you if you will break links when you change a page&#8217;s name or location (or delete it).</p>
<p>When it comes time to publish, you can publish an object at a time, or the whole page. Publishing can be scheduled, and expiration is available as well. Additionally, it supports workflow where the user will not have publishing rights, so instead he can <strong>request</strong> publishing, and then a person with that permission will do the publishing. Savvy does not have sophisticated workflow management, however. It keeps the process simplified. History of items is recorded and can be viewed. History by object/page or by user.</p>
<p>When managing users, you not only can supply exact permissions of what a user can do, but also can do groups that users belong to. Then perms are assigned based on their group.</p>
<p>Now, when you have CF in you template page, it doesn&#8217;t work like you&#8217;d expect, when a new page is created from a template, it will effectively paste in the results of your CF, not actually render the CF on the page. Thus, welcome to their custom code object. It effectively acts like a CFINCLUDE for your pages.</p>
<p>Savvy plays nice with other CF applications. He did not demo or speak on this any further, though.</p>
<p>Thanks, Joshua.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-savvy-cfmeetup-presentation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Notes: Design Patterns</title>
		<link>http://blog.crankybit.com/designpatterns/</link>
		<comments>http://blog.crankybit.com/designpatterns/#comments</comments>
		<pubDate>Fri, 14 Dec 2007 16:40:31 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/designpatterns/</guid>
		<description><![CDATA[These are notes from the Design Patterns and ColdFusion presentation by Sean Corfield on 12/13/07. Design patterns are basically common solutions to recurring problems. Using a pattern provides a common vocabulary between developers. If you say, &#8220;I&#8217;m using a Remote Facade&#8221;, someone else will know what you&#8217;re talking about without any further explanation. What makes [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from the <a href="http://experts.acrobat.com/p41374019/" target="_blank">Design Patterns and ColdFusion</a> presentation by Sean Corfield on 12/13/07.</p>
<p>Design patterns are basically common solutions to recurring problems. Using a pattern provides a common vocabulary between developers. If you say, &#8220;I&#8217;m using a Remote Facade&#8221;, someone else will know what you&#8217;re talking about without any further explanation.</p>
<p>What makes up a pattern? (a) A name, to provide a common vocabulary between developers. (b) A recurring problem; typically there are &#8220;forces&#8221;, or circumstances in the coding situation, that will lead you to use the pattern. (c) The solution, or template for solving the problem. Note that a pattern doesn&#8217;t have an <em>exact, proper</em> way to be executed. It is indeed just a guide, or template. (d) Consequences: Every pattern has its pros and cons.</p>
<p align="center"><u><strong>Common Problems and Design Patterns</strong></u></p>
<ol>
<li><strong>Problem:</strong> Duplicate site content at top and bottom of site.<br />
<strong>Pattern Name:</strong> Composite View<br />
<strong>Solution:</strong> Include a header and footer that has this duplicated content.</li>
<li><strong>Problem:</strong> Need an instance of an object that is accessible everywhere in an application.<br />
<strong>Pattern Name: </strong>Singleton<br />
<strong>Solution:</strong> Create it at application startup and put it in application scope.<br />
<strong>Trade offs: </strong>Initialization is in one place (+). Easy access to objects app-wide (+). But now your code is very dependent on that application scope, which breaks encapsulation (-).</li>
<li><strong>Problem:</strong> Several components make up a particular functionality, but you don&#8217;t want to expose all of that complexity to the calling code, especially in case I want to change how I implement it.<br />
<strong>Pattern Name: </strong>Facade<br />
<strong>Solution: </strong>Create a new component that has a nice, simple, high-level API. Client code calls it, and it calls all the complex components under the hood.<br />
<strong>Trade offs:</strong> App code no longer needs to no about all of the complex internals (+). However, there will be redundancy of methods between the API and the underlying code, which is more maintenance and more coding (-).</li>
<li><strong>Problem: </strong>I need some standardized code that runs on every request of the application, perhaps security checks.<br />
<strong>Pattern Name:</strong> Front Controller<br />
<strong>Solution:</strong> Make all requests go through a common piece of code, and have that code apply the logic before/after processing the actual request. i.e. index.cfm?page=myaction. Everything routes through index.cfm.<br />
<strong>Trade offs:</strong> Full control over every request; can easily add add&#8217;l functionality (+). All URLs look similar (+/-). The control page (index.cfm) can get complicated (-).</li>
</ol>
<p>Recognize that patterns are NOT code. Any example code for a pattern is just that: An <u>example</u>. <strong>Design</strong> patterns can apply to any language and typically can be used in the design phase of an app. Some patterns are language-specific. Do patterns have an object-oriented bias? Well, yes. Most design patterns <u>are</u> focused on OO design. But design patterns in general do not have to be OO-specific. It just tends to be OO people who are considering design patterns.</p>
<p align="center"><u><strong>Ruby Patterns for Consideration</strong></u></p>
<ol>
<li><strong>Active Record</strong> pattern for managing persistence of objects. An object knows how to save/get itself with a database.</li>
<li><strong>Dynamic finder methods</strong>. By virtue of the method name, the functionality can be figured out. This is done with a method that runs when the called method doesn&#8217;t exist (&#8220;method_missing&#8221;). That method can than act on the method that was called based on its name. ColdFusion can do this with the onMissingMethod() method of a CFC.</li>
</ol>
<p>Patterns and interfaces. Interfaces are not needed but are useful as a descriptive tool in explaining pattern implementations. ColdFusion 8 introduced &lt;cfinterface&gt;. Alternatively, you could use duck typing.</p>
<p align="center"><u><strong>Design Patterns from Gang of Four</strong></u></p>
<ul>
<li>Creational Patterns
<ul>
<li>Abstract Factory, Builder, Factory Method, Prototype, Singleton</li>
</ul>
</li>
<li>Structural Patterns
<ul>
<li>Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy</li>
</ul>
</li>
<li>Behavioral Patterns
<ul>
<li>Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor</li>
</ul>
</li>
</ul>
<p>To learn patterns, you can observe frameworks, which often implement multiple patterns: Front Controller, MVC, Identity Maps, Context Objects, etc.</p>
<p>Thanks for the great presentation, Sean.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/designpatterns/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Notes: Pragmatic Development</title>
		<link>http://blog.crankybit.com/notes-pragmatic-development/</link>
		<comments>http://blog.crankybit.com/notes-pragmatic-development/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 18:05:52 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[General Web Dev.]]></category>
		<category><![CDATA[Webinars]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/notes-pragmatic-development/</guid>
		<description><![CDATA[These are notes from John Paul Ashenfelter&#8217;s presentation on 12/13/07 regarding pragmatic development. The entire discussion is done with open source tools and can be set up in an afternoon. Build it CRISP: Complete, Repeatable, Informative, Schedulable, Portable. Building is taking all the pieces and creating the final product. All source code should be in [...]]]></description>
			<content:encoded><![CDATA[<p>These are notes from John Paul Ashenfelter&#8217;s presentation on 12/13/07 regarding pragmatic development. The entire discussion is done with open source tools and can be set up in an afternoon.</p>
<p>Build it CRISP: Complete, Repeatable, Informative, Schedulable, Portable. Building is taking all the pieces and creating the final product. All source code should be in a repository; there&#8217;s no other way to do it. Perhaps you&#8217;ll want <em>continuous </em>development: Every commit, it is redeployed. This especially makes sense for the QA server.</p>
<p><strong>Source control</strong> is a must. Subversion is the popular source control option for now.</p>
<p><strong>Automation </strong>is an important factor for building. Shell scripts can get the job done (although Windows shell isn&#8217;t so good), but tools like make, rake, and Ant seem to be better for this kind of thing. Considering Ant&#8217;s popularity in the Java world&#8211;and ColdFusion&#8217;s connection to Java&#8211;it often is the automation tool of choice. It&#8217;s easy to install, widely used.</p>
<p><strong>Testing </strong>is another important factor in the process. <a href="http://www.cfcunit.org/" target="_blank">CfcUnit</a> is &#8220;pretty darn solid&#8221;. <img src='http://blog.crankybit.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Functional testing tools like <a href="http://www.openqa.org/selenium/" target="_blank">Selenium</a> and <a href="http://webtest.canoo.com/" target="_blank">Canoo WebTest</a> are useful too. Depending on your deployment, load-testing tools like <a href="http://grinder.sourceforge.net/" target="_blank">Grinder</a> may be useful too.  However, load-testing may sometimes be frustrating to set up. Worry more about your unit and functional tests.</p>
<p>Selenium is useful for any of the testing of your application that is repetitious.  The nice thing is that you don&#8217;t even have to know how to write Selenium tests. With the IDE, you can record your tests by walking through the application, and then the Selenium test will be generated.  Flex and Flash are problematic, but other elements of web pages work great, including AJAX code.</p>
<p><strong>Using Ant.</strong> When using Ant, <a href="http://dbunit.sourceforge.net/" target="_blank">dbUnit</a> can be extremely useful to also reset your database to a certain condition. Not good for HUGE amounts of data, though.  Use SvnAnt v1.1 (it doesn&#8217;t use JavaHL). To learn how to use ant, try the <a href="http://ant.apache.org/manual/index.html" target="_blank">Ant Manual</a>. Also try looking at well-annotated ant scripts written by other people.<br />
Charlie mentioned an excellent blog post with <a href="http://carehart.org/blog/client/index.cfm/2006/7/12/subversion_resources" target="_blank">lots of resources</a> for Subversion from a ColdFusion developer&#8217;s perspective.</p>
<p>A very decent presentation. Thanks, John.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/notes-pragmatic-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML 101</title>
		<link>http://blog.crankybit.com/xml-101/</link>
		<comments>http://blog.crankybit.com/xml-101/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 15:30:52 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General Web Dev.]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/xml-101/</guid>
		<description><![CDATA[The following are notes from the XML 101 class at Adobe MAX 2007. I&#8217;m skipping over the extremely basic XML principles and covering the more interesting stuff. When use XML nodes over attributes? Attributes are good for set, simple values. If you have complex values, multiples of a particular entry, or you want more extensibility, [...]]]></description>
			<content:encoded><![CDATA[<p>The following are notes from the XML 101 class at Adobe MAX 2007. I&#8217;m skipping over the extremely basic XML principles and covering the more interesting stuff.</p>
<p>When use XML nodes over attributes? Attributes are good for set, simple values. If you have complex values, multiples of a particular entry, or you want more extensibility, use nodes for XML.</p>
<p>The presenter demonstrated using DTDs over XML Schemas. The DTDs use a very specific grammar that is not even XML-ish. It&#8217;s kind of yesterday&#8217;s XML descriptor. Nowadays, better to use XML Schemas, which are actually XML defining XML. Both are ugly in my opinion, and XML Schemas are more verbose (as XML usually is), but you might as well go with the latest, most accepted convention, which is the XML Schema approach.</p>
<p>By using DTDs and XML Schemas, apps can be cognizant of the structure of your XML language. Even from a developer&#8217;s viewpoint, this can be useful when editing XML within an IDE.</p>
<p>The real fun part is formatting the XML with XSL (eXtensible Stylesheet Language). Supports loops, conditional logic, and other processing. Think of it as CSS on steroids, for XML. With XSL, you can transform XML to HTML, or PDF, or other fun stuff.</p>
<p>XPath is the heart of XSL processing. Allows you to traverse the XML document and find exactly what you&#8217;re looking for, whether it&#8217;s a particular node or looping over a group of items (xsl:for-each).</p>
<p>You CAN send the XML and XSL to the client and have the transformation be done client-side. All modern browsers include the XML/XSL engine. But generally it is wiser to do the transformation on the server side.</p>
<p>In my opinion, this approach lowers the value of XSL, because I can just as easily write some CF that will act on the XML. Yeah, I can write numerous XSLs for different presentations (text-only, XHTML, PDF, etc), but I&#8217;d have to do the effort of writing different XSL docs for that, when I could just as easily write different CF processors that accomplish the same thing. Unless you are working with a huge number of documents of varying types, XSL may not provide a large enough of an advantage for a language like CF that so easily manipulates XML.</p>
<p>The final step is grabbing XML with Ajax (such as Spry) that will populate document spaces (tables, divs, etc) with the XML data very easily as well. Again, this approach is similar to the CF approach, but with a more JavaScript-heavy slant.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/xml-101/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leveraging ColdFusion With AIR</title>
		<link>http://blog.crankybit.com/leveraging-coldfusion-with-air/</link>
		<comments>http://blog.crankybit.com/leveraging-coldfusion-with-air/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 21:48:00 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General Web Dev.]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/leveraging-coldfusion-with-air/</guid>
		<description><![CDATA[AIR does not have a CFML engine. ColdFusion cannot be packaged within AIR apps. Traditionally, we use CF to generate the UI. However, in AIR, typically the UI is pre-designed and packaged. How does ColdFusion fit in, then? Use ColdFusion apps directly, use ColdFusion as the data provider, or use ColdFusion as the data provider [...]]]></description>
			<content:encoded><![CDATA[<p>AIR does not have a CFML engine. ColdFusion cannot be packaged within AIR apps. Traditionally, we use CF to generate the UI. However, in AIR, typically the UI is pre-designed and packaged. How does ColdFusion fit in, then?</p>
<p>Use ColdFusion apps directly, use ColdFusion as the data provider, or use ColdFusion as the data provider <em>and </em>as a UI provider.</p>
<p>To use a <strong>CF web app directly</strong>, just wrap it in a frameset. This is so kludgy, I can hardly stand it. But it will work to put your web app in a desktop app at some basic level. I suppose it could be handy since it hides the URL, it can make a more kiosk-ish look. Could also be useful if <em>part</em> of your app is a normal app, but part of it should mimic the web app exactly and you don&#8217;t want to rewrite anything.</p>
<p>Better to use <strong>CF as a data provider</strong>.  ColdFusion is best at connecting with other systems, connecting to remote DBs, etc. Then communicate with web services, XML, flash remoting, JSON.  There is nothing new here, at this point, you just build typical connectivity that AJAX or Flash would use.</p>
<p>Flash remoting would probably be the best when using Flex. Provides a handy proxy-like access to your CFC.  Web services can also be done very easily with Flex.</p>
<p>Now, how about HTML/JavaScript (AJAX) in AIR? CFAjaxProxy, XMLHttpRequest, or plain HTTP (CF returns the data in XML, JSON, or text).</p>
<p><strong>CFAjaxProxy. </strong>Makes a CFC available inside AIR app. Creates a JS proxy for a CF component. So on the CF side, you use cfajaxproxy, point it to a CFC, and instantiate the CFC in JS. Now, some initialization code is required. It is generated by the cfajaxproxy tag. So just copy the literal HTML/JavaScript generated by cfajaxproxy, and drop that into your HTML for AIR (just change the URL to the CFC to be the absolute URL; cfajaxproxy will write it as a relative URL).</p>
<p>It wouldn&#8217;t hurt to just write some basic AJAX code on the web, using cfajaxproxy, and then copy that to your AIR HTML.</p>
<p>Now what about <strong>taking your apps offline</strong>? Well, you&#8217;ll need to identify what is going to work offline, and store offline data (either to the filesystem or to a local database). Decide how the app will go offline: Modal (distinct offline/online mode, user driven, easiest to implement), or modeless (seamless offline/online mode, most of data is stored locally, better user experience but more work for the developer). Then, synchronization strategy: Manual sync, background client-driven sync, or server-driven sync.</p>
<p>Synchronization and online/offline management can be improved. They will describe more at the sneak peak session. Code samples will be at his website, <a href="http://coldfused.blogspot.com" target="_blank">http://coldfused.blogspot.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/leveraging-coldfusion-with-air/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Working With Persistent Data in AIR</title>
		<link>http://blog.crankybit.com/working-with-persistent-data-in-air/</link>
		<comments>http://blog.crankybit.com/working-with-persistent-data-in-air/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 20:43:55 +0000</pubDate>
		<dc:creator>Josh</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://blog.crankybit.com/working-with-persistent-data-in-air/</guid>
		<description><![CDATA[Why care about caching data on the client? There are 3 types of apps out there: Thin Client (HTML/JavaScript to web browser), Thick Client (Word, Excel, etc), Smart Client (RIA, a hybrid between the thick and the thin). Thin client and smart client both allow ease of deployment, but offline capability and access to hardware [...]]]></description>
			<content:encoded><![CDATA[<p>Why care about caching data on the client? There are 3 types of apps out there: Thin Client (HTML/JavaScript to web browser), Thick Client (Word, Excel, etc), Smart Client (RIA, a hybrid between the thick and the thin). Thin client and smart client both allow ease of deployment, but offline capability and access to hardware resources is problematic for the thin client.</p>
<p>AIR allows web technology to be deployed directly to the desktop.  Flex, flash, PDF, HTML, JavaScript, CSS, Ajax.  Always starts with a root document (HTML or SWF). HTML may contain PDF or SWF. Both have renderer, VM, and DOM.  Code between the VMs can interoperate.  All can be display in native OS chrome. And you can persist data locally (hence this preso!).</p>
<p>Storage models: Local shared objects, encrypted local store, file system, embedded SQL database.</p>
<p><strong>Local shared objects.</strong> There are in package flash.net.*.  Used to serialize memory resident data structures. Runs in synchronous mode. This is a monolithic storage model. So it is fine for writing huge amounts of data, but when going to retrieve a single entry out of thousands, can take a proportionately long time.</p>
<p><strong>Encrypted local store.</strong> In package flash.filesystem.*. Used to store sensitive data. Runs in synchronous mode also. All data is serialized using ByteArray. So it&#8217;s like blob storage with keys. A ByteArray is like an in-memory stream of information. So you take an array, put it in a ByteArray, then add the ByteArray to the encrypted local store. This encrypted local store is just this space that is available to you based on the application and user.  And it is faster at accessing the record you want. But the point isn&#8217;t that it&#8217;s faster at accessing records; the point is that it is doing security to make sure no one can read it without authorization.</p>
<p><strong>File system.</strong> In package flash.filesystem.*. Provides random access to file system data. Can be asynchronous or synchronous. Two main components: File and FileStream. File represents a path to a particular file or directory. Completely OS-independent. FileStream does the actual work. Handles binary, object, text data.</p>
<p>Path handling: nativePath(), canonicalize(), resolvePath().</p>
<p>Cataloging: userDirectory(), desktopDirectory(), documentsDirectory(), applicationResourceDirectory(), applicationStorageDirectory(). File info (size, createDate, etc). copyTo(), moveTo(), etc. upload(), download(), send(), etc.  browse(), browseForDirectory(), etc.</p>
<p>FileStream implements the IDataInput/IDataOutput APIs. Can put binary data in &#8212; readBytes(), writeBytes(), readInt(), writeInt(), readDouble, writeDouble, etc.  Can do AMF3/AMF0 object serialization &#8212; readObject(), writeObject().</p>
<p><strong>Embedded SQL Database.</strong>  Self-contained factor is nice. You have no external dependencies; it will work the same on any OS. Each database is stored completely within a single file. Zero setup. No configuration or administration required. It just starts working.  No server process required, no need for an administrator to create the database and user accounts. Handles transactions! Has a large capacity: Theoretical limit of over 2TB.</p>
<p>Package is in flash.data.*. Can be asynchronous and synchronous.  Uses SQLConnection and SQLStatement.</p>
<p>SQLConnection. Establishes connection state, configuration, transactions, schema access. In async mode, also creates its own background thread. So you can create five SQLConnections to run five database operations simultaneously.</p>
<p>SQLStatement. Does CRUD operations. Does parameters, paging, and custom result row data types.</p>
<p>The database functionality is VERY fast. Can work with thousands&#8211;millions&#8211;of records in less than 1 second. Data reads are even faster.</p>
<p>SQLConnection: open(), attach(). The attach() will allow you to run queries on tables across multiple databases. Comes in handy during certain circumstances. Handled not too unlike SQL Server, when you are referencing an external database in your SQL statements.</p>
<p>SQLStatement.getResult() &#8212; Returns a SQLResult object.</p>
<p>SQLResult: data() returns an array of objects that contain each row of the result. complete() indicates if you pulled the whole result set. lastInsertRowID() is self-explanatory. rowsAffected() is also self-explanatory.</p>
<p>Note! Putting data on disk via the database can be slow <em>sometimes</em>. Recognize that it is a 6-step process: (1) Acquire shared lock on the database. (2) Acquire a RESERVED lock on the database. (3) In-memory rollback journal is updated. (4) Contents of rollback journal are physically written to disk. (5) Acquire an EXCLUSIVE lock to the database. (6) Write all modifications for the DB to the disk.</p>
<p>At this rate, you&#8217;re probably only going to get 5-6 database transactions per second.  Maybe as many as 20 on a high-end box. So the key is to put MANY database operations all in a single transaction.</p>
<p><strong>Transactions.</strong> SQLConnection manages the transaction. Use SQLConnection.begin() to start the transaction. Then, commit() and rollback() work as expected.</p>
<p><strong>Storage classes. </strong>There are numbers (int/real), text, and blobs.</p>
<p><strong>Affinity.</strong> Declaring a data type on a column determines the column&#8217;s affinity. You&#8217;re saying, &#8220;I want this field to be stored like this.&#8221; However, if you send a string to a field that should be a number, it won&#8217;t throw an error, it will just put it in there as a string.  Supports ActionScript affinities of boolean, date, int. Next beta should support XML, XMLList, Object, etc.  But currently, you can put arrays or objects in with blob, which will then treat it like a ByteArray.</p>
<p><strong>Introspection.</strong> Access to the table/view, column, index, and trigger information, including the SQL used to create the entity. But you can do selective loading, i.e. I want to see the tables in this database. Just use SQLConnection.loadSchema(). Will return a SQLSchemaResult that has tables, views, triggers, and indexes. These are all arrays of objects with the associated values.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.crankybit.com/working-with-persistent-data-in-air/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

