<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Simon Horwith&apos;s Blog - Flex</title>
			<link>http://www.horwith.com/index.cfm</link>
			<description>Editorials, technical papers, and fleeting thoughts from a web development dinosaur turned IT Executive.</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 07:49:06 -0400</pubDate>
			<lastBuildDate>Tue, 11 May 2010 17:40:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>simon@horwith.com</managingEditor>
			<webMaster>simon@horwith.com</webMaster>
			
			
			
			
			
			<item>
				<title>A Few Thoughts About Various Programming Languages</title>
				<link>http://www.horwith.com/index.cfm/2010/5/11/a-few-thoughts-about-various-programming-languages</link>
				<description>
				
				In my role leading development shops, I am constantly having to learn and evaluate new programming languages and tools in order to keep us current as well as in order to discover better ways to accomplish goals. As a developer, I am also constantly learning simply because I want to get better at what I do, I love what I do, and learning new languages is a fun and rewarding undertaking. From time to time, someone writes a blog entry or gives a conference presentation about the importance of knowing more than one language... of not being a &apos;one trick pony&apos;. I was reading Sean Corfield&apos;s recent blog post about Clojure and realized that I&apos;ve never written about my recommendations or opinions of various languages that I&apos;ve used or evaluated... until now. In no particular order, here are several of the technologies that I know and my thoughts about them:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Python
&lt;ul&gt;&lt;li&gt;I&apos;ve recently been spending a decent amount of time learning and using Python - it&apos;s very fast and powerful, and is syntactically one of the most concise and elegant languages I&apos;ve ever seen... it&apos;s VERY readable and the more I use it, the more I like it. Python is definitely one of my favorite languages.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Java
&lt;ul&gt;&lt;li&gt;I&apos;ve used Java off and on since 1995, and somehow keep ending-up having to use it on projects from time to time. The language has gotten larger, faster, and for the most part, better over the past decade and a half - I found the language improvements in Java 5 particularly useful in that they clearly tried to make it easier to do what you want in your code. That said, I don&apos;t find Java programming particularly clever or challenging and on many projects I see, deployment is a terribly painful process. Java applications tend to have ridiculous file/directory structures and I&apos;m not a huge fan of how strict it is. Java is everywhere and does have a huge job market, so it&apos;s worth knowing for those reasons... but it would never be my first choice of languages to use based on any merits other than the large talent pool and number of open source projects.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;PowerShell
&lt;ul&gt;&lt;li&gt;Powershell is probably the coolest new thing I&apos;ve seen in a long time. For those of you unfamiliar with it - it&apos;s a fully OO scripting environment for Windows (runs on .NET) and is free from Microsoft. The syntax is slick and simple, and the power you can pack into a single line of code makes it a no-brainer for anyone who needs or wants to administer a Windows network or machine. With powershell, windows finally has a shell that&apos;s better and more powerful than those available on nix systems. Bottom line: if you use Windows you REALLY should learn Powershell.
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;PHP
&lt;ul&gt;&lt;li&gt;PHP is yet another free technology - we use PHP and CF for most of our projects, and I like PHP a lot. A long time ago, some people called PHP &quot;poor man&apos;s ColdFusion&quot;... well, I think it&apos;s more true today than it was back then. It&apos;s simple, lightweight, and fast... and development times really aren&apos;t much longer than with CFML provided you&apos;re not trying to do something that CF does out of the box that there&apos;s no PHP module to do. I don&apos;t see it having many advantages over CF aside from price, the huge talent pool, and the number of open source projects. There&apos;s a good job market for PHP but those jobs don&apos;t typically pay as well, so I&apos;d learn it because of it&apos;s popularity but I wouldn&apos;t choose a career focused exclusively on it. 
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;Flex/ActionScript
&lt;ul&gt;&lt;li&gt;I&apos;ve used Flex since beta 1, and I enjoy seeing how it evolves with each new release. I don&apos;t particularly like programming with ActionScript for the same reasons I don&apos;t like Java - but unlike Java, I do love the end result you get with Flex... enough to want to do it. No technology to date that&apos;s tried to compete with Flash has been compelling enough to use in lieu. There&apos;s also a great job market for Flex - especially here in New York City, and it&apos;s one of the top 3 or 4 technologies I&apos;d recommend learning to anyone who wants a successful web development career right now.  
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;ColdFusion
&lt;ul&gt;&lt;li&gt;I&apos;ve used CF since the beginning and continue to use it heavily. It&apos;s not the best performing technology available but it performs well enough for most needs. No, it&apos;s not free, but development/debugging time is rapid enough to easily justify the cost. These days, CF&apos;s closed architecture and code base is a real turn-off for me personally, but it&apos;s the lack of talent (and the poor quality of most &quot;talent&quot;) that is it&apos;s only solid turn-off from a business perspective. The native support for Flex is probably its most compelling unique feature... that, and it&apos;s rapid development nature. It&apos;s a good choice when you want a very robust user-friendly platform in a turn-key solution. 
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;

&lt;li&gt;LISP
&lt;ul&gt;&lt;li&gt;LISP is, hands down, personally my favorite language. Five or six years ago I set-out to spend 6 months of my free time teaching myself LISP, and I enjoyed it so much that I just never stopped. The syntax took a little getting used to, and emacs takes even longer to get used to - which is probably the most annoying part of learning LISP (I haven&apos;t found a better free IDE for LISP yet). LISP is beautiful in the simplicity of its design - most notably in the interchangeable nature of code and data. It is definitely the most expressive and flexible language I&apos;ve used - as well as the most powerful. Be warned; it takes a while to un-train yourself and learn how to really harness the power of LISP (particularly of macros and, if you&apos;re new to it, thinking in functional terms). I also, surprisingly, find the implementation of OOP in LISP (CLOS) much nicer and cleaner than that of any other language. I strongly recommend learning LISP. Not because there&apos;s a huge job market for it (there isn&apos;t) but because it puts other languages into perspective and because it WILL make you a better developer (I&apos;ve learned more from &apos;tinkering&apos; with LISP than any other language). 
&lt;/li&gt;&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

So, those are the main languages I&apos;ve played with and developed feelings for recently (within the past 2 years). It&apos;s worth noting that there are other languages I left off for brevity. I&apos;ve also been getting back into JavaScript these days - I have a new appreciation for it&apos;s functional nature and closures, and I think JQuery is pretty slick. I&apos;ve taken a pretty good look at Objective C - it&apos;s a decent language but not worth learning unless you want to do a lot of Apple development. I&apos;ve also played around with Clojure - which is essentially a pseudo-LISP implementation for the JVM - I liked it, but prefer to use &apos;pure&apos; LISP... though it&apos;s attractive being able to write LISPy code that I can run on a JVM, since Java is everywhere. There are a few other languages I haven&apos;t had time to take a good enough look at yet but hope to very soon. Specifically, I&apos;m interested in looking at Scala and Caml... and I&apos;ve begun learning some Haskell and hope to dig into that a little deeper.
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Java</category>
				
				<category>Misc</category>
				
				<category>PHP</category>
				
				<category>LISP</category>
				
				<pubDate>Tue, 11 May 2010 17:40:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2010/5/11/a-few-thoughts-about-various-programming-languages</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Apple vs. Adobe</title>
				<link>http://www.horwith.com/index.cfm/2010/4/9/apple-vs-adobe</link>
				<description>
				
				Apple Wins :(&lt;br /&gt;
&lt;a href=&quot;http://www.googlefight.com/index.php?lang=en_GB&amp;word1=Adobe&amp;word2=Apple&quot;&gt;http://www.googlefight.com/index.php?lang=en_GB&amp;word1=Adobe&amp;word2=Apple&lt;/a&gt;&lt;br /&gt;
Yes, that really is all I&apos;m going to say about the current Apple/Adobe war... except for a big shout out to Lee Brimelow for speaking his mind (&lt;a href=&quot;http://theflashblog.com/?p=1888&quot;&gt;http://theflashblog.com/?p=1888&lt;/a&gt;).&lt;br /&gt;Right on, Lee!
				
				</description>
				
				<category>Flex</category>
				
				<category>Misc</category>
				
				<category>AIR</category>
				
				<pubDate>Fri, 09 Apr 2010 14:43:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2010/4/9/apple-vs-adobe</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Flex Camp Wall Street in New York Next Week</title>
				<link>http://www.horwith.com/index.cfm/2009/11/13/flex-camp-wall-street-in-new-york-next-week</link>
				<description>
				
				If you&apos;re a Flex developer in New York and don&apos;t know about it yet, there&apos;s a 2 day Flex Conference called &apos;Flex Camp Wall Street&apos; (&lt;a href=&quot;http://flexcampwallstreet.com/&quot;&gt;http://flexcampwallstreet.com/&lt;/a&gt;) on November 16 and 17 that at $49 to attend, looks like a great deal for attendees (what else can you do in New York for less than $50??)&lt;br /&gt;&lt;br /&gt;
I&apos;ll be presenting on ColdFusion/Flex integration at the conference on Monday.
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Writing and Presenting</category>
				
				<category>AIR</category>
				
				<pubDate>Fri, 13 Nov 2009 12:34:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/11/13/flex-camp-wall-street-in-new-york-next-week</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Figleaf Takes Adobe Training Online</title>
				<link>http://www.horwith.com/index.cfm/2009/10/23/figleaf-takes-their-adobe-training-online</link>
				<description>
				
				Fig Leaf Software (&lt;a href=&quot;http://www.figleaf.com&quot;&gt;http://www.figleaf.com&lt;/a&gt;, an award winning Adobe Training Partner, is taking their training online - they&apos;re offering free training via the web for several Adobe products. Nice job, guys!&lt;br /&gt;You can register and find out more at: 
&lt;a href=&quot;http://training.figleaf.com/tutorials/&quot;&gt;http://training.figleaf.com/tutorials/&lt;/a&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Misc</category>
				
				<category>AIR</category>
				
				<pubDate>Fri, 23 Oct 2009 10:16:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/10/23/figleaf-takes-their-adobe-training-online</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Is Adobe the Next Microsoft?</title>
				<link>http://www.horwith.com/index.cfm/2009/8/6/is-adobe-the-next-microdoft</link>
				<description>
				
				Adobe could be the next Microsoft... and that&apos;s not necessarily a compliment. Today, ZDNet News published an article titled &quot;Is Adobe the next (pre-2002) Microsoft?&quot; in which they compare the rising number of security holes being found and exploited in Adobe Flash Player and Adobe Acrobat Reader with the problem Microsoft had with vulnerabilities being exploited in their products years ago. It was so bad that among many circles, suggesting Microsoft products as a solution to whatever requirements you needed to meet was grounds for public humiliation. Their products were known targets and it was understood by many that using certain MS software was risky. No software is really 100% safe, but Microsoft took it seriously and became very proactive about addressing the (technical and image) issue both internally before software is released and publicly when a vulnerability is found. The article does give Adobe credit for being proactive and doing a reasonable job addressing vulnerabilities when they&apos;re found, but doesn&apos;t hide an opinion that Adobe still has a way to go.&lt;br /&gt;&lt;br /&gt;
The ZDNet article is online at &lt;a href=&quot;http://news.zdnet.com/2100-9595_22-329118.html&quot;&gt;http://news.zdnet.com/2100-9595_22-329118.html&lt;/a&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Misc</category>
				
				<category>AIR</category>
				
				<pubDate>Thu, 06 Aug 2009 12:02:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/8/6/is-adobe-the-next-microdoft</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Joint Meeting Between NY CFUG and NYFLEX UG Tomorrow Night!</title>
				<link>http://www.horwith.com/index.cfm/2009/6/9/joint-flex-and-cf-user-group-meeting-in-new-york</link>
				<description>
				
				For the benefit of anyone in NY who hasn&apos;t seen the email blasts, the NY Flex User Group and the NY ColdFusion User Group are holding a joint meeting tomorrow night (Wed. Jun 10th, 2009 at 6:30) for the Adobe User Group Tour.  Ben Forta will be present for half the night on Centaur (ColdFusion 9) and Bolt (the new CF IDE) and for half the night on Flash Builder 4 (Flex 4).  Should be a great evening.&lt;br /&gt;&lt;br /&gt;
The meeting is at:&lt;br /&gt;
New York Medical Center&lt;br /&gt;
550 1st Ave., Corner of E. 31st Street.&lt;br /&gt;
in the Smilow Seminar Room&lt;br /&gt;&lt;br /&gt;
Hope to see many of you there!
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Writing and Presenting</category>
				
				<category>AIR</category>
				
				<pubDate>Tue, 09 Jun 2009 18:04:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/6/9/joint-flex-and-cf-user-group-meeting-in-new-york</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Nylon Technology is Currently Hiring in New York</title>
				<link>http://www.horwith.com/index.cfm/2009/5/20/nylon-technology-is-currently-hiring-in-new-york</link>
				<description>
				
				Despite what they say about the economy, Nylon Technology has a pretty stacked pipeline and is going through a growth stage. I&apos;m looking for Flex developers primarily, but we also have demand for ColdFusion and PHP experience.  We&apos;re open to contract and full-time arrangements but candidates must be able to work on site in New York. If you, or anyone you know, is interested, email me your resume, availability, type of work you&apos;re looking for, and rate/salary requirements at shorwith@nylontechnology.com.
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Misc</category>
				
				<category>AIR</category>
				
				<pubDate>Wed, 20 May 2009 13:46:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/20/nylon-technology-is-currently-hiring-in-new-york</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>FigLeaf Cancels Top Gun Conference</title>
				<link>http://www.horwith.com/index.cfm/2009/5/14/figleaf-cancels-topgun-conference</link>
				<description>
				
				FigLeaf has cancelled their scheduled top gun conference (&lt;a href=&quot;http://training.figleaf.com/topgun/&quot;&gt;http://training.figleaf.com/topgun/&lt;/a&gt;). From the conference homepage:&lt;br /&gt;
&quot;Unfortunately we were not able to meet our attendance quota.&lt;br /&gt;
We&apos;ll be announcing other exciting training events, however, in July 2009.&quot;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Writing and Presenting</category>
				
				<category>AIR</category>
				
				<pubDate>Thu, 14 May 2009 17:59:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/14/figleaf-cancels-topgun-conference</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion Architecture For RIAs - Part 4</title>
				<link>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-4</link>
				<description>
				
				This is the fourth (and last) entry in a series of blog posts I&apos;m writing to demonstrate ColdFusion in a RIA architecture. In the first entry, I introduced the simple CF version of an address book application. In the second, we looked at how to use the built-in CF 8 features to create a version of that application that uses AJAX to improve user experience. The third installment illustrated how a Flex application could be used to leverage the existing ColdFusion application logic while delivering a user experience that is far superior to what you can easily do with HTML and JavaScript. In this last installment, I am going to show how, with a few modifications to my lovely Flex UI and a little mapping on the server, I can use my existing CF application as the model provider for LiveCycle Data Services, and take my Flex application to the next level.&lt;br /&gt;&lt;br /&gt;
We&apos;ll begin by talking about what changed on the client. For the most part, the code is the same. One change is that I&apos;m now getting my data from a DataService tag (rather than a RemoteObject tag) - this tells Flex to talk to my LCDS data service to get data. I disabled autocommit in the DataService - if I didn&apos;t, edits to grid rows would be automatically committed on the server for me with no additional work on my part. I turned it off in order to show how you can manually handle commits. Beneath the grid are buttons to commit or rollback all of the changes you make in the grid - each button simply calls a method on the dataservice (appropriately named &quot;commit()&quot; and &quot;revertChanges()&quot;). That&apos;s right - commit/rollback functionality without writing any actual code - nice!. What&apos;s nicer is that now I can open multiple clients and browse the application, and changes made by one client immediately reflect in the grid for all other clients, and if I try to edit a grid row that another client edits at the same time, it handles that conflict for me, too - no additional client code required.  Wow... thank you, DataServices! There are two other small changes in the client code. First, to initially populate the grid using a DataService, you actually tell the dataservice to &quot;fill()&quot; the ArrayCollection you want to populate (again - this is simpler than handling a Remote Object result event). The other change worth noting is that I added the [Managed] MetaData tag to the DTO - this tells Flex that LCDS is managing these objects on the server for me (yes, you still also leave in the [RemoteClass] directive for mapping data types, too). OK, so the client is even more robust, and was made so with less effort. Surely, this must mean I did more work on the server? Let&apos;s see.&lt;br /&gt;&lt;br /&gt;
The 4 ColdFusion Components from the first version of the application are all still intact in the LCDS version - and none of the 4 were changed in any way yet again. Again, I have added a 5th CFC, &apos;facade.cfc&apos;... only my facade cfc contains a lot more code than the facade for my &apos;simple&apos; Flex version. This is because in order for LCDS to expose all of that cool functionality to Flex - the ability to retrieve all of the objects, add/edit objects, handle conflicts, paginate, etc. - you must in turn expose this same functionality to LCDS from your server side application (my facade.cfc in this case). The two questions you may be asking are &quot;What methods do you have to expose to LCDS?&quot; and &quot;How does LCDS know what methods to call and what to pass them?&quot;.&lt;br /&gt;&lt;br /&gt;
First, LCDS. LiveCycle Data Services works by passing requests to a user defined &quot;destination&quot; - remoting in CF works this way, too. A default CF installation has a &quot;ColdFusion&quot; destination defined in it&apos;s remoting services XML file which points at the CF Server root (so you can call any CFCs on the server) - in the case of LCDS we add a destination to our data-management-config.xml file. The LCDS destination contains a lot more information than a typical remoting destination, though. If you&apos;re using CF as the data provider, you want to specify the &quot;coldfusion-dao&quot; adapter for your destination (make sure you&apos;ve enabled it first) and define the communication channels - for real time it&apos;s &quot;cf-dataservice-rtmp&quot; and for polling it&apos;s &quot;cf-polling-amf&quot;. You then specify the component that the destination will use - in my case it&apos;s the full package name to my facade CFC. You have to specify, in a &apos;metadata/identity&apos; node of the destination, the name of the property in your CFCs that is the unique identifier - this is used by LCDS for edits, conflict handling, etc. You also have a few properties you can define for the fill method (the method that gets all records) and there are other properties of the destination you can define, but for the most part, that&apos;s all you have to do. When you write Java code to talk to LCDS, in the destination you can specify the names of all the various methods to call (as well as some properties of those methods) but in the case of CF, LCDS is hard-wired to use reserve method names on the CFC you specified. So there&apos;s really very little to do to configure LCDS for CF. All the &quot;work&quot;, as I suggested earlier, is in the component you point your destination at... so let&apos;s take a look at what I did in facade.cfc.&lt;br/&gt;&lt;br /&gt;
As I said, all of the original CFCs were left in tact - we need only expose the right functionality and data to LCDS from one CFC (facade) using reserve method names - that facade (often refered to as an Assembler) talks to my other CFCs. One thing to note is that LCDS will pass a change object (or an array of change objects) to many of these methods. That change object has methods to tell you if this is an add, edit, or delete, and has methods for getting the old data and the new data (the old and new DTOs). The methods LCDS expects and a brief description of each are as follows:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;fill&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Returns all entries as an array of DTOs&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;get&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Gets one DTO - receives a structure containing the unique id of the DTO to return&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;sync&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Sync accepts an array of change objects - for each one, the sync method passes the change object to the appropriate action method (add/edit/delete method). Those &apos;action&apos; methods return the new DTO (or old if there&apos;s a conflict or some business rule failure) which is placed in an array that the sync method ultimately returns.&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;count&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Tells LCDS how many DTOs there are.&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;create&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Receives a change object, creates the new DTO, adds that to the newVersion property of the change object, marks the change object as &apos;processed&apos;, and then returns the change object&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;update&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Receives a change object and compares it&apos;s old DTO with the matching live DTO to make sure there isn&apos;t a conflict (resulting from trying to edit a DTO that another client already edited) - if there is, it flags the conflict in the change object. If there isn&apos;t, it commits, adds the new DTO to the change object, and returns it.&lt;/li&gt;&lt;/ul&gt;
&lt;li&gt;&lt;strong&gt;delete&lt;/strong&gt;&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Receives a change object and checks to see if that DTO was already deleted (in which case it flags the change object as &apos;failed&apos;). If it wasnt, the method performs the delete, adds the deleted ID to the change object to flag it as deleted to all other clients, and marks the change object as processed.&lt;/li&gt;&lt;/ul&gt;
&lt;/ul&gt;&lt;br /&gt;
All of this might seem like a lot of work, but if you download the code (&lt;a href=&quot;http://www.horwith.com/downloads/abook-lcds.zip&quot;&gt;http://www.horwith.com/downloads/abook-lcds.zip&lt;/a&gt;) and take a look at the facade, you&apos;ll see that it&apos;s actually fairly simple to implement - especially given the  functionality it allows you to drop-in to your Flex/LCDS applications. That zip file also includes the Flex LCDS code, and the config file for my LCDS server destination. If you&apos;re comfortable working with CF, using it as a provider to LCDS allows you to build very rich clients in Flex without having to struggle with client code. You could, of course, use this facade to introduce many of the same features to &quot;regular&quot; CF applications as well.&lt;br /&gt;&lt;br /&gt;
I hope these past 4 blog entries were useful for folks. Here are the links to the various versions of the code:&lt;br/&gt;
&lt;a href=&quot;http://www.horwith.com/downloads/abook-cf.zip&quot;&gt;Regular CF Version&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.horwith.com/downloads/abook-ajax.zip&quot;&gt;CF AJAX Version&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.horwith.com/downloads/abook-flex.zip&quot;&gt;Flex Version&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.horwith.com/downloads/abook-lcds.zip&quot;&gt;LCDS Version&lt;/a&gt;&lt;br /&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>AIR</category>
				
				<category>Downloads</category>
				
				<pubDate>Thu, 07 May 2009 14:41:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-4</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion Architecture For RIAs - Part 3</title>
				<link>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-3</link>
				<description>
				
				This is the third of a series of four blog entries I&apos;m writing to demonstrate CF in a RIA architecture. In the first entry, I introduced the simple CF version of an address book application. In the second, we looked at how to use the built-in CF 8 features to create a version of that application that uses AJAX to improve user experience. Although in order to create a better user experience in each version of the application I&apos;m writing a good deal of client code, the purpose of this exercise is to examine how much refactoring/effort is needed on the server-side to support the UI changes. In this, the third installment, I am now going to replace the CF driven HTML front-end with a Flex application.&lt;br /&gt;&lt;br /&gt;
Note, I was a little lazy and kept the code and the runtime files in the default Flex Builder directory structure. As with the AJAX version, for this version of our address book application we have two objectives: re-use what we can from the first version of the code (&lt;a href=&quot;http://www.horwith.com/downloads/abook-cf.zip&quot;&gt;http://www.horwith.com/downloads/abook-cf.zip&lt;/a&gt;) and offer some RIA benefits/characteristics by using Flex for the front end. You can download this code at &lt;a href=&quot;http://www.horwith.com/downloads/abook-flex.zip&quot;&gt;http://www.horwith.com/downloads/abook-flex.zip&lt;/a&gt;. To test, first extract the zip file to a web root served by ColdFusion. If you haven&apos;t run the first version of the application on your server yet, you&apos;ll want to download and follow the instructions for that application in order to configure your database and datasource. You can browse the application simply by browsing the &quot;bin-debug/main.html&quot; file in the &quot;abook-flex&quot; directory created when you unzipped the compressed file, though depending on how your environment is set-up you may need to recompile the source. The interface is now extremely different (duh, it&apos;s Flex, not HTML).  The A-Z links are now A-Z buttons (I could have taken a &quot;prettier&quot; approach but this suffices for my needs) and there&apos;s a &apos;show all&apos; button. Like I said, buttons aren&apos;t the pretties way to do this in Flex (nor the fastest, in all likelihood) - I just threw them in there like that real fast. The address book entries are all displayed in a pretty data grid. I could have easily paginated it but don&apos;t mind the default scrollbar behavior for data sets this small. You can edit entries inline in the data grid, but I didn&apos;t take the time to add delete or &apos;add new&apos; functionality, though it wouldn&apos;t be much effort to do so. You may notice (though in an app. this small you also may not) that the data loads a little quicker than it did with the AJAX/HTML versions. That&apos;s largely due to the fact that Flex is smart (and sneaky) about when it draws things, and partly due to the performance benefits you get out of the box by using AMF (Flash Remoting) to talk with CF. Definitely a nicer interface.&lt;br /&gt;&lt;br /&gt;
So how did the server side code need to be modified? First let&apos;s look at the old server (CF/AJAX) UI. For starters, all of the &apos;.cfm&apos; files are gone - replaced with a single &apos;.mxml&apos; file that is our application. This file has a datagrid, populated when the app initializes, for displaying all of the entries, and functions for asking the server for the entries, adding a new, empty row (add), handling edits, and for filtering the displayed entries.  Basically - it&apos;s a grid populated by an ArrayCollection, with a few UI elements and some functions for passing elements of the ArrayCollection back to the server. There&apos;s also a class (a data transfer object in the &apos;dto&apos; directory) that represents an address book entry - the ArrayCollection is actually an array of these. Note that the DTO class file has a [RemoteClass] metatag - this maps my server-side addressbookentry object to the AddressBookEntry AS class so my custom object types translate seamlessly back and forth. Sorting and filtering is more efficient than in the prior 2 versions of this application, as Flex has native support for filtering and sorting content on the client.&lt;br /&gt;&lt;br /&gt; 
The 4 ColdFusion Components from the first version of the application are all still intact in the Flex version - and none of the 4 were changed in any way yet again. What has changed is the addition of a 5th CFC, &apos;facade.cfc&apos;, which is a simple implementation of the facade pattern. Like the facade in the AJAX version, this CFC accesses the user&apos;s address book the simplest way possible - by directly referencing the session scope. There are only 2 methods (and barely any code) in the component - one method for retrieving all entries and one for adding/editting an entry. Though I haven&apos;t been as diligent in trying to optimize both approaches as I possibly should be, in my opinion integrating a Flex UI with CF is much simpler and more straight forward than with an AJAX front end.&lt;br /&gt;&lt;br/&gt;
Though this Flex application really doesn&apos;t do Flex justice in terms of it&apos;s capabilities, it does do a decent job reflecting how much more robust the interface can be and how much simpler it is to integrate ColdFusion with a rich client written with Flex.&lt;br /&gt;&lt;br /&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>AIR</category>
				
				<category>Downloads</category>
				
				<pubDate>Thu, 07 May 2009 14:36:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-3</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion Architecture For RIAs - Part 2</title>
				<link>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-2</link>
				<description>
				
				This is the second of a series of four blog entries I&apos;m writing to demonstrate CF in a RIA architecture. In the first entry, I introduced the simple CF version of an address book application. In this installment, we&apos;ll examine what changes need to be made to that code base in order to make it work using an AJAX client.&lt;br /&gt;&lt;br /&gt;
I&apos;ll begin by stating that, to keep with the Adobe technology theme, the AJAX functionality that ships built-in to CF 8 was chosen. These CF AJAX server enhancements were fairly well received by the CF developer community and from what I can tell were very well received by Adobe&apos;s CF clients, and I don&apos;t think anyone was surprised to see AJAX support added to the server. That said, my personal experience with the CF 8 AJAX functionality so far has left a bad taste in my mouth - at least with regards to the tags that generate an AJAX UI. As soon as you need to make them do something that isn&apos;t natively supported via the tag attributes, developers find themselves banging their head against the wall. It&apos;s that same old &quot;trying to fit a square peg into a round hole&quot; feeling that I run into from time to time with frameworks, CMS products, and even CFML itself on some occasions. There are a lot of excellent AJAX libraries out there and in my experience developers are often times better off downloading, learning, and using one of those... but I digress.&lt;br /&gt;&lt;br /&gt;
For this version of our address book application we have two objectives: re-use what we can from the first version of the code (&lt;a href=&quot;http://www.horwith.com/downloads/abook-cf.zip&quot;&gt;http://www.horwith.com/downloads/abook-cf.zip&lt;/a&gt;) and offer some RIA benefits/characteristics by taking advantage of ColdFusion AJAX support. You can download this code at &lt;a href=&quot;http://www.horwith.com/downloads/abook-ajax.zip&quot;&gt;http://www.horwith.com/downloads/abook-ajax.zip&lt;/a&gt;. To test, first extract the zip file to a web root served by ColdFusion. If you haven&apos;t run the first version of the application on your server yet, you&apos;ll want to download and follow the instructions for that application in order to configure your database and datasource. You can browse the application simply by browsing the &quot;index.cfm&quot; file in the &quot;abook-ajax&quot; directory created when you unzipped the compressed file. You&apos;ll notice a few differences in the interface. The address book entries are all displayed in a pretty JavaScript grid. The entries are paginated for you, with nice navigation controls for moving around the pages... moving from page to page does not require refreshing the page in your browser. The A-Z links are still there, and work as before, but again we no longer refresh the page. The &quot;Add Entry&quot; button now displays a virtual window with a form, that you can submit, drag around, or close. Also, the &quot;Edit&quot; links have vanished - you can edit records directly inside the grid that displays them. Definitely a nicer interface.&lt;br /&gt;&lt;br/&gt;
So how did the code need to be modified? First let&apos;s look at the UI. For starters, the &apos;entry.cfm&apos; file from the first version has been deleted and the form moved into a CFWINDOW in index.cfm for in-line use. Index.cfm has an ajaxproxy at the top, so we can communicate with the server from JS. The HTML table has been replaced with a CFGRID which gets it&apos;s data via the &apos;bind&apos; attribute. Several JavaScript functions, all which very simple, were added to the page - primarily for refreshing the grid (via methods of the ColdFusion.Grid object) and for interacting with the add entry window (via methods of the ColdFusion.Window object). At the bottom of the page, the CF8 ajaxOnLoad()  function is called to populate the grid when the page loads.&lt;br /&gt;&lt;br /&gt; 
The 4 ColdFusion Components from the first version of the application are all still required for the AJAX version - and none of the 4 were changed in any way. What has changed is the addition of a 5th CFC, &apos;addressbookintrepretor.cfc&apos;, which is a simple implementation of the facade pattern. This CFC accesses the user&apos;s address book the simplest way possible - by directly referencing the session scope. Not a practice I generally encourage, but acceptable in a facade. There are 5 remote methods in the component - 3 of which just accept data and pass it to the address book (for deleting, adding, and editting entries). There&apos;s one entry that simply returns the current entry count (based on a filter) since the AJAX UI can no longer just reference the recordcount of whatever query is being displayed. The fifth method is the getEntries method which is used to populate (and re-populate when filtering) the data grid. This is the only method that actually has any AJAX-specific code in it - it takes the array of objects, converts it to a query, then returns the result of operating on that query with the CF 8 &apos;queryConvertForGrid()&apos; function.&lt;br /&gt;&lt;br /&gt;
The interface is inherentely a little prettier and the user experience is definitely more pleasant. If you&apos;ve never used the CF AJAX functionality before, it takes a little while to add the code needed for this version - and if you don&apos;t know JavaScript at all it will take even longer... but for an application this simple anyone should be able to do what I did in a few hours (anywhere from 2-6 hours) with little prior experience.  Were the enhancements worth the extra time? I don&apos;t really know, you tell me. What I will say is that since I&apos;d written all the server side code and a simple HTML version already, I thought it was realistic to expect that I&apos;d have time to add a nice interface for deleting gridrows and to write code to elegantly handle making the grid refresh and resort whenever I clicked on a header or add/edit/delete entries. Clickable headers alone is trivial, but as soon as you throw all the CRUD functionality into the mix, the amount of effort required increases to a number that, in my opinion, isn&apos;t worth it.&lt;br /&gt;&lt;br /&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>AIR</category>
				
				<category>Downloads</category>
				
				<pubDate>Thu, 07 May 2009 14:34:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-2</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>ColdFusion Architecture For RIAs - Part 1</title>
				<link>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-1</link>
				<description>
				
				This is the first of a series of four blog entries I&apos;m writing to demonstrate CF in a RIA architecture. Each entry will take a &quot;plain&quot; ColdFusion application and show how it was necessary (or not) to modify the code to handle the requirements of a &quot;Web 2.0&quot; application. This first entry is an overview of traditional vs. next-gen web applications and is an introduction to the &quot;plain&quot; CF application that will be the starting point for the other three &quot;Web 2.0&quot; applications I describe in the next three posts.&lt;br /&gt;&lt;br /&gt;
The necessity to deploy Rich Internet (or &quot;Web 2.0&quot;) Applications is a fact of life these days. They often deliver better ROI and competitive advantage, and today&apos;s web citizens expect and sometimes even demand a better user experience. The flash platform is, at least without a doubt in my mind, the ideal platform for delivering these applications. Some companies and developers prefer to use AJAX - and if it does what they want then that&apos;s fine for them. I&apos;m not writing to debate the merits of one technology versus another (not today, anyway). What I want to write about is the impact that this has on the architecture of a typical ColdFusion application.&lt;br /&gt;&lt;br/&gt;
On several occasions in the past years I&apos;ve written about the role of CF, in the context of next generaion web apps, changing from that of a &quot;presentation server&quot; that is also capable of performing business logic to that of a &quot;service provider&quot;. For the most part this is true in the case of &quot;Web 2.0&quot; applications - except for those scenarios where CF is generating the RIA presentation layer (i.e. CF is creating the code for an AJAX front-end using the new CF8 CF-AJAX tags or is dynamically generating other AJAX or possibly Flex interfaces). Even then, though filling the role of presentation server, let&apos;s assume for argument&apos;s sake that CF is also filling the role of service provider. So how does all this impact the architecture of your CF application?&lt;br /&gt;&lt;br /&gt;
We&apos;ll start with a very simple address book application written entirely in CF. You can download this code at &lt;a href=&quot;http://www.horwith.com/downloads/abook-cf.zip&quot;&gt;http://www.horwith.com/downloads/abook-cf.zip&lt;/a&gt;. To test, first extract the zip file to a web root served by ColdFusion. To set-up the application as-is, run the &quot;create-sql-server-db.sql&quot; file against a SQL Server 2005 database, then run &quot;create-db-tabls.sql&quot; against that database... create a datasource in the CF Admin named &quot;abook&quot; that points to the new database, then browse &quot;populate-db.cfm&quot; to populate your new database. All of the database related files are in the &quot;build-db&quot; directory created when you unzip the zip file. You can browse the application simply by browsing the &quot;index.cfm&quot; file in the &quot;abook-cf&quot; directory created when you unzipped the compressed file. There&apos;s nothing &quot;Web 2.0&quot; about it. There&apos;s a .cfm that shows all the entries in our address book, with links to filter by first letter of last name and links to edit records, and there&apos;s a .cfm that displays a form for adding and editting address book entries. There are also 4 ColdFusion Components, which are the &quot;meat&quot; of the application:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;addressbook.cfc - represents an address book&lt;/li&gt;
&lt;li&gt;addressbookentry.cfc - a data transfer object (DTO) representing an address book entry&lt;/li&gt;
&lt;li&gt;addressbookdao.cfc - the parent class of all address book Data Access Objects (DAOs)&lt;/li&gt;
&lt;li&gt;addressbookmssqldao.cfc - the address book DAO containing all the CRUD methods for SQL Server&lt;/li&gt;
&lt;/ul&gt;
Not only is there nothing &quot;Web 2.0&quot; about this code, but I should also state for the record that I had no intent of using it in a &quot;Web 2.0&quot; environment. It was actually written as part of an object orientation code exercise I conducted at Nylon Technology. This fact only makes it an ideal candidate for use in illustrating the impact of leveraging &quot;legacy&quot; code in next-generation applications. All of the data is cached in the session scope - the idea being that when a user logs-in, their address book(s) are loaded into the session scope and synchronization with the database actually happens behind the scenes. It&apos;s worth mentioning that to keep things simple I&apos;ve taken 2 shortcuts. First, there&apos;s no actual log-in... in the real world you&apos;d force a log-in and, at that time, select the address book IDs for all the address books owned by the current user. Second, since there&apos;s no log-in, the code is hard-wired to assume that for any request the address book ID from the database is 1. You can see this defined in the Application.cfc &quot;onSessionStart&quot; method.&lt;br /&gt;&lt;br /&gt;
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>AIR</category>
				
				<category>Downloads</category>
				
				<pubDate>Thu, 07 May 2009 14:28:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/5/7/ColdFusion-Architecture-For-RIAs-Part-1</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Registration is now open for the FigLeaf &apos;Top Gun Conference&apos;</title>
				<link>http://www.horwith.com/index.cfm/2009/3/27/top-gun-registration-is-open</link>
				<description>
				
				Once upon a time, the very talented folks at FigLeaf Software offered &apos;Top Gun&apos; Training. In recent history, they began an annual &apos;Flex Maniacs&apos; conference which became the &apos;Web Maniacs&apos; conference. This year they&apos;ve resurrected the &apos;Top Gun&apos; naming and re-branded the conference as the &apos;CF &amp; Flex Top Gun Conference&apos;, which is actually 3 one day conferences back to back. Day 1 is CF and AIR, day 2 is CF and Flex for Newbies, and day 3 is Flex and AIR.&lt;br /&gt;&lt;br /&gt;
Registration is now open - you can get one day passes for $199 or a 3 day pass for $499. Registration is online at &lt;a href=&quot;https://training.figleaf.com/topgun/registration/index.cfm&quot;&gt;https://training.figleaf.com/topgun/registration/index.cfm&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;
These days I&apos;m very selective about what conferences I endorse and even more selective about which conferences I&apos;ll attend. I&apos;m happy to say that I will be attending and speaking at the top gun conference, as I feel that of all the conferences this year, it&apos;s the best deal out there for the developers.
				
				</description>
				
				<category>Flex</category>
				
				<category>ColdFusion</category>
				
				<category>Writing and Presenting</category>
				
				<category>AIR</category>
				
				<pubDate>Fri, 27 Mar 2009 16:21:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/3/27/top-gun-registration-is-open</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Flight of the Conchords (and more)... streaming to a Flash Player near you</title>
				<link>http://www.horwith.com/index.cfm/2009/3/3/time-warner-partners-with-adobe</link>
				<description>
				
				Adobe and Time Warner announced a strategic partnership yesterday (&lt;a href=&quot;http://news.cnet.com/8301-17939_109-10186110-2.html&quot;&gt;http://news.cnet.com/8301-17939_109-10186110-2.html&lt;/a&gt;) which included the announcement that HBO will be relaunching their site with heavy use of Flash.&lt;br /&gt;&lt;br /&gt;
Sweet.
				
				</description>
				
				<category>Flex</category>
				
				<category>Misc</category>
				
				<pubDate>Tue, 03 Mar 2009 15:13:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/3/3/time-warner-partners-with-adobe</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Zend Releases PHP Application Server</title>
				<link>http://www.horwith.com/index.cfm/2009/2/19/Zend-Releases-PHP-Application-Server</link>
				<description>
				
				Zend released a PHP Application Server beta today called &quot;Zend Server&quot; - &lt;a href=&quot;http://www.zend.com/en/products/server/&quot;&gt;http://www.zend.com/en/products/server/&lt;/a&gt;. It looks interesting, especially given the recent addition of AMF support to the Zend framework. I hope to find time to &quot;play&quot; with it in the very near future and, when I do, will post about my thoughts and experiences with the product. I&apos;d also be curious to hear what experiences other people have with it.&lt;br /&gt;&lt;br /&gt;
How does this affect ColdFusion? To be honest, I won&apos;t be surprised to see some companies decide to use the Zend Server instead of CF - simply because it&apos;s PHP (not to say that there aren&apos;t some benefits inherent in that fact). That said, I don&apos;t see it as a technical competitor to ColdFusion because the decision to use one application server over another &lt;em&gt;should&lt;/em&gt; be based on the features of that platform - the Zend Application Server appears to be a vanilla server out of the box whereas CF is integrated with dozens of features. Having support for these same features on the Zend Server would require writing or downloading the PHP code necessary for that functionality and then integrating it into the server environment. Of course, business decisions about software and programming languages aren&apos;t always based entirely on 100% sound technical merit.&lt;br /&gt;&lt;br /&gt;
If you&apos;re in the New York area, next month Ricky Robinett will be giving a presentation on Flex integration with the Zend Application Server at the New York Flex User Group (&lt;a href=&quot;http://www.nyflex.org&quot;&gt;http://www.nyflex.org&lt;/a&gt;).
				
				</description>
				
				<category>Flex</category>
				
				<category>PHP</category>
				
				<pubDate>Thu, 19 Feb 2009 12:18:00 -0400</pubDate>
				<guid>http://www.horwith.com/index.cfm/2009/2/19/Zend-Releases-PHP-Application-Server</guid>
				
			</item>
			
		 	
			</channel></rss>