My 30onAir Video
ColdFusion30onAir is a rather fun site where developers explain why they love certain technologies like CF, Flex, Air, AJAX, etc. Here is my CF attempt:
How to Add a Derby Database with DerbyCFC
ColdFusion, DerbyCFCTwo simple lines to add a Derby database with DerbyCFC:
<cfset variables.derbyCFC = createObject("component","derbyCFC").init(adminPassword)>
<cfset variables.success = variables.derbyCFC.createIfNotExists(name)>That will add a database with a datasource of the same name. The createIfNotExists function also takes in all the other potential settings for a datasource (select, insert, grant, etc). I made some small changes to the code base to make the creation possible in two lines and with this comes version 1 of DerbyCFC. I hope it proves useful for open source projects, let me know if you use it and if you have any suggestions.
It has been a fun little project to work on and interesting to delve a little more into the AdminAPI. Lots of good stuff in there.
Two Thumbs Up: Lynda Online Training
ColdFusion, Training, FlexI have been learning Flex for a few months and the best resource I've found is Lynda online training. They have several Flex courses including many that focus on ColdFusion and Flex communication (and some on .NET and Java) and this has been extremely useful. I learn new topics and languages quicker from training and having the video's of all topics available at any time has been a big boost. Most video's are 3-10 minutes long which means I can pick up a new topic or part of a new topic during a moment of scheduled or unscheduled downtime.
One other huge advantage to the Lynda subscription is the sheer number of courses they offer that focus mainly on Apple and Adobe products. There are five ColdFusion courses that are very good and they complete the web development area with classes on CSS, HTML and SQL. Course's exist for many other products, for instance, at work we just bought a XServe and the Lynda training has proved invaluable in setting it up.
Overall I give the Lynda online movies two thumbs up!
Insanely Useful: Spoolmail
ColdFusionFor years I have programmed all sorts of workarounds for sending email in development. Recently I tried Spoolmail, written by Ray Camden, and have found it to be insanely useful.
Set up is simple. First in the CF administrator set your mail server settings to a non existent mail server.
Second, as detailed in the instructions that come with spoolmail, place the folder in cfide/administrator folder and alter one file. Next time you log in to the CF administrator under Custom Extensions is a listing for Spoolmail.
Click on that and Spoolmail will list the contents of the undeliverable mail folder.
And here is a partial showing of clicking on one of the emails, in this case a multi-part email:
Learn CF, Write CF Tutorials and Win CF
ColdFusionLearncf.com is a new web site that aims to help people learn ColdFusion via tutorials with running demos. Everything must run on CF 8 and the tutorials, so far, mostly show off the new features of CF 8 like cfwindow, cfpresentation and .Net features.
And if you submit a tutorial before the end of the year you have a chance of winning a copy of CF 8.
I've contributed two tutorials so far on auto-saving a form and showing off some of the new file functions. I find that once I write a tutorial with explanations then I truly understand a topic. Other contributors include Ben Forta, Sean Corfield and many others. To submit a tutorial go here. The site is the brainchild of Dale Fraser, an Australian ColdFusion developer.
Would you like to code this way?
ColdFusionRecent blog postings by Jason Delmore, the CFInsider, on ideas for ColdFusion 9 got me thinking about how I code. Taking a look at the beautiful/hacky/cool code I produce I noticed a few things where the language could really help me. The first is I have a large chunks of cfsets and secondly control tags (classified as Flow-control tags on Livedocs) could be simplified.
I find that big chunks of cfset's really clutter up the page and take my eye away from the important part -- what is actually being set. What if there existed a hybrid between cfset and cfscript that allowed the following to happen:
<cfset variables.firstname = "Sam";
variables.lastname = "Farmer";
variables.myObject = createObject("component","weather").init();
variables.temp = variables.myObject.getTemperature("20001");>(And, yes, I know I could use cfscript but in general I don't like using it as its not feature complete and when I did used to use it in places like above I found it hard to know when to and when not to. Just setting one variable hardly seems worth it, two variables? borderline, then there's the case where I already have two cfsets and now I want to add two more and its "is it worth converting to cfscript?", etc.)
I like the tag and attribute concept (and really how could you like ColdFusion and not?) but in examining my code I kept coming back to the idea that control tags should work differently. This would make them easier to find, quicker to code and more similar to other languages.
For instance looping over an array could use the same syntax as in Javascript:
<cfset variables.arDays = ["Monday","Tuesday","Wednesday","Thursday","Friday"]> <cfloop variables.i in variables.arDays> <cfoutput>#variables.i#</cfoutput> </cfloop>
Structures, files and lists could be looped over in the same way. A query could be looped over by just saying cfloop getQueryName. I think these concepts could be expanded to other tags (cfswitch immeadiately comes to mind) and would make the switch to CF easier for many folks.
Would you like the code in theses ways? I'm mainly thinking out loud so I'd love to hear your thoughts.






Loading....