Posted in ColdFusion | Posted on 05-22-2012 | 473 views
I've had many folks ping me about the ColdFusion 10 EULA. This morning, product manager Rakshith posted a blog entry on it:
I've had many folks ping me about the ColdFusion 10 EULA. This morning, product manager Rakshith posted a blog entry on it:
A reader asked me if it was possible to watermark images (like those taken with a camera) in PhoneGap. This is rather trivial using Canvas (hey, it does have a use!) so I whipped up the following example to demonstrate it in action.
ColdFusion 10 adds a nifty little feature to the VFS (Virtual File System) - support for FTP, HTTP, and ZIP. This means you can treat remote resources and zip files as if they were simple file systems. The docs don't go into great detail on this (and instead ask you to read the Apache Commons docs instead), but I discovered a simple, but really nice, good example of this.
Because fileRead supports http, if you want to quickly grab the contents of a URL, you can use it as I've done above. All it does is save you one line of code (compared to the normal cfhttp call followed by a set to grab the file contents), but it's handy!
Another year and another cfObjective is behind me. Every year this conference gets better and this year was no exception. The location is great (even with it under heavy remodeling), the food was great (although did they really need to feed me half a chicken on the last day!), and of course, the content continues to be very well done and very interesting. My thanks to the entire team at cfObjective for their hard work and dedication in helping create this year's conference.
While I attended many sessions, here is a short list of what I thought was interesting and my take aways from each:
There were even more great presentations, but as I have to go catch the Super Shuttle I'm going to wrap it up here. I've said it before but I'll say it again. cfObjective is an incredible conference and well worth your money and time. I cannot encourage my readers enough. Whether you want to learn more about ColdFusion or JavaScript, it is a great opportunity to both learn and network.
While at cfObjective, Sumit Verma from Slatwall let me know that they are doing an Adobe E-Seminar next week on the product. Slatwall is a free, open source e-commerce product that plugs into Mura CMS, another good, free, open source ColdFusion product.
You can register for this e-seminar here: http://www.adobe.com/cfusion/event/index.cfm?event=detail&id=2014594&loc=en_us
By the way - I feel like we (Adobe) could do a much better job of letting you know about these e-seminars. Agreed?
First off - a big thank you to everyone who attended my presentation at cfObjective today. I hope it was a useful introduction to some of the cool new stuff in HTML5. That sounds really lame, but it's honestly how I feel. The web (well the front end) is incredibly fun again. I'm hoping to do many more presentations in the future, but with a more focused topic. I'm doing a presentation soon on HTML5 Storage options and I'm planning one just on Forms. (Since, you know, forms are kind of important. Unlike other things. Looking at you Canvas.)
You can download the presentation and code from Github: https://github.com/cfjedimaster/HTML-Code-Demos
It should "just run" in your browser, but some of the demos are a bit bleeding edge.

Just passing along this important information about the availability of ColdFusion 9: Availability of ColdFusion 9
Ben Forta pinged me with an interesting question (and when the Forta pings you, you respond) that I thought I'd share here. It's one of those "best practices" questions that really has no best answer, so as always, I'm very eager to hear what my readers have to say. Don't feel afraid to tell me I'm completely off my rocker - that makes for fun conversation. Ok, so the question:
I have a JQ+jQM=PG app. It started off as 2 small pages and 50 lines of code, and is now 10 pages and over 1000 lines of code (excluding lots of .js libraries, some my own and some downloaded, that are all included).My question simply is how would you go about organizing the code? Each "page" in its own HTML file? Would you put page supporting event handlers with those pages? What about handlers that use JQ to manipulate other pages? Separate all JavaScript in included files? And actually, how the heck do you even use JQ to manipulate controls in another page?
I know there is no right or wrong answer, but I am about to start refactoring this entire mess, so ... any thoughts you'd like to share?
Title says it all. You can now download the final release of ColdFusion 10. There's been a lot of press/blog entries/presentations/videos already on this release so I won't repeat the feature list, but you can see even more new videos on Adobe TV.
One truly disappointing aspect of IndexedDB is that there is no (simple) support for search across your data. It is very much based on the idea of knowing your keys and fetching data based on those keys. You can easily retrieve the "Ray" user object, but you can't search for user objects that have an age within a certain range and a skill property of so and so. That's not to imply you can't do some sorting and filtering though.
IndexedDB supports the idea of key range objects. As you can probably guess, these allow you return objects based on a range of values that match with a particular index. Remember that IndexedDB objects can have any number of properties, but you have to specify which are indexed. And now you know a good reason why - it gives you a chance to filter later on.
Ranges can go in either direction and can be inclusive or exclusive. By that I mean, you can say "Anything object with a name 'above' and including Barry" or "Anything object with a name 'below' Zelda but not including that name." You can also combine both and get a single object too.
For my use-case, I wanted to use a range filter so that I could support 'filter as you type'. My data consists of notes that include a title, body, and created property. I'm not going to go through the steps of setting that up as my previous blog entries (linked at the bottom) went over most of the detail there. Instead, let's focus on how I built in the 'filter as you type' metaphor.
To begin with, I had a function that handled "get all" and displaying the data. It worked by opening a cursor and looping while data existed. Here's how that version looked:
In order to support a bound range, you have to change how you open your object store (remember, think of this like a database table). When we just get everything, we run openCursor on the objectStore (line 18 above). When we want a bound list of data, we get an index first (this is the property we said we wanted to be able to filter on), create the range, and then open a cursor on that. So with a small amount of work, we can update our displayNotes function to take an optional filter. (Note that I also switched to a table display. The change in HTML isn't terribly important here so I won't cover it.)
Focus on lines 31 to 40. You can see the different ways to open the cursor. Note specifically we do our binding based on an input string, like "ra" and append "z" to give an end to the range. So typing in "ra" means we want all notes with a title from "raa" to "raz".
Outside of that - the code is identical. I moved the success portion into a new inner function (handleResult), but it works the same no matter how I get the cursor itself.
You can demo this yourself by hitting the demo button below, but as before, this is Firefox only due to - what I believe - is a bad implementation in Chrome. (I think it could be made to work in Chrome, but as I'm building these examples to help me learn more about IndexedDB, I'm fine supporting the most compatible browser.)
You can find the complete source by .... viewing source. ;)