Thanks to all the people that follow mytweets and blog posts. 2010 hasn't been the greatest of years for me personally but here is to 2011 being a lot better! (with more posts)
CFTextMate has a new temp home at cftextmate.andyjarrett.co.uk.
How come?
I am a massive TextMate fan on the Mac and and one of its strengths is in its extensibility and bundles. CFTextMate has always been a great add-on for working with CFML files but fell short when editing the new scripted components. Luckily Russ Johnson had figured out how to edit the main bundle and get some basic highlighting working. From here I wanted to take it a step further and update the bundle which is when I started down this path.
So where am I:
The bundles have been updated so with some changes so you can download and check them out here.
So what now?
Though I am going to do my best to update the bundles this is still my first foray in to this kind of development so if anyone else wants to actively help the grab the code from Github, give it go, and send me a PULL request!. I am also looking at a complete re-rewrite from the ground up so I can split out CFML tags and CFML script for better management. Though at the moment I don't know whether that is the right direction to go? Generally there is still a lot of work to be done and depending on which route the project goes down will depend when the next update is out. For now at least it has a home and a way for the community to follow the project.
Chatting with AJ Mercer this morning (his evening) on getting redirect() to work in the Application.cfc for Framework One (FW/1). The code being he was using looked perfectly fine:
As I said this looked fine and works in the controllers but in the Application.cfc we just saw "&fw1pk=[some number]" appended to the URL. The fix was quite simple. The variable/structure RC is set as a shortcut to the Request.Context for the controllers but in the Application.cfc you need to reference Request.Context directly. The meant the above code changed to:
and all worked fine.
As a side note the fix for this came from it being such a simple framework to hack in to and see whats happening over others with multiple core files and components. Recently my work ethics has changed a lot and in its place 2 components now stand, convention over configuration and simplicity both of which FW/1 fits the bill. So if you haven't spent 30 minutes looking at it do so and also check out the Google group at http://groups.google.com/group/framework-one
CFEclipse has released version 1.3.6 earlier. All bug fixes no new features on the 1.3.5 release. You can read more at http://www.cfeclipse.org/update/web/doc/intro/doc/new.html
I sometimes forget how useful/powerful RegEx can be. Take the following bit of CFIF logic
[sourcecode language="plain"] <cfset username = trim(form.uname) />
<cfif len(username) LT 4> <cfset errorMsg = "Your username is too short" /> <cfelseif NOT reFindNoCase("[\w]", username, 1, "false")> <cfset errorMsg = "Your username is too short" /> </cfif> [/sourcecode]
A quick regex guide: the "\w" reference stands for "word character", which translates to [A-Za-z0-9_] n.b.the underscore as well
You can actually add on to the regex and at the same time cut down a lot of the logic by doing the following:
[sourcecode language="plain" gutter="true" toolbar="true" wraplines="true"] <cfif NOT refindnocase("[\w]{4,}", username, 1, "false")> <cfset errorMsg = "Usernames must be 4 characters in length and contain [A-Za-z 0-9 _" /> </cfif> [/sourcecode]The key is "{4,}". Using the curly braces to specify a specific amount of repetition of "word characters" and is equivilant to "len(username) LT 4"
With the annual release of Eclipse Galileo the CFEclipse team have pushed out its latest release of CFEclipse 1.3.4!.
This update brings compatibility with Eclipse 3.4 and Eclipse 3.5 along with:
Available from the update site get it now http://www.cfeclipse.org/update
Please update your bookmarks and feeds for my site.
I now have a Mango Blog at:
http://www.andyjarrett.com/blog
Feed URL: http://feeds.feedburner.com/andyjarrett
In the first part of this 2 parter I mentioned the differences between the 2 ColdFusion plugins for Eclipse that are out there. Here I have put them into one zip file for you to download and install, it really couldn't be easier to check out the CF environment "everyone is using"*
Update: After a quick read of the EULA from Adobe, it appears that I was being a little naughty by bundling them together. Hence the quick removal/update of the original post (anyone who got here first was lucky). That doesn't mean that you still can't have a cracking CF dev environment. The zip I produced was files taken from 2 sources: Eclipse 3.3 and the ColdFusion Extensions for Eclipse and the CFEclipse download section of the site.
This post is in two parts as I realised it's probably not good to bombard you with one longgggg post. The second part (which is the reason this post even exists) is about a new zip file that I have put together so you can download CFEclipse and Adobe CF Extensions in one go. This post first off covers the difference between them so you know what you are getting and why you want it;
Incase you don't know the CF Extensions are very different to the CFEclipse plugin for Eclipse but both are essential for your CF development environment.
Update: This appears to be on a different port for others. As Jax pointed out you can go: Eclipse, select Help -> Help contents to get there as well :o)
I was just going into some help files of Aptana when I came across the local address for the Eclipse Help system at: http://127.0.0.1:58041/help/index.jsp
In there was a wealth of information I just didn't know was on my hard drive ... though I suppose it depends on what plug-in's you've got installed but for me I had: