Entries for month: July 2009
As Ben and Claude have noted, the Gartner Report on ColdFusion 8 is now publicly available.
It's an analyst's report and not a ColdFusion marketing piece. It's honest, it's independent, and it's not there to fluff up ColdFusion. Therefore it has both pros and cons in it. However, I think it's much more positive than negative.
It also makes me wonder, if Gartner thinks this after seeing ColdFusion 8, what are they going to say after we release ColdFusion 9?
Tags:
ColdFusion
Just wanted to drop you all a quick line about the sessions I'm doing at Adobe Max 2009 this year. They're both around new features in ColdFusion 9:
Leveraging Exposed Services in ColdFusion Centaur
October 5 at 11:30AM
This session is about the new exposed services or CFaaS we have included in ColdFusion 9. I'll be talking about how to leverage them in Flex and other languages, and even how to enhance previous versions of ColdFusion with them.
ColdFusion with Microsoft Office, SharePoint, and Exchange
October 5 at 05:00PM
I'll be talking about how nice ColdFusion plays with Microsoft technologies. While Exchange integration has been around since ColdFusion 8, with 9 we've added the ability to interact with SharePoint and Office documents.
Go and register for them now!
Tags:
ColdFusion · adobemax09
I've been remiss in blogging about CFUnited mostly because I've been busy reviewing topics, writing sessions and brainstorming about CFUnited.
It's looking to be pretty awesome from the content I've been seeing. Today we finally revealed the Adobe sessions:
http://cfunited.com/blog/index.cfm/2009/7/20/Adobe-ColdFusion-9-and-ColdFusion-Builder
What really excites me about the list is the participation of some Adobe people I haven't seen participating in the ColdFusion community in awhile:
And members of the team from India:
And of course the usual suspects:
It's looking like it's going to be a great show. I can't wait.
Tags:
ColdFusion
Another of the less visible, but still cool features in ColdFusion 9 are the enhancements we've made to <cfpdf>. We've added the ability to:
- Add headers/footers to existing PDFs
- Create PDF packages
- Selectively optimize PDF size
- Extract text from PDFs
- Extract images from PDFs
- Create high quality thumbnails
Of these features, my personal favorites are optimization and extraction.
Optimization
PDFs can do a lot. Consequently, PDFs size can swell due to the presence of extra information, metadata, and embedded files. The optimize feature allows you to remove specific types of extras in order to selectively reduce the size of your PDF. But you can retain features that you need. When you take action="optimize" the following options are open to you:
- noattachments
- nobookmarks
- nocomments
- nofonts
- nojavascript
- nolinks
- nometadata
- nothumbnails
Code looks like this:
<cfpdf action="optimize"
source="#ExpandPath('./UserGroupTour2009.pdf')#"
destination="#ExpandPath('./UserGroupTour2009Opt.pdf')#"
noattachments = true
nobookmarks = true
nocomments = true
nofonts = true
nojavascripts = true
nolinks = true
nometadata = true
/>
As you can see, the code is pretty straightforward. I've seen reductions of 65-75% on PDF size when using all options.
Extraction
Yes, you can get at the text or embedded images of a PDF with ColdFusion 9.
Here's the code to get at the text of a PDF:
<cfpdf action="extracttext"
source="#ExpandPath('./UserGroupTour2009Opt.pdf')#"
name="cfref"
/>
<cfdump var="#XMLparse(cfref)#" >
That code will extract the text of a PDF to XML. The structure divides the content into pages, so you can quickly get at content on particular pages, etc.
You have a few options that I'm not showing though. You can get the content as just a string. You can selectively get page numbers. You can even get XY coordinates for all of the words in the document.
Getting images is similar; you plug in a PDF, and send the images to a directory:
<cfpdf action = "extractimage"
source = "#ExpandPath('./UserGroupTour2009Opt.pdf')#"
destination = "ExpandPath('./images')" />
You have options to prefix the images, and pick image formats
As you can see, the engineers added some cool functionality here.
Tags:
ColdFusion · Centaur
One of the less mentioned aspects of ColdFusion 9 is the enhanced caching that was added by including ehcache under the covers.
This opens a number of possibilities including fragment caching:
<cfcache action="serverCache" timespan="1">
<cfoutput>
<p>The time was #DateFormat(Now(), "mmmm d, yyyy")#
#TimeFormat(Now(), "hh:mm:ss tt")#</p>
</cfoutput>
</cfcache>
<cfoutput>
<p>The time is #DateFormat(Now(), "mmmm d, yyyy")#
#TimeFormat(Now(), "hh:mm:ss tt")#</p>
</cfoutput>
In this code, the first <cfoutput> will always show the time from the first time it was called. The second <cfoutput> will show the time from the actual time the code is called. The 1 for timespan means that it will cache that value for a day.
But, we can also do dependent cached items, where the value of one of the contained variables has an impact on whether or not the cached item needs to be refreshed.
<cfset minutesVariable = minute(now()) />
<cfcache action="serverCache" dependson="minutesVariable">
<cfoutput>
<p>The minutes is #minutesVariable#</p>
<p>The time was #DateFormat(Now(), "mmmm d, yyyy")#
#TimeFormat(Now(), "hh:mm:ss tt")#</p>
</cfoutput>
</cfcache>
In the above code, assume that it is called at 12:03. For the next minute minutesVariable is going to equal 3. For each call where minutesVariable equals 3 the cache is used. However when the time rolls over to 12:04, minutesVariable will equal 4. This will trigger a refreshing of the cache with the new content being cached for the next minute.
In addition to fragments, I can also cache objects (but for easy of understanding, variables) See this code:
<cfcache action="get" name="test" id="testQuery">
<cfif not structkeyExists(variables, "test")>
<cfquery name="test" datasource="cfartgallery">
SELECT *
FROM Artists
</cfquery>
<cfcache action="put" value="#test#" id="testQuery">
</cfif>
<cfdump var="#test#">
I try and retrieve the query that I've given an id of "testQuery" from cache, if it's not there, I call the query and cache it.
So those are three fairly straight forward examples of the new caching, but you can do much more with it, including invalidating objects, analyzing cache usage, and more.
Tags:
ColdFusion · Centaur
The engineers behind ColdFusion Builder are now blogging. You can find them at: CFBuilder.
Tags:
ColdFusion · ColdFusion Builder
I've been demoing an extension I made for generating ORM code CFCs, views, controllers and services. It stopped working with the public beta of ColdFusion. I've updated it to work with the public beta. I've tweaked it in a few other places, but it's by no means completely tested. But if you like it and have ideas, I'm open to allowing other authors in. (We'll just have to change the name of the tool. )
Please note, this is not an official Adobe product. It's just code that I've been using that I'm willing to share. There is an ORM generator included with ColdFusion Builder; this is just another alternative.
Terry Ryan ORM Jumpstart at RIAForge
Tags:
ColdFusion · ColdFusion Builder
A number of people have commented on the lack of word or line wrapping in ColdFusion. I whined to Adam Lehman about it, and he set me straight.
You can find it in the preferences:
Preferences -> HTML -> Editors
Under Editors there is a toggle button for General/Advanced. Click "Advanced"
Option reads "Enable Word Wrap" It will require a restart of ColdFusion Builder.
We're talking about perhaps seeing if we can't make this more obvious.
Tags:
ColdFusion
Those of you that have heard me talk at User Group tour talks, or at yesterday's Online ColdFusion Meetup have heard me use the phrase "RAD without Rules." It's been going through my mind ever since I started using ColdFusion Builder and ColdFusion 9 together.
You see, ColdFusion was built as a Rapid Application Development tool for the web and for many of us it was alone in that space. However, it would be disingenuous of me to not acknowledge that there are tools that have stolen the spotlight away from ColdFusion. For me, this release of ColdFusion is about getting that spotlight back.
I was thinking about the phrase "convention over configuration" which seems to be the prevailing philosophy behind other RAD tools, like Ruby on Rails, Grails, Zend, etc. To me it means, "Code the way we tell you to, and we'll make it fast." It's hard to tell tone here, but I'm not trying to knock this. A lot of smart people have done some awesome work with this mindset.
However, it never really fit with me, both when I was using frameworks and when I was writing them. People almost always chafe at the conventions. People always think they themselves can do things better then someone else. Not just me, in this case, but the people I was trying to get to use conventions. Some of that thinking is misguided. Some of it is "Not Invented Here" thinking. But at the end of the day, you're always going to be more productive using something you believe in, rather than something you're somehow compelled to use.
This leads me to the features of ColdFusion 9 and ColdFusion Builder.
ColdFusion Builder comes with extensions that generate code for you. Want to quickly generate code for viewing information in your database? You can do that. Hate the code we generate? You can completely change it. It's written in CFML, and completely visible/editable to you.
Want to quickly build a modern, responsive HTML UI? You can use our built in UI components. Want to hand-code your front end using a JavaScript framework? Here's CFAjaxProxy and our JSON features from ColdFusion 8 for you.
Want to do your front end in Flex? You can have it faster. Want to use ColdFusion in Flex quickly? You can use Exposed Services.
Want to work with PDFs? You've had that. Want to work with Office files? Now you can do that too.
We've added Hibernate ORM to ColdFusion. Want to wire up an object model in ColdFusion, and just have the CFCs define the database? You can do that. Want to model an existing database ignoring its structure, and instead building proper objects regardless of underlying structure? Guess what? Doable. Want to just provide CRUD for your existing database without writing a lot of code? You can just leave your ORM CFCs blank, and we'll take care of that for you.
Don't like ORM? That's fine, CFQuery isn't going away. We've tweaked it a bit, to use the application.datasource by default. Also, the code generation tools we provide will generate CFQuery code for you instead of ORM code. Don't like the code we generated... you should get the point by now.
The point being this: instead of saying "Code the way we tell you to and we'll make it fast" ColdFusion is saying "Code the way you want, we'll make it fast." That is what I mean by RAD without Rules."
Tags:
ColdFusion
I just got done with the longest (hyperbole), and highest attended (293) Online ColdFusion Meetup ever. Here's the URL for the recording if you missed it.
https://admin.na3.acrobat.com/_a204547676/p53217737/
Tags:
ColdFusion