A Deep Dive into ColdFusion 9 with Hemant Khandelwal
Following up on a recent interview with Ben Forta, DZone caught up with Hemant Khandelwal, Engineering Manager on the ColdFusion team at Adobe, who
is leading the next version of ColdFusion Server as well as ColdFusion Builder. In this interview, recorded at Adobe MAX 2009, Hemant provides a technical deep dive into some of the new ease-of-development features being provided in ColdFusion 9, including the new Eclipse-based IDE, Hibernate integration, and a new, script-based syntax. Hemant also talks about some of the new performance improvements, including a new caching implementation, built-in function support and improved PDF integration.
The complete transcript of the interview has been provided below.
DZone: We're sitting today with Hemant, it's a real pleasure to have you with us today. Can you tell us a little bit about some of the work you're currently doing?
Hemant Khandelwal: I'm currently managing ColdFusion Server and the ColdFusion Builder team. I'm also looking after the support and maintenance of JRun application server. So these are the three projects that I'm currently managing. And the way my team is engaged is we continuously work with customers and community leaders while we're working on the features. That keeps us always associated and attached to what our customers are really looking for.
DZone: Hemant, can you describe some of the new ease-of-development features that have been introduced in the ColdFusion 9 release?
Hemant: There are many features that we have done as part of ColdFusion 9 Server that will help ease-of-development of ColdFusion applications. The major one being ORM, or the Hibernate integration that we have done, and continuing with the philosophy of making things easy, we have made Hibernate integration really, really easy. You don't have to deal with XML and stuff like that. And you can just access Hibernate from ColdFusion, or if you choose to be more advanced, then you can access Hibernate internals and XML directly. Apart from that, we're also doing lot of language-related features which will benefit people who are more into writing script-based languages.
We have also made Flex and AIR integration very easy in ColdFusion 9, and we're providing automatic synchronization and offline capabilities while writing AIR applications. These are just some of the areas that I've described.
Now, this is the ColdFusion server part. We are also building a new Eclipse-based IDE, ColdFusion Builder, and I believe that that's going to open up ColdFusion really. I mean it's going to expose all the functionalities very easily to a larger audience.
Until now there was no real IDE, you have to use your Notepad or Homesite, but with the IDE you can have your servers in, and then you have a lot of wizards. We're also providing the ability to write extensions based on ColdFusion.
So all of that together will take writing ColdFusion applications in ColdFusion 9 to the next level.
DZone: So it sounds like you're working very much in tandem with the Eclipse community to help build this from the ground up, as it were.
Hemant: Right, that's right. And the reason we wanted to base our IDE on Eclipse is because there's already some work on done in that. For example, we want to play nice to Flex and ColdFusion integration, and our Flex or Flash Builder is an Eclipse-based IDE. So obviously, that was the path that we decided to choose.
DZone: You mentioned scripting language support in CF 9. Does this replace the CF tags?
Hemant: The majority of support for tags and other things are in the tag-based syntax. But what we are providing in ColdFusion 9 is a script-based syntax. For example, when you write CFCs or ColdFusion components, till CF 9 you can only write them in tag-based fashion. But with ColdFusion 9, you can write your entire CFC in the script-based language. So that means that they're going to look very different. The syntax is very different, and it takes lot of verbosity out of the language. And what we're saying is you have both the paths. I mean a ColdFusion user has both the paths. You can use the tag-based approach, or your can use the script-based language.
DZone: What are some of the performance improvements the latest release?
Hemant: If you look at the ColdFusion 8 release and the ColdFusion 9 release, we have always emphasized performance as an important feature. So it's not like as an afterthought towards the end that we do performance, but it's a feature right in our development phase, where we say, OK, we're going to spend like two or three months in the release cycle for performance, and we're pleased with the results that we're seeing for ColdFusion 9 as we saw with ColdFusion 8. So some of the areas where we have improved are the CFC creation and runtime; they have been improved tremendously over ColdFusion 8. We have written a new thread pool for IIS connectivity, so you're going to see a lot more improvement over there.
We have also written a new caching implementation with ColdFusion 9. So that's not only going to provide you different ways of caching your objects and stuff like that, but there is a better performance that we're going to get over there.
Another area that we have improved is related to searching. In ColdFusion 9, we're using Solar search engine along with Velocity, and what we have seen is that Solr search engine tremendously improves the searching speed, and there are no limitations to the number of documents that you can index. So it's going to be a great boost for people who are using searching capabilities.
Apart from this, there are overall performance improvements that we have done, and right now, we are in the phase of preparing of a performance whitepaper and we are planning to publish that very soon. So that will try to compare ColdFusion 8 and ColdFusion 9, and highlight some of the performance areas.
DZone: Will you be providing a migration path from ColdFusion 8?
Hemant: Yes - we always go with the philosophy that we should always be as backwards compatible as possible we're always as much as possible. So you can take a ColdFusion 8 application and try it on ColdFusion 9. Apart from that, we have a code analyzer and a code migration tool. It's a code analyzer that you can actually run on your application, so it will check if something needs to be changed or it generates a report. And based on that, you can see how you want to change that application. So migration is supported.
DZone: Flash Builder 4 will provide a lot of ease-of-development features, especially around application testing. Will CF Builder provide something similar?
Hemant: Right now, if you look at the public beta tool that we announced at MAX, there is nothing specifically related to the testing environment. But we are working on some of the testing framework [features], so that we can actually plug them into ColdFusion Builder. However, nothing is finalized as of now. The good thing about ColdFusion Builder is there is an extension mechanism built into ColdFusion Builder. So what you can essentially do is you can actually extend ColdFusion Builder. For example, you can write your own menus and you can make them run whatever you want, and the language is ColdFusion itself. So you can extend ColdFusion Builder to provide such kinds of tools.
If you go to RIAForge, people have been writing such kinds of extensions. So writing an extension, for example, for something like MXUnit that creates unit testing for ColdFusion, it's very easy. So that is one of the areas that we are currently looking at, but nothing has been finalized yet.
DZone: How has transaction support been improved in ColdFusion 9?
Hemant: One of the areas that we have seen a lot of users complaining about is how do we nest transaction tags. So what we are providing in ColdFusion 9 is the ability to nest transaction tags. However, note that this is not really the nesting of transactions themselves; it's just that you can nest the cftransaction tag. So what really happens is if you have a library of UDFs written by someone else and those functions need to run in a transaction, the library provider would write the function so that they always run in that transaction. Now if you call them outside and you're calling them again in a transaction tag, it used to show an error in there because nesting was not supported. Now in ColdFusion 9 we are supporting them, too. That's going to be a big plus for people who are providing libraries that need to run inside a transaction.
DZone: Are there going to be any built-in functions within ColdFusion 9?
Hemant: Well, there are a lot of built-in functions. In fact, there are 80 or more new built-in functions that we are providing in ColdFusion 9.
I would probably categorize them into four or five buckets. The majority of them are related to the ORM feature that I described earlier. The second bucket is about the office integration that we have provided, so there are a lot of functions around that. Then we have the third bucket where we are providing functions related to area manipulation or list manipulation or direction manipulation, and some of these functions are to match the tag based language, which was the script based language.
And the fourth category of functions are functions like "is null" or functions like "object equals." And these functions are really required because for ORM to work, you really need to have an "'is null" function, and for AIR integration to behave properly, you need to have an "object equals" function. So these are some of the broad category of functions that we are providing.
DZone: How have you improved PDF integration in ColdFusion 9?
Hemant: We continue to make improvements in the PDF support that we have, and in ColdFusion 9, what we have done is we have provided three or four key capabilities around ColdFusion 9. The biggest one is the extended matrix function. So in ColdFusion 9, you can extract XM images from a PDF and use them in your application. The second one is something called SPDF package. So what you can do is you can package images, and text mails and stuff like that. So you can create PDF packages in ColdFusion 9.
The third area that we've improved is allowed adhesion of HyperSend photos to PDFs. In ColdFusion 8, you can actually do that through DDX, but that was probably a roundabout way or probably a lengthy way of doing things. So we have improved that in ColdFusion 9, so you can easily add and remove HyperSend photos to your PDF.
There are other areas that we have improved like size optimization. So for example, you're saving a PDF, you can optimize on the size of the file. And also thumbnail creation support has been improved a lot. So we support more image types, and stuff like that. So a lot of good stuff around PDF in ColdFusion 9.
DZone: How will CF9 facilitate RIA development?
Hemant: That was one of the major themes for ColdFusion 9 again, because we wanted ColdFusion developers to give the power of Rich Internet Applications, when everyone is wanting to, and especially the line of business is asking all of its developers to try out Rich Internet Applications. So taking advantage of technologies like Flex and AIR around us, we have provided good integration points with both Flex and AIR. What we are doing around Flex and AIR is, around Flash Builder. So there is a DCDR data-centric application model in Flash Builder 4. We are making sure that ColdFusion behaves well, and especially the ORM, it actually behaves well and acts as a backend for the DCD features that are there in Flash Builder.
So we are going to have a closed integration point over there. And that's going to be supported in Flash Builder and ColdFusion Builder as well. So that is one area.
Around AIR, what we are doing is, we are providing automatic capability of online/offline applications. So again, it's super easy, you don't need to worry about, like, how are you going to store your data on the offline, store on the client's side, or you don't need to have knowledge about the SQLite database. It's like an ORM return for AIR applications that we are providing. So it automatically synchs up Flash data offline, everything is going to be there. I'm really excited about offline integration support in ColdFusion 9.
One other area that we are planning to focus more on is actually supporting ColdFusion tags right inside your Flex application, or AIR application. So inside your MXLM application, that's the language that you use to write AIR applications, you can actually call ColdFusion tags directly. So for example, AIR application does not provide PDF manipulation capabilities, ColdFusion provides that, correct? So what you are doing is, you can actually call ColdFusion PDF manipulation tags directly from your AIR application and you don't need to write any ColdFusion code for that.
DZone: So some of the features that ColdFusion provides which the Flex platform doesn't provide are now being seamlessly provided to Flex developers.
Hemant: Correct. So what we are doing is we're providing a Flex library that you can run through a Flex project and behind the scenes those libraries will make calls to the ColdFusion server, do the processing and give you the result back. To an end user they are just using a tag in their MXLM code.
DZone: Mark Mandel, creator of the Java Loader Library for ColdFusion, describes how dynamic proxies can be used to integrate ColdFusion with Java applications. So it sounds like this model can be ported to any number of platforms potentially, not just Java.
Hemant: It can be, absolutely. It can be actually, and what we are doing in ColdFusion 9 is we have actually extended this model so that those ColdFusion tags are actually available as web services. And so what you can actually do then is we have tried that, you can actually call these tags from PHP and other languages. Excellent question, yes. So we have actually extended that to the point that it's available to other programming languages as well. Wre calling ColdFusion as a service so all the tags are actually available as service. And another use case, because we know Flex, very true, one of the use cases, providing in Flex automatically. but the same is possible with PHP and other such languages.
DZone: If I'm invested in the PHP platform, what are some of the reasons I might want to consider moving over to ColdFusion?
Hemant: It's easy and it continues to be easy. And I feel that ColdFusion is still the best language for rapid application development. And why I say that is it provides you with everything out of the box, be it exchange integration or database integration. Or like, for example, in ColdFusion nine we are providing SharePoint integration or portlets. There are whole lot of stuff that you can get out of the box easily. And I don't think the level of support of Rich Internet Applications that we have seen in ColdFusion, like, say, AIR integration, is probably possible with PHP. You have to try a lot of stuff on your own. So if I am a developer writing my application, I would like to be worried about business logic or finishing my application as quickly as possible. and ColdFusion enables that, sure.
DZone: What advice would you give people considering moving to the ColdFusion platform as well as existing ColdFusion developers?
Hemant: Part of that I covered in the previous answer. ColdFusion is still the best language for rapid application development, and it is probably the best language that is taking its existing users to the world of Rich Internet Applications that they haven't seen before. Like for example I spoke about the AIR integration and the seamless integration with Flex, all those capabilities are provided in all the versions. And if you look at integration with other stuff like Office Documents, or SharePoint integration or Exchange integration, it really makes your life very easy.
And one thing we have seen is with Adobe's strong commitment to ColdFusion and with ColdFusion Builder out, and the newer versions of ColdFusion coming out, like ColdFusion nine is announced, I think there has never been a better time to be a ColdFusion programmer. So I think it's really exciting.
DZone: Hemant, on behalf of the DZone community, thank you very much for your time today.
Hemant: Thank you. It's a pleasure talking to you.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



