The day 1 of CFSummit2013 was great. It started with Ben Forta’s keynote. It was, as expected, excellent. He talked about the history of CF, how it’s goal is still the same (productivity) and which features have worked really well and which ones did not work. It was followed by Rakshith’s demos of some of the new features in the next release of ColdFusion (code named Splendor). He touched upon language enhancements, improvements in PDF generation and Mobile features. My demos of mobile features followed Rakshith’s demos. Unfortunately by the time I walked up to the stage to present demos, we had almost ran out of time. So I had to rush through my demos. I had planned to show a demo of debugging mobile application running on a device using ColdFusion Builder, but could not do so. I was told that there were a few issues with audio and display screen during the keynote.
Adobe had set up a table where CF developers could meet and talk to CF team members. Many attendees came there and showed interest in the mobile work flow that we had presented. I also attended Simon Free’s session on Mobile development features in Splendor. He did an excellent job of explaining what cfclient is and some of its features. In the limited time that we had in keynote, we probably could not explain what cfclient was, but I think after Simon’s session people got pretty good idea of what it is. I am looking forward to the second part of Simon’s talk today.
As I already said, this is not true. We can never replace JS with CFML in the browser. All that cfclient would do is try to simplify some of the work flows. There are no features in cfclient that will replace, for example, JQuery for DOM manipulation, Angular JS for MVC, Bootstrap/JQuery Mobile/Sencha Touch for mobile UI framework. I saw some tweet mentioning that we are trying to replace these libraries with CFClient. Again, that is not true. In fact, CFSummit2013 application
that we build with Splendor also used many of these JS libraries.
On the server side, we compile CFML to Java Byte-code. Does that mean we are trying to replace Java? No.
Many of the device APIs are asynchronous. And asynchronous code could get confusing, both to implement and maintain. Most of the PhoneGap APIs are asynchronous in nature. If you try to use File APIs or Database APIs of PhoneGap, you will realize this. CFClient framework takes care of this complexity.
Have you ever tried to debug mobile applications on device? Currently it is very difficult. You will either have to rely on alert messages, or log messages to JS console . And it is not easy to see console messages when the application is running on a device. cfclient tries to simplify this too. CFClient debugger in ColdFusion Builder can debug cfclient applications running on mobile devices. You can set breakpoints, inspect variables and step through the code.
To display JS console messages, we have integrated Apache Weinre. When youuse Weinre, you need to inject a piece of JS code in each of your HTML files. cfclient helps with this.
Packaging the application is made easy by provide preference options in CF Builder and PhoneGap Build view, which shows you progress of the build and let’s you download the builds.
We acknowledge that. But that does not mean every attempt is going to have same problems. We have learn from our past experiences. One of the main issue with some of the features in the past, that created JS code, was that JS libraries that we used became outdated quickly and we did not release updates fast enough.
However please understand that cfclient does not create any UI, unlike some of the earlier features. We do use third-party libraries like PhoneGap (Cordova) and Modernizer. But we have implemented cfclient such that you can replace these libraries easily if you want. Specifically regarding PhoneGap, if you are generating a standalone mobile application and packaging it using PhoneGap Build, then PhoneGap build will inject this library in your packaged application.
Unless some of the APIs are totally broken, which will need changes in internal cfclient code, you should be able to update these libraries yourself. And if some of the APIs are broken, then we will release updater sooner, as Rakshith mentioned in the cfhour podcast yesterday.
I do agree that since the JS code is auto generated, it may not look as good as if you had hand coded it. It is also true that since CFClient adds layers of code on top of existing libraries and JS code, it may not be as fast as hand coded JS code. But then this is also true in the case of Java (byte) code generated from CFML on the server side. You will have to decide if benefits of cfclient outweigh these limitations. And most frameworks in any language add additional code layer which might affect the performance. You need to decide if the performance is good enough for you.
As I said, it could be difficult to get a complete picture of what cfclient does without getting a chance to play with it. When we release public beta of Splendor, give cfclient a try and then form you opinion about it.