Cheat Sheets by Pete Frietag

I just rediscovered a sweet list of Cheat Sheets at Pete Freitag's blog. I find the cheat sheets very helpful for syntactical questions for common tasks. The list is fairly extensive and covers 30+ topics:

There are extra links at the bottom of the post...Thanks Pete!

Update: Nick Tong maintains another good list of cheetsheets

So you want more tutorials?

I am going to continue the 'So You Wanna Create a Model Glue Application series. (Thanks Lola ;) For those just tuning in, the Contact-O-Matic is a simple example of a mini-application using ModelGlue and ColdSpring. The tutorials on the Contact-O-Matic go through the code line by line showing how to perform such tasks as:

  1. Set up the frameworks
  2. Build a View
  3. Place your CSS and JS files
  4. Create a form
  5. Validate a submitted form and persist the data
  6. Return success/error messages
  7. Resolve CFC dependancies with ColdSpring
  8. Create Instance Objects with factories
  9. Refactor, as needed

The Contact-O-Matic is not an example of a Best Practices- Enterprise application. This is due to the simple nature of the program. We simply have a list of contacts, a mechanism to add and edit contacts, and a way to remove contacts. As Object Models grow complex in complex applications, it is important to note that there is no perfect Object Model, only the least annoying set of tradeoffs. I want the code in the Contact-O-Matic to remain simple, and so it shall.

Our next move is to integrate Transfer ORM into our application. The next set of posts will cover installation and testing of the Transfer ORM Framework, the inclusion of another 'Contact-O-Feature' in our application as well as some Architectural Techniques.

Pragmatic Snippets

Previously, I showed my top seven snippets. Let us use some of the snippets together to make a new component. To follow along, you should install the snippets.

Next, we will consider our output. We will design a form bean component for a user management form consisting of the following values:

  • Email
  • FullName
  • Status
  • Username

Create a new component called snippet.cfc. Paste the four attributes listed above three times in snippet.cfc . Your file should look like the one below:

view plain print about
1<cfcomponent>
2            
3            Email
4            Fullname
5            Status
6            Username
7
8            Email
9            Fullname
10            Status
11            Username
12
13            Email
14            Fullname
15            Status
16            Username
17        
18        
19        </cfcomponent>

[More]

Seven snippets for highly effective developers

I like to think a lot about Rapid Development. Programming I find to be very enjoyable. I enjoy thinking around problems and designing proper solutions. I also enjoy adding processes and techniques that allow me to write better code faster. Today, we will focus on using snippets in CFEclipse to develop in a rapid fashion.

[More]

Download Download

Drive letters are only 1 character?

Since I created the SUBST drive mapping generator I have been wanting to make drive letters more than one character. I do not think this is possible. It sure would be nice to have ContactManager: in place of Q: OR R:. Is it really true that Windows XP can only have 26 drive mappings?

I defer to the Wizards of the Aggregators to let me know of any solutions to this.

Rapid Development - Generate your drive mappings

I posted a week ago about how to map a directory to a drive letter. This was a good tip for me because to get to my webroot directory, I needed to click 6 times. These 6 clicks have annoyed me for so long, I built a tool to generate the mapping scripts.

The SUBST generation tool uses JQuery. There is no technical wizardry involved, I promise. Matter of fact, all of the logic is client side, so you can view the source if you like. Building the tool seemed like a fun little morning task and I happen to have a few spare moments. I hope you like it.

Note: I've tested this on WinXP, if there are other steps needed for other Windows based OS's, please leave a comment and I'll add it to the program straight away.

Huge time saver: Alias a directory as a drive letter

Using a quick command, you can alias a directory in MSWindows to a drive letter. This is extremely handy when you access a nested directory often, as web developers are prone to do.

the command to do this is simply:

view plain print about
1SUBST [DriveLetter]: [FullDirectoryPath]
2
3Example: SUBST z: C:\httpd\Apache2\htdocs
Now, when I need to get to my htdocs folder, I simply hit WindowsKey+R then z: + enter. MUCH nicer than clicking through the paths and waiting an interminable amount of time for each directory to load...

I found this on LifeHacker. If you haven't looked at LifeHacker before, you should. I have their RSS feed as a libe bookmark in Firefox so I can quickly scroll through their entries without having to visit the site.

Secret 1337 Trick - Undo Close Tab in Firefox

I just found an interesting feature in Firefox 2. If you have an open tab, then close it, you can right-click the tabs and choose 'Undo Close Tab' and the banished tab will return.

Update:

Jim Priest, who turned me on to the Microsoft Update Reboot Fix points out that the following key combos work:
CTRL+T = new tab
CTRL+SHIFT+T = restore last closed tab

I've use CTRL+T countless times. It never dawned on me to try CTRL+SHIFT+T. Thanks again Jim!



Is Eclipse Slow for you?

Over the course of the last few months, my Eclipse has become very slow to open. From what I noticed, it was the FlexBuilder plugin pieces causing the delay. Fortunately, it turned out to be my fault.

[More]

CFEclipse

Mark Drew opens the question as to how best to offset the costs of developing CFEclipse. This is an interesting question because the world of open source doesn't necessarily follow a paid model. Surely there is the Gratis vs. Libre discussion, by which open source does not necessarily mean no costs.

If I were dictator of the world, here is what I would do:

  1. Move CFEclipse to 'Free for personal use' and '$100 US for commercial use'
  2. Have Adobe take over the development of the software
  3. Make Mark Drew the CFEclipse Evangelist

My Reasoning for this? I'll make the points one by one.

  1. The donation model taxes the generous individual at the expense of the corporation. Corporations are better suited and also more accustomed to paying for software and tools. (Follow the comments in the post here). Additionally, the corporation is more likely to purchase blocks of licenses which reduce the transaction costs for each transaction (Defined as when money changes hands).
  2. Having the source code to CFEclipse does me no good. I am not familiar with the Eclipse programming model nor proficient in Java to make anything but a compiled mess. It is a nice feature, but irrelevant. If the model switches to a licensing fee model, there should be a dedicated team and dedicated support channels. This is the expectation of the market for paid software. As well, the FlexBuilder and JSEclipse teams have done wonderful things with FlexBuilder and JSEclipse. Both of these products are based on Eclipse so there is opportunity for cross-pollination and conservation of energies by merging the teams.
  3. Mark Drew should be the evangelist because he already is. He does a fine job of promoting and developing the CFEclipse tool and it would be hard to find another who is equally passionate not to mention, equally experienced. I imagine he, as the CFEclipse Evangelist would be responsible for customer feedback, training, promoting awareness and the like. Having met Mark and hear him speak, he would be perfect for the job.

The play for Adobe is a standardization of their toolsets and the revenue from commercial sales. Dreamweaver is not a Programmers Editor. It works, but then again, so does Crimson Editor, UltraEdit and Notepad. I am not as productive using those tools. CFEclipse, really allows me to program ColdFusion most efficiently. (Once I got past the 'What is a project' moments).

Since I am not the dictator of the world, nor very likely to get the position anytime soon, I leave it up to the readers to decide.