<?xml version="1.0"?>
<rss version="2.0">
<channel>
	<title>dopefly.com: The Dopefly Tech Blog</title>
	<link>http://www.dopefly.com/techblog/</link>
	<description>Join Nathan Strutz as he shoots the breeze on techie geeky web dev stuff.</description>
	<language>en-us</language>
	<webMaster>mrnate@dopefly.com (Nathan Strutz)</webMaster>
	<pubDate>Mon, 09 Aug 2004 12:00:00 PST</pubDate>
	<lastBuildDate>Fri, 10 Apr 2009 13:04 PST</lastBuildDate>
	<ttl>30</ttl>

	
	<item>
		<title>Front Controller Frameworks Suck</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=309</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=309</guid>
		<description><![CDATA[I always hated them for this one reason. How do you explain this URL:<br/><br/><code>www.example.com/index.cfm?fuseaction=main.default</code>
<br/><br/>What I dislike about that is...<br/><ul>
<li>It's hard for your users to remember or even type</li>
<li>It's ugly to see</li>
<li>Your web stats say everyone visited one page - index.cfm - they had different query strings, but they only visited one page</li>
<li>Your SEO is hurt. How does the googlebot know the difference in importance between the fuseaction query param over any other params? Sure, it's smart, it knows, but it can't <em>really</em> know, you know?</li>
<li>It reduces the number of results in <a href="http://www.google.com/search?q=allinurl%3A.cfm">this search</a></li>
</ul>
<br/>Really, it comes down to your users, their experience, and how they see your application. While it's not as important as your usability, design, content or uptime, it does take away from the overall quality.<br/><br/>So what can be done about this problem? Few have tried, some have succeeded. Here are the strategies that are out there.<br/><br/><ul>
<li>CFM pages everywhere.<br/>This is generally the opposite of using a framework. All of the hassle, none of the benefit.</li>
<li>URL Rewriting. As requests come to the server with an attractive URI, they are translated into whatever your application needs to load it by.<br/>This is a good strategy, and it works well. On Windows with IIS, most of the software is either expensive or buggy, and definitely not portable. On Apache, mod_rewrite is great. Either way, you cannot make a cross-platform solution, meaning URL rewriting on an open source project is a no-go.</li>
<li>Generated CFM pages everywhere.<br/>You have software that spits out static files from dynamic actions in your framework, that call back in to your framework. In our example, a /main/default.cfm page would be generated that may set the fuseaction querystring parameter and invokes the framework. This is a great solution, but I've never heard of anyone putting it to practice. Writing this software is deceptively complex.</li>
<li>The OnMissingTemplate rerouting method.<br/>You link to pages that do not exist, then have an onMissingTemplate handler in your Application.cfc file that redirects requests to your framework with the right parameters. This new URL might look like example.com/main/default.cfm, which doesn't exist, so your onMissingTemplate method fakes like it's the ugly URL and invokes the framework.</li>
</ul>
<br/>Can anyone think of another method of doing it?<br/><br/>Personally, I like the OnMissingTemplate method a lot. The distinct advantage above the URL rewriting method is that this one is portable without installing other software. Of course it doesn't work everywhere, but it almost always will.<br/><br/>In summary, make your users happier and write your next application with a better SES strategy.]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=309</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Tue, 02 Mar 2010 08:09:00 PST</pubDate>
	</item>
	
	<item>
		<title>Basic MVC is a Gateway Drug</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=308</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=308</guid>
		<description><![CDATA[My last blog entry was about <a href="/techblog/entry.cfm?entry=307">how to create the easiest ever MVC application</a>, but looking at it, you have to see where you'll just start repeating things all over the place. I mean, look at this code:<br/><br/><em>/app/controller/main.cfm</em>
<pre>&lt;cfinclude template=&quot;../model/main.cfm&quot; /&gt;<br/>&lt;cfinclude template=&quot;../view/main.cfm&quot; /&gt;</pre>
<br/>Are we going to have to do that for every controller? That's some serious boilerplate stuff that really shouldn't have to be typed every time. What a pain that would be!<br/><br/>So lets see what we can do to fix that. What we need is a generic controller that will do most of the job, most of the time, but allow us to do special work when we need it. I hate to use the &quot;F&quot; word, but I'm going to - this is a Framework. <em>Worse yet</em>, it's your standard run-of-the-mill front controller framework. I know, I hate it too, but hear me out.<br/><br/>There's a real easy, real obvious reason for doing it like that. No, I'm really not a fan, but I do it all the time, right along with everyone else. Let's see what it takes to make our MVC quasi-framework happen.<br/><br/><em>/app/controller.cfm</em>
<pre>&lt;cfparam name=&quot;action&quot; default=&quot;main&quot; /&gt;<br/>&lt;cftry&gt;<br/>&nbsp;&nbsp;&lt;cfinclude template=&quot;controller/#action#.cfm&quot;/&gt;<br/>&nbsp;&nbsp;&lt;cfcatch /&gt;<br/>&lt;/cftry&gt;<br/>&lt;cftry&gt;<br/>&nbsp;&nbsp;&lt;cfinclude template=&quot;model/#action#.cfm&quot;/&gt;<br/>&nbsp;&nbsp;&lt;cfcatch /&gt;<br/>&lt;/cftry&gt;<br/>&lt;cftry&gt;<br/>&nbsp;&nbsp;&lt;cfinclude template=&quot;view/#action#.cfm&quot;/&gt;<br/>&nbsp;&nbsp;&lt;cfcatch /&gt;<br/>&lt;/cftry&gt;</pre>
<br/>Now hitting <em>/app/controller.cfm?action=main</em> includes the main controller, model and view automatically, and if they don't exist, it just ignores them. Easily done, no redundant typing, very little pain.<br/><br/>Congrats, we've just made a framework. It's cheap, but it works.]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=308</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Wed, 24 Feb 2010 16:39:00 PST</pubDate>
	</item>
	
	<item>
		<title>Easiest Ever MVC with ColdFusion</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=307</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=307</guid>
		<description><![CDATA[Slowing down and backing up, this is a very quick introduction to making an <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a> application in ColdFusion.<br/><br/>First, make yourself an appropriate directory structure. Follow along here, it's really simple.<br/><img src="mvc-simple.png" /> <br/><br/>There are <span class="st">a hundred</span> <span class="st">a thousand</span> infinite different ways to go from here. Let's try the most basic way I can think of. Your browser should always hit the controller no matter what, so let's put in an index.cfm to redirect <em>/app/</em> visitors to a default controller, <em>/app/controller/main.cfm</em>.<br/><br/><em>/app/index.cfm</em>
<pre>&lt;cflocation url="controller/main.cfm" /&gt;</pre>
<br/>Now that main.cfm controller file: <em>/app/controller/main.cfm</em>
<pre>&lt;cfinclude template="../model/main.cfm" /&gt;<br/>&lt;cfinclude template="../view/main.cfm" /&gt;</pre>
<br/>And the model: <em>/app/model/main.cfm</em>
<pre>&lt;cfset name = "Nathan" /&gt;</pre>
<br/>Finally, the view: <em>/app/view/main.cfm</em>
<pre>&lt;cfoutput&gt;Hello, #name#!&lt;/cfoutput&gt;</pre>
<br/>That is about as simple as an MVC application can be, and from there, you can begin to enjoy the <a href="http://stackoverflow.com/questions/26685/">advantages of MVC</a>.<br/><br/>You can <a href="mvc-simple.zip">download this very simple MVC app</a>.<br/>]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=307</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Wed, 17 Feb 2010 21:19:00 PST</pubDate>
	</item>
	
	<item>
		<title>Reminder: Talk about the basics (and 6 reasons to do it)</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=306</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=306</guid>
		<description><![CDATA[We tend to forget about the basics. Once we've mastered them, we move on to whatever else interests us. When beginning a learning project, we grow the most, we post the most questions, answers and blog entries, and we talk about our beginner problems the most. Later on, we stop talking about what it's like to get started, and for good reason, we're not getting started. It's out of sight, out of blog.<br/><br/>Take me, for instance. I have become so wrapped up in OO, design patterns, frameworks and extensibility, that I've nearly forgotten there are loads of new developers out there, hoping to learn something from the likes of me.<br/><br/>But big deal, why should we even talk about the basics? Well lucky for the universe, I've compiled this list, because we all love lists.<br/><br/>Talking about the basics...<br/><ol>
<li>Gives you something to blog about<br/><div class="small">I have like 2 posts for the entire year so far. I need some new subjects.</div></li>
<li>Ups your search results ranking, bringing more traffic to your web site<br/><div class="small">And who doesn't want more traffic? Not me, man, I want it all.</div></li>
<li>Increases the stability of the global knowledge on the given subject<br/><div class="small">Maybe esoteric and meta, but it's true. Sometimes old resources go dry, while new ones are usually prettier.</div></li>
<li>Increases the keyword rank<br/><div class="small">Increase the google trends ranking. Increase the general popularity of your subject. Get uninitiated people interested in a "that looks easy" kind of way.</div></li>
<li>Gets uninitiated people interested<br/><div class="small">If you have them saying "Hey, I can do that, it's easy" then you can add to the numbers of those working in your world.</div></li>
<li>Guarantees your high place in the minds of the unknowing<br/><div class="small">Readers like a hero, and you'll like people coming up to you, years later, expressing their gratitude.</div></li>
</ol>
<br/>So with that, I hereby to promise to talk about (at least a few) easier concepts, (at least a little) more often. I'll use this blog to do it. I promise to use my position as a ColdFusion software user's group manager for the benefit of newer programmers and recent and future converts.]]></description>
		<category>General</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=306</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Thu, 11 Feb 2010 20:57:00 PST</pubDate>
	</item>
	
	<item>
		<title>Like puzzle games? iPhone &amp; iPod Touch users, try Relix</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=305</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=305</guid>
		<description><![CDATA[A good friend of mine (and ColdFusion developer [see how I'm on topic {note the stylish use of nested parens}]) at work has been hitting iPhone development on his spare time to come up with this game Relix. I've been playing it tonight and am thoroughly perplexed at some of these puzzles, like level 12:<br/><br/><img src="relix-stuck-12.jpg" />
<br/><br/>It's been fun playing it, and it's only a buck, on the app store now, plus you'll be helping a fellow programmer, one of the 'little guys.'<br/><br/>This should link to it - <a href="http://itunes.apple.com/us/app/relix/id348652616?mt=8">Relix, the puzzle game for iPhone &amp; iPod Touch</a>. Oh, and do check the video, it makes starting off way easier.<br/><br/><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/skKA5PXNPvg&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/skKA5PXNPvg&amp;hl=en_US&amp;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>]]></description>
		<category>General</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=305</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Mon, 04 Jan 2010 19:10:00 PST</pubDate>
	</item>
	
	<item>
		<title>Should CFML have first class properties?</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=304</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=304</guid>
		<description><![CDATA[C# was the first mainstream programming language, to my knowledge, that had full language support for properties, phasing out getters and setters (accessors and mutators). The idea is simple. Here is a property:<br/><br/><pre>
public String Name;<br/></pre>
<br/>This gives your object a public property that can be read and written. The process is similar in Java and ColdFusion, but when the time comes to add functionality to <code>Name</code>, such as calculate the value on the fly, or invalidate a cache when the value changes like I do in <a href="http://paginationcfc.riaforge.org/">Pagination.cfc</a>, you have to graduate this into a getter and setter. In C#, you just have to change the property, keeping your object's interface safe:<br/><br/><pre>
private String _Name;<br/>public String Name {<br/>   get {<br/>      // some code<br/>      return _Name;<br/>   }<br/>   set {<br/>      // some code<br/>      _Name = value;<br/>   }<br/>}<br/></pre>
<br/>Properties inherit simplicity when compared to the standard getter and setter. They give you less typing and fewer interface changes.<br/><br/>It can actually go deeper than that, with property change event listeners and more.<br/><br/>In the Java world, this properties debate has raged for years, and there are opponents and proponents, both shouting angry words at the other side (they call it the JCP). I think it will never happen, Java is a mountain: basically immobile, without an act of God. CFML is a rocket, in comparison. Allaire / Macromedia / Adobe have pushed CFML hard, keeping it current. Much more so with the latest release and the CFML Scripting enhancements.<br/><br/>Adobe ColdFusion 9, which came out a few months ago, blessed us with near magical getter and setter generation, but I wonder if that is not enough. With this feature in place, is it now too late to move the language toward properties? I suppose this becomes a question for (or <em>your<em> potential answers for) the <a href="http://www.opencfml.org/">CFML Advisory Committee</a>: how could it be implemented in CFML, the ColdFusion way?]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=304</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Thu, 03 Dec 2009 16:51:00 PST</pubDate>
	</item>
	
	<item>
		<title>Thoughts on code regeneration - patterns for customizing</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=303</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=303</guid>
		<description><![CDATA[Since Mark Mandel gave his transfer presentation to the AZCFUG last June, I've been contemplating the different ways there are to work with and customize generated code, and especially re-generated code. Here are some patterns I have recognized. Please read and add your own in the comments.<br/><br/>Generic Scaffolding<br/>Something I've said ColdFusion has needed for years, and we're still not there, standard scaffolding creates the model, view and controller on a single database table (not usually much more complicated than that). From there, you have to edit the HTML to make it match your UI, and edit everything else to do what you need it to do. It's rarely correct out of the box. When your database structure changes, you either have to regenerate and reapply your changes, or apply the DB changes to all of your layers by hand.<br/><br/>Styled Scaffolding<br/>If your UI is clean, and the scaffolded UI code (the HTML) is as well, leave the output as is and just style it with CSS. Wrap your own layout around it and you're set. This only accounts for basic changes that you would make.<br/><br/>Transformed Scaffolding<br/>To account for bigger changes, like changing form field types or turning a form into a wizard, you could try running a transformation on the scaffolded output. This works by making a tool that will change the original structure on command, for example string operations on code. It's doable, and I've done it. It works, in a pinch, but it tends to be more work than it is worth. If you end up physically injecting code into an object, there are better ways to go.<br/><br/>Extended Injected Stubs<br/>Extend the generated code with your own objects (or inline includes for HTML). Replace calls to the generated code with calls to your code. It's kind of a make-or-fake-your-own-stub strategy.<br/><br/>Pre-generated Stubs<br/>The Reactor ORM has a neat trick. Reactor generates stub classes that extended the framework's <em>real</em> generated classes. These empty stubs are placed in your playground to put in any code you want, while the tabe definition heavy lifting classes are saved inside Reactor's core file structure. Reactor can then manage the ORM while your stub files are safe. This strategy can work for you, too, except for the two big downsides that ultimately killed* Reactor: folders with potentially huge numbers of generated files and the unweildy nested object structure. CF 6 and 7 especially have trouble keeping performance with the inheritance tree, which, from memory, looks something like:<br/><pre>
reactorObject<br/> reactor.DataObject<br/>   reactor.DAO<br/>     reactor.myTableDAO<br/>       myTableDAO<br/>         myTableDAO_MSSQL<br/></pre>
* No, it's not dead, but had a little bad press and it was hurt bad enough to end up on the outside.<br/><br/><br/>injected Stubs<br/>Mark Mandel's Transfer also generates files and saves them in the internal structure of the framework, but instead of generating a stub, you can configure it to make an arbitrary object of your own the stub. Transfer then injects its generated code into your class, making your inheritance tree very one-dimensional.]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=303</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Tue, 24 Nov 2009 21:15:00 PST</pubDate>
	</item>
	
	<item>
		<title>How to get Adobe ColdFusion for FREE</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=302</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=302</guid>
		<description><![CDATA[There's always all this talk about how ColdFusion costs so much more than the competition. This has of course been <a href="http://stackoverflow.com/questions/760427/what-is-the-career-value-in-learning-coldfusion">debated</a> and <a href="http://www.forta.com/blog/index.cfm/2008/6/2/The-ColdFusion-Pricing-Debate-Revisited">debunked</a>, but still, the truth is, ColdFusion still does cost, whether we're talking about the US$1300 standard version or the US$7500 enterprise version, that's real money that you don't always have to pay. I've got two methods that will give it to you for free, and three methods that will show you how to get it for a severe discount.<br/><br/>Free #1- Visit Adobe.com, download a trial version, install it. When it asks for a serial number, tell it to install the developer version. This is literally everything that the $7500 enterprise version has, yours free forever, no license problems, no hidden fees. The only downside is it's limited to IP addresses - the local computer (for development) and 2 or 3 others for development and testing.<br/><br/>Free #2- Hang out at your local Adobe sponsored user group (CFUGs especially). Twice a year, they give out a software package from Adobe, anything they have for up to around US$2000. You can get your free copy of ColdFusion just by being lucky or entering whatever contests they have. This is actually more viable than it may seem. A few years ago, I won this. Months later, I brought my dad to the group and he won. Oh, and since you'll be there, take time to meet interesting people and learn some CFML.<br/><br/>Cheap #1- Maybe you knew this and maybe you didn't, but you really don't have to buy ColdFusion to run a web site with it. $20 or so a month will give you a great generic hosting account. Develop CF locally for free, deploy remotely for cheap, it's an easy win. Also, these hosted servers usually score the expensive enterprise version, so you can even use those cool advanced features.<br/><br/>Cheap #2- If you do go and buy your own copy of ColdFusion Server, you may not know about the changes to the EULA, or License Agreement, since ColdFusion 9. If you buy just one copy of the server software, that grants you the ability to use that license to install on development, testing and staging servers. That's like 4-for-1, a savings of US$3900!<br/><br/>Cheap #3- If you go all out and buy that US$7500 enterprise license, and there are some good reasons to do that, consider deploying to a cloud environment like Amazon EC2 or the like, because you can deploy your enterprise CF copy on 10 cloud servers. That's a savings of US$67,500! It sure does give you more incentive to try out load balancing and the new multi-server configuration tools that ship with CF9.]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=302</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Thu, 12 Nov 2009 16:40:00 PST</pubDate>
	</item>
	
	<item>
		<title>Should You Go 64 Bit?</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=301</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=301</guid>
		<description><![CDATA[In case you have trouble deciding if a 64 bit operating system is right for you, I give you <a href="http://www.dopefly.com/shouldigo64bit/">Should I Go 64 Bit?</a> which should finish the argument once and for all.<br/><br/>If you buy the upgrade to Windows 7 (which you should), you will be forced to choose - it comes with 2 DVDs, one for a 32 bit install, and one for 64 bits.<br/><br/><a href="http://www.dopefly.com/shouldigo64bit/">Should I Go 64 Bit?</a>  is the quick and dirty answer.<br/><br/>The long answer is more complicated, but I have boiled it down to your computer, if you have 2GB of memory and a 64 bit CPU, take the plunge. The only 2 caveats you may have will be software compatibility (if you have any 16 bit software, it will no longer run in Windows 7 64 bit), and hardware driver compatibility. Chances are, if your hardware is so old as to not work with Windows 7, you need to upgrade anyway, and if your software is so old, you can always virtualize.]]></description>
		<category>General</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=301</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Fri, 06 Nov 2009 17:21:00 PST</pubDate>
	</item>
	
	<item>
		<title>A few miscellaneous upkeep things</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=300</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=300</guid>
		<description><![CDATA[First up, Twitter. Follow me: <a href="http://twitter.com/nathanstrutz">@nathanstrutz</a>.<br/><br/>Second, Facebook: Friend me: <a href="http://www.facebook.com/nathan.strutz">nathan.strutz</a>.<br/><br/>I guess you could have figured that out, though, if you visited <a href="http://hi.im/nathanstrutz">Hi, I'm Nathan Strutz</a>. Hi.Im is very cool.<br/><br/>Finally, MAX. I couldn't talk Boeing into sending me to the annual Adobe MAX conference. I'm not sure I will ever get them to send me anywhere. There is a chance I could hit a conference if I'm a speaker, so I'll be coming up with some kind of presentation that people would like, and maybe try out for a few next year.<br/><br/>There is, however, the Adobe Community Summit, which is held Sunday, October 4th, right before MAX. With the price so very right (free), and the location close enough (L.A.), I'm sure I can get there.<br/><br/>This ACS day happens to run only a week after I bring the family home from 10 days in Alaska. We've got a lot of friends and family to visit, wish us luck with 4 kids on a 6 hour plane ride.<br/><br/>Anyways, if you're an Adobe ACE or UGM, and will be in L.A. in October, make sure to meet me at Community Summit day!]]></description>
		<category>General</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=300</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Tue, 15 Sep 2009 13:01:00 PST</pubDate>
	</item>
	
	<item>
		<title>August 2009 AZCFUG Meeting</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=299</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=299</guid>
		<description><![CDATA[I always forget to blog. There's a quickly growing list of things I have to update every month when we have a new Phoenix ColdFusion User's Group meeting. I did pretty good except for the blog. You see, I have to update...<br/><br/><a href="http://www.azcfug.org/">The AZCFUG Site</a> - It was so out of date, <a href="http://alan.rotherfamily.net/">Alan</a> finally replaced the text with some boilerplate stuff and links to our other sites. Some day, we'll have real content here.<br/><br/><a href="http://groups.adobe.com/groups/47494a5161/summary">AZCFUG on Adobe Groups</a> - We are using this because it's a pretty nice app, and does everything we wanted, but we hate the extra-long URL.<br/><br/><a href="http://azgroups.org/">AZGroups.org</a> - I update our schedule here via a <a href="http://www.google.com/calendar/embed?src=0tv5dsidduqjmdfgie3kif56ig%40group.calendar.google.com&ctz=America/Phoenix">shared Google Calendar</a>.<br/><br/><a href="http://twitter.com/nathanstrutz">My status on Twitter</a> - just to pimp the event.<br/><br/><a href="http://www.dopefly.com/techblog/">This Blog</a> - which I was just saying I forget about far too often.<br/><br/>Then, if it's a particularly exciting meeting, I may also advertise it on various mailing lists, etc.<br/><br/>Anyways, sorry, where was I?<br/><br/>Oh man, tonight, <a href="http://corfield.org/blog/">Sean Corfield</a> presenting <a href="http://www.getrailo.org/">Railo</a>. I'm really excited to see what's in this new version and what's coming next. It's tonight at the UAT building in Tempe, AZ. If you're not in the area, you can <a href="http://experts.na3.acrobat.com/azcfug082009/">tune in at 6:30 PM PST via Adobe Connect</a>.]]></description>
		<category>AZCFUG</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=299</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Wed, 26 Aug 2009 14:38:00 PST</pubDate>
	</item>
	
	<item>
		<title>IE6 No More applied to my web site</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=298</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=298</guid>
		<description><![CDATA[Here's just a note to mention that I put the <a href="http://www.ie6nomore.com/">IE6 No More</a> banner on my web site. It was dead simple, dropped it right into the top of my layout and it shows up on every page. If you have a web site, I recommend you do it too!<br/><br/><img src="dopefly-ie6-no-more.png" />]]></description>
		<category>Standards</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=298</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Wed, 05 Aug 2009 11:26:00 PST</pubDate>
	</item>
	
	<item>
		<title>Less CSS - how CSS should have been!</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=297</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=297</guid>
		<description><![CDATA[Has anyone else seen <a href="http://lesscss.org/">Less - Leaner CSS</a>? Let me sum it up for you. It goes like this:<br/><br/><blockquote>WHAT IS WRONG WITH THE W3C?</blockquote>
<br/>And you can take that one to the bank.<br/><br/><br/>Seriously though, Less is an app built in Ruby that lets you write CSS in a <em>reasonable</em> fashion, which it will compile into unreasonable standard CSS.<br/><br/>And what is reasonable for CSS? Where is it that the W3C has failed us so terribly? Less' feature set says it all: variables, mixins, nested rules and operations. You'll probably have to see it to believe it, but once you see it, you'll get it. Go ahead, visit the <a href="http://lesscss.org/">Less CSS</a> site, just the home page shows you everything.<br/><br/>My only problem with it is that it's Ruby. I don't have anything in particular against Ruby, I just don't want to install it or figure out how to use it to start coding with Less.<br/><br/>So where does that leave me?<br/><br/>1) Rewrite it in a language I like more<br/>2) Suck it up, use Ruby<br/>3) Recompile it with jRuby<br/>4) Run it with HotRuby (translate into Javascript)<br/><br/>Until then, I guess I will just be dreaming about it.<br/><br/>]]></description>
		<category>Standards</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=297</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Fri, 24 Jul 2009 20:37:00 PST</pubDate>
	</item>
	
	<item>
		<title>I got the iPhone</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=296</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=296</guid>
		<description><![CDATA[Last month before our AZCFUG meeting, we (the UGMs and ACEs of the Phoenix area) were hanging out with <a href="http://blog.digitalbackcountry.com/">Ryan Stewart</a> (<a href="http://www.adobe.com/go/ryanstewart">who has an adobe go link now</a>) at Four Peaks Brewery. It became quickly obvious that only <a href="http://www.brooks-bilson.com/blogs/rob/">Rob Brooks-Bilson</a> (<a href="http://en.wikipedia.org/wiki/Rob_Brooks-Bilson">who has his own wikipedia entry</a>) and myself were on dumbphones. Rob picked up his iPhone that following weekend. I held out for 2 more weeks (hey, we had a baby, cut me some slack). My wife & I had planned to upgrade to something, I was leaning towards Android, but, thanks to HTC's mediocre Android devices and my employer's fantastic corporate rates with AT&T, we switched and I got an iPhone 3GS.<br/><br/>I've had it for a couple weeks now, and I've got to say, wow. This thing is great. Really. Everyone should have one. From the seamless phone and ipod controls to the connectivity and web browsing abilities, to the apps and games available, it's been really, really fantastic.<br/><br/>One thing I like the most is that it's easily a hundred devices in one. With nothing added, it's a great phone, navigation system, media player, web browser, PIM and camera. That's just brushing the surface, and of course doesn't cover the thousands of apps you can download, many for free.<br/><br/>Case in point: This last weekend we wanted to play mini-golf with the fam. Alanda (my wife) found an indoor place in North Phoenix - 113 is hot enough to stay indoors! Using the camera and Facebook app, I dropped an adorable picture of Aubri (1 yr, our 3rd child) owning the course. From there, we wanted food. Thanks to the iPhone, we were at in-n-out burger in 5 minutes. Finally, we had to get back to Alanda's Dad's camp trailer. Thanks to the map, we saved at least 20 minutes of driving. As we wound through Fountain Hills, I showed Alanda the Zillow application. She was having so much fun as it showed her the estimated prices of all the houses we drove by, live, as the app tracked us on a map with the iPhone's GPS.<br/><br/>I was especially impressed with how I could buy the device and never need to plug it in to a computer. You can download music, podcasts, movies, apps, games, everything without even owning a PC to plug it into. You'll probably want to, but you don't have to this time. This is in contrast to how my iPod Video was simply a sattelite of the media in iTunes on my desktop.<br/><br/>Repeated conclusion: Everybody should have one. Really.]]></description>
		<category>Life Events</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=296</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Thu, 23 Jul 2009 07:53:00 PST</pubDate>
	</item>
	
	<item>
		<title>The Easy Super-Bean</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=295</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=295</guid>
		<description><![CDATA[With CF being OO enough, beans can have a super-type, a common base that all beans share, like genetics for business objects. It's easy to make one.<br/><pre>&lt;cfcomponent extends=&quot;superbean&quot;&gt;</pre>
But what do we put in there?<br/><br/>My biggest hatred about beans is the getters and setters. It's a lot of typing. If you have snippets, that helps. If you have a bean generator, that's better. It's also a big problem if you have to change them (think: adding logging, validation, etc.), or worse re-generate after you've added custom code. So the way to fix the whole lot of these is employing ColdFusion 8's OnMissingMethod.<br/><br/>I know we've seen it before. My favorite probably comes from <a href="http://www.objectiveaction.com/Kevin/index.cfm/2009/1/27/onMissingMethod-and-Abstract-Object--Part-2">Kevin Roche's Abstract Object post</a>. That's basically what I'm playing with.<br/><br/>In my playing around, I've got a base bean with an onMissingMethod defined that will catch getters and setters. Here's an illustration:<br/><br/><img src="superbean-1.png" alt="Illustration of bean hierarchy - generic base bean with concrete type" />
<br/><br/>The _genericGet() and _genericSet() methods were added so that any extending bean can, say, overwrite just the setter for all the properties in a bean or a parent type of another bean. In fact, I would recommend that overriding coders "decorate" the _generic methods, calling the super-action before or after any custom operations.<br/><br/>Benefits of this design, other than the obvious lack of need to type getters and setters, is that the concrete bean can hold any property, plus, I can rename the getters and setters to <code>obj.Name(&quot;Nathan&quot;).name();</code> which would return <code>Nathan</code> - somewhat of a jQuery style trick. Another cool thing is that if you wanted to create your own getter or setter for a property, the _generic methods will search for your function and call that instead.<br/><br/>To illustrate:<br/><br/><pre>(in component user, extends BasicGenericBean)<br/>function getName(){return &quot;Bob&quot;}<br/><br/>(Outside, calling methods on the object)<br/>user.setName(&quot;Nathan&quot;);<br/>user.getName(); // returns Bob</pre>
<br/>Also, I added an init() constructor method that will populate the bean's properties with any arguments passed in.<br/><br/>Taking the design further, I wanted to let the developer specify what properties the bean has via the cfproperty tag.<br/><br/><pre>&lt;cfcomponent extends=&quot;GenericBean&quot;&gt;<br/>   &lt;cfproperty name=&quot;Name&quot; type=&quot;string&quot; /&gt;<br/>&lt;/cfcomponent&gt;<br/><br/>user.setName(&quot;Nathan&quot;);<br/>user.setNumberOfGoats(16); // throws error: NumberOfGoats does not exist in User.<br/></pre>
<br/>Then, I thought about adding some optional subtypes for the generic bean. What if I want to track the history of changes to the bean, so it would be easier to do a database update? What if I wanted to put the database update right in there, in a very generic way? This is completely possible.<br/><br/><img src="superbean-2.png" alt="Illustration of bean hierarchy - base bean, history tracking bean, database enabled bean, with concrete types" />
<br/><br/>So there's my design, something to play with at least, and maybe base your model on too. Download the files all together in 1 zip with some test front-ends just to see them in action. CF8+ only! <a href="superbeans.zip">Download Nathan's Super Beans</a>.<br/>]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=295</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Mon, 08 Jun 2009 21:54:00 PST</pubDate>
	</item>
	
	<item>
		<title>Where is the ColdFusion+Java application model?</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=294</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=294</guid>
		<description><![CDATA[What happened to the early days of using Java as the model for a ColdFusion-based MVC application? We used to talk all about CF w/Java but I don't hear it anymore. At best, it's rare. I like to keep my ear to the ground in the CF world, and this one has quietly slipped off the radar.<br/><br/>I guess there are only a few likely demises:<br/><ol>
<li>The buzz has faded and we all forgot about it</li>
 <li>It's being used everywhere and no one talks about it anymore because it bores us</li>
 <li>Java is too hard to write for the average CF programmer</li>
 <li>The integration is too bothersome, the gain is not worth overcoming</li>
</ol>
Regardless, it probably comes down to the fact that some shops have done it, and are now quiet about it, the rest ignore it completely. So in order to spur on the conversation a little, to see what went wrong, see if it's worthwhile anymore, and dream about what it could be, let's think for a bit...<br/><br/><strong>OO ruined my business</strong>
<br/>A good amout of the conversation lately has been that OO is too hard and CF's implimentation of it is too awful to use realistically. I don't actually think so, but it does limit us some. <a href="http://www.halhelms.com/blog/index.cfm/2009/5/31/Who-the--is-Marc-Funaro-and-Whats-Wrong-With-Him">Hal Helms's main argument</a> is that the computation costs of instantiating CFCs is too great, and I agree, it slows down after a few dozen objects, and crawls after a few thousand. Multiply times 5 if you have execution time debugging on. Obviously Java's implementation of objects doesn't have this issue, especially with <a href="http://en.wikipedia.org/wiki/POJO">POJO</a>s, the simpler the better.<br/><br/>So what if the solution to Hal's problem is <em>partially</em> using Java? Even if it's just for those objects that we might create thousands of instances of, the improvement could be huge.<br/><br/>That's possible today, but it's not as simple as we need it to be.<br/><br/><strong>Dreaming</strong>
<br/>We know that in CF, <code>createObject("component","com.myCFC")</code> will make ColdFusion to check a variety of locations for that object. First one it finds, wins. What if you could just create a .java or .class file and call it in the exact way you call a cfc using CF's smart path finding senses. I'm honestly surprised that we can't do this yet. For me, personally, this would quickly and easily bridge MOST of the gap.<br/><br/><strong>Failing</strong>
<br/>The problem actually runs much deeper even. Say I want to use my CFCs to run queries. I don't want to hunt down JDBC drivers. I don't want to script my sql calls. I don't want to worry about a thread pool and persistent connections. I don't want to work too hard. I just want to say </code>&lt;cfquery&gt;select * from my_table&lt;/cfquery&gt;</code> and have it work every time. <em>CFQuery is and always has been the killer feature of ColdFusion</em>.<br/><br/>So I like my data access layer in CF, but maybe I want my services or beans or what have you in Java, for speed. I want to call <code>myService.getMyData()</code>. The service calls a cfc to get the data, then populates a bean or returns a query or whatever. Problem is, <a href="http://www.bennadel.com/blog/331-How-Do-I-Call-Methods-On-ColdFusion-Components-In-Java.htm">Java can't call methods on a CFC</a>! <strong>No, I'm not kidding. Try it.</strong> Oh, and yes, I know about the cfc gateway, an asynchronous method for Java to call CF - and <strong>no</strong>, that doesn't count. Yes it's great and powerful, but that's just not it.<br/><br/><strong>Purgatory</strong>
<br/>So it looks like the only way to truly integrate Java into our CFC model is to either replace, package-by-package, entire areas of your model-or the entire model-, or only provide one-way objects, that is, Java objects that will never need to call a CFC or anything in CF at all.<br/><br/>Replacing your model is doable for some shops, especially with large Java teams, and is probably indispensable for a handful of them. For the rest of us, we just love our precious <code>cfquery</code>! I think <em>the real heros in this space</em> seem to be <a href="http://www.barneyb.com/barneyblog/category/java/">Barney Boisvert</a>, who is always blogging about integration with hibernate and groovy, and <a href="http://www.compoundtheory.com/">Mark Mandel</a> with his JavaLoader project.<br/><br/>The one-way objects may work pretty well, but then we've got the classpath and instantiation annoyance still.<br/><br/>The way I see it, <strong>integrating Java with your CFC back-end is broken</strong>, and it's going to take a lot of &quot;brilliant&quot; (yes, a dig at Adobe marketing) to make it work.<br/>]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=294</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Fri, 05 Jun 2009 21:08:00 PST</pubDate>
	</item>
	
	<item>
		<title>Microsoft is on fire</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=293</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=293</guid>
		<description><![CDATA[Somehow, Microsoft is the new hotness, hitting nearly every shot they throw out there. According to my favorite game (well, from 1994) NBA Jam, the're on fire.<br/><br/>Windows 7<br/>It's Vista. It just is. It took like a year for them to make it, which is nothing in comparison to Vista's decade dev cycle. They didn't re-do anything, and it's not faster, but the fact is, it's what people want, and they're loving it. The only negative things I've heard are from those who are trying to run it on their macs. Hah!<br/><br/>Bing<br/>Stealing, err, rebranding basically everything from Live Search, Microsoft comes through with a word that people like ("Let me Live Search that for you") and a searching experience that, for some unknowable reason, people like. Google may have the first competition since destorying Yahoo all those years ago. Personally, I'm not convinced, but people are talking.<br/><br/>.NET becoming superior<br/>The programmers have been the core of Microsoft for a long time, but it wasn't until the recent .NET framework 3.5 (and service pack 1) that they gave them Linq and MVC. These tools are finally something on par and superior to the competing Java platform. The quick movement of both C# and VB.NET have thrown these languages much closer to the top of the "cool" stack.<br/><br/>XBOX 360<br/>Ok, second to Nintendo's invincible Wii is a fantastic place to be. The recent exclusive content is a real winner, and the games are head and shoulders above anything from Sony, aside perhaps from Little Big Planet. Further, their just-announced Natal project, which essentially gives you the Minority Report interface for your TV, is just, well, "Ka-boom" (in my best NBA Jam announcer voice).<br/><br/>Of course Microsoft has a number of smaller successes, things that have really started to go right but aren't as big. The XBOX update with mii-like avatars, Netflix on the XBOX and Media Center, and the re-invigoration of the browser war, giving us IE8, which, if nothing else, sucks less than IE7 and 6.<br/><br/>That doesn't mean everything they do is the bomb. I'm not about to go out and buy a Zune or a Windows Mobile phone, I'm just making observations.]]></description>
		<category>General</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=293</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Thu, 04 Jun 2009 08:14:00 PST</pubDate>
	</item>
	
	<item>
		<title>Calling functions with a dynamic name</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=292</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=292</guid>
		<description><![CDATA[For a while now, the CF community has been stumbling around the concept of calling a dynamic function. Well, as it turns out, ColdFusion is more functional that it may seem on the surface. Let's have some fun with what, at first, seems like a difficult problem.<br/><br/>Let's say we have a method that receives the name of another method as an argument: <code>myStaticFunction(&quot;myDynamicFunction&quot;)</code>. Now what? First, here's the methods (I haven't checked any of this, so let's call it pseudo-code.<br/><br/><pre>function myDynamicFunction(){return true;}<br/><br/>function myStaticFunction(methodName) {<br/>    methodName(); // fails for calling a string like a function<br/>    variables[methodName](); // fails for a syntax error - []() = bad cfml!<br/>    // umm, now what?<br/>}</pre>
<br/>So here we are in the same old spot. First, the old school method, the one easily turned to in time of need, the cfinvoke tag. Personally, I dislike the cfinvoke tag. It seems to take me out of my flow. It ruins my mojo. It's like longhand syntax for CF - it's somewhat of an oxymoron. Nevertheless, here's what you would do:<br/><br/><pre>&lt;!--- First, note that we have to rewrite it in tags. Not awful, but I dislike the switch. ---&gt;<br/>&lt;cffunction name="myStaticFunction"&gt;<br/>    &lt;cfargument name="methodName" /&gt;<br/>    &lt;cfset var methodResult = "" /&gt;<br/>    &lt;cfinvoke method="#methodName#" returnvariable="methodResult" /&gt;<br/>    &lt;cfreturn methodResult /&gt;<br/>&lt;/cffunction&gt;</pre>
<br/>This works, but there's got to be a better way! There has to be a less cheap way, something without all the #'s and stuff. And there is:<br/><br/><pre>
// back to cfscript, yay!<br/>function myStaticFunction(methodName) {<br/>    var method = variables[methodName];<br/>    return method();<br/>}<br/></pre>
<br/>That's much more like it! Of course this assumes we're in a cfc or something, where the method is in the variables scope. Now, what other magical things can we do?<br/><br/>Well, I wasn't going to share this one until the next entry, but since you're talking me into it, here it is with onMissingMethod, dynamically calling a method with dynamic arguments. This onMissingMethod attempts to call a getter when you just call the property - in other words, <code>user.name()</code> will be automatically translated into <code>user.getName()</code>, to give you a nice jQuery type of syntax:<br/><br/><pre>function onMissingMethod(missingMethodName, missingMethodArguments) {<br/>    var f = 0;<br/>    if (structKeyExists(variables, "get" & arguments.missingMethodName)) {<br/>        f = variables["get" & arguments.missingMethodName];<br/>        f(argumentCollection=arguments.missingMethodArguments);<br/>    } else {<br/>        // choke!<br/>    }<br/>}</pre>]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=292</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Wed, 27 May 2009 23:12:00 PST</pubDate>
	</item>
	
	<item>
		<title>Cheating with the 'ol dynamic language function alias trick</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=291</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=291</guid>
		<description><![CDATA[One of my favorite little tricks to play with CF, and with other dynamic languages like it, is aliasing function names.<br/><br/>Let's say you have a component, <code>User</code>, and a method, <code>getIsUserNameValid()</code>. It's a &quot;getter&quot; in order to satisfy some other kind of style requirement, but writing it out is verbose and feels wrong:<br/><pre>if (user.getIsUserNameValid()) {...}</pre>
<br/>You have to leave it as is so you don't break any existing method calls, and to keep the basic style guidelines, but what if you could cheat a little? Consider this:<br/><br/><pre>&lt;cfset variables.isNameValid = variables.getIsUserNameValid /&gt;<br/>&lt;cfset this.isNameValid = this.getIsUserNameValid /&gt;</pre>
<br/>In ColdFusion, this creates an alias in the private &quot;variables&quot; scope as well as the public &quot;this&quot; scope to the old method. Now you can change your call to:<br/><pre>if (user.isNameValid()) {...}</pre>]]></description>
		<category>ColdFusion</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=291</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Fri, 08 May 2009 11:08:00 PST</pubDate>
	</item>
	
	<item>
		<title>Start Eclipse faster with -initialize</title>
		<link>http://www.dopefly.com/techblog/entry.cfm?entry=290</link>
		<guid>http://www.dopefly.com/techblog/entry.cfm?entry=290</guid>
		<description><![CDATA[There was some good discussion today on the <a href="http://groups.google.com/group/cfeclipse-users">CFEclipse Users email list</a> about getting Eclipse to start up faster, and I offered this suggestion:<br/><br/>Run this command when you log in to your workstation:<br/><pre>eclipse -initialize</pre>
<br/>According to the <a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/running_eclipse.htm">most complete reference I could find on Eclipse's command-line arguments</a>, the initialize command:<br/><br/><blockquote>Initializes the configuration being run. All runtime related data structures and caches are refreshed. Handy with shared installs: running Eclipse once with this option from an account with write privileges <strong>will improve startup performance</strong>.</blockquote>
<br/>The emphasis was mine, and for good reason. It really works!<br/><br/>In a very cheap experiment, using the windows clock as my stopwatch, I closed my open Eclipse (version 3.5, galileo M6), waited about a minute, then started it again. My PC took a full 60 seconds to load my workspace again.<br/><br/>I closed it, and called eclipse with <code>-initialize</code> through a windows shortcut. The initialize command doesn't really seem to do anything, and it took about 5 seconds to complete. After that, I waited 30 seconds and started Eclipse again, this time it took 16 seconds! Closed it, started it, 16 seconds again!<br/><br/>I guess I would have to reboot to get a cold start time, which is more than I'm prepared to do for today's little blog post. I really don't know what -initialize does under the hood, but wow, what a difference it can make.<br/>]]></description>
		<category>IDEs and tools</category>
		<comments>http://www.dopefly.com/techblog/entry.cfm?entry=290</comments>
		<author>mrnate@dopefly.com (MrNate)</author>
		<pubDate>Fri, 10 Apr 2009 13:46:00 PST</pubDate>
	</item>
	

</channel>
</rss>
