Tag: cfcs

Episode 5: CF Roadshow and Rakshith Naresh from Adobe


On this episode of the podcast Script talks with Rakshith Naresh, the Senior Product Manager for ColdFusion  at Adobe.  They discuss many of the items featured in Adobe’s recent “ColdFusion Roadshow”. This includes information about some of the highlighted features of the ColdFusion 2016 (the current version), as well as some of the anticipated features of its next version, codenamed “Aether”.

But Script kicks off the podcast and his conversation with Rakshith with a discussion about ColdFusion’s reputation of being a “dead language”.

You can find out more about ColdFusion at  http://www.adobe.com/products/coldfusion-family.html or find out more about it on Twitter @coldfusion.

You can follow Rakshith on Twitter @rakshithn

Adobe is putting on events similar to the “ColdFusion Roadshow” on the west coast from April 10-17. For more information go to  http://blogs.coldfusion.com/post.cfm/adobe-coldfusion-events-april-10-17





Hello and welcome to Episode 5 of the “Wake Up! With Script Van Winkle” podcast. My name is Chris Laning, a.k.a. Script Van Winkle. But my friends call me… collect. Come to think of it there Junior Developer, you might need to look that one up.

Two months back, Adobe put on their ColdFusion Roadshow. It was an informational meeting taken to several cities on the East Coast. I got to attend their session in Durham, North Carolina. I got lots of information about the current status of ColdFusion, and a look at some of the features  that might be in future releases.

As someone who is been developing in ColdFusion for over 20 years, obviously I was interested. Especially because I am working with servers that are  several versions behind the current one. So I wanted the opportunity to at least get a taste of what I’ve been missing.

I have run into many people who believe  that ColdFusion is a dying language. While I resisted that opinion for the longest time, I have begun to believe it as well. I have seen a lot of the giants in the CF field move on to other languages and technologies. However, as you will hear in the interview, Adobe has numbers regarding ColdFusion usage and adoption which just don’ t jive with that  line of thinking.

Which leads one to wonder where the truth lies.  Is it really dying, or could it be that a lot of people who have been doing ColdFusion for all these years have moved on to other things not so much because the language is falling behind, but rather because they were tired of doing the same old things and wanted new challenges. I have to admit, I’ve somewhat lost my enthusiasm for programming in CF. But in my case, that may be because I’m still stuck so many versions behind. But what if it is the case that people’s tastes just change from time to time? Maybe there are people coming to ColdFusion from other technologies that they have been doing for a long time.


It’s also hard to say what the job market is like in the ColdFusion field and I have heard mixed opinions. Some recruiters have told me that while there are not a lot of jobs in ColdFusion  there are considerably less experienced ColdFusion developers to do those jobs. In short, they have assured  me that if I ever need a new job, I should not have a problem finding one. Unless of course my potential employer has listened to the podcast.


Now at the ColdFusion Roadshow, Adobe mentioned how it has taken several steps to help make it easier for other developers and particularly students to learn about CF. At its heart, it is not a difficult language to pick up. Especially if you’re coming from the strictly front-end HTML side.


ColdFusion is really easy to understand for beginners. But, they have also made many advancements to it over the years to bring it more in line with other programming languages. That, ultimately, makes it easier for people to jump from those languages to ColdFusion.

The long and short of it is this. Perception may not be reality. I don’t know whether ColdFusion is a dying language or significantly growing. But I will say this. It is certainly possible that it is just in a phase of transition bringing on different types of clients and different developers. I guess that remains to be seen.  I will let you decide that for yourself.

I also had the chance to sit down with Rakshith Naresh who is the Senior Product Manager for ColdFusion.  I am grateful to Adobe for making Rakshith available for an interview that day. I made it clear to them that one of the questions I was going to ask was about whether it was a dying language. So this is not “gotcha”  journalism. Rakshith, Elishia Dvorak, and the rest of the staff from Adobe who were there that day were friendly, personable, and willing to take on any and all questions. That is why I am glad I get to bring this interview to you.


Now on the last episode I explained in great detail why I was dropping the phony character accent I used on Episodes 2 and 3.  This interview was before before I dropped it. So enjoy my bad accent one more time.


Without further ado, here’s Rakshith Naresh from Adobe.






Script :

Alright, so I came to this ColdFusion Roadshow that they had going on here in Durham, North Carolina and it was kind of giving us a map of, well first they were giving us a map of the future, but they were also talking about what’s out in ColdFusion 2016.


Very informative and very enlightening. I decided to grab Rakshith Naresh, that’s the Senior Product Manager with Adobe. He gave some of the presentations and I thought I’d get him to talk to us a little bit about what’s going on.


Welcome to the show, Rakshith.



Thanks, thanks a lot. It’s great to be a part of the show.


Script :

So I got to start with the 2,000 pound elephant in the room here. You know I’ve been a ColdFusion developer for all these years but in the last few years I keep hearing over and over ColdFusion is dying. I know you’ve heard that, so what do you say to people that really think that ColdFusion is becoming a dying language?



It’s definitely not dead. I had this on my slide deck as well. It’s clearly the best undead language ever. We are working on the next version of the product already. I spoke to you about the roadmap as well.


Just last year, and we run a business at Adobe clearly, so ColdFusion is about business for Adobe. The business last year was really good. This was one of the best years that we’ve had over the last eight years or so. ColdFusion is really doing well for Adobe, so what it means is that Adobe is more and more committed to ColdFusion as a platform.


That’s the reason we have a 10-year roadmap as well, so we have support commitments to 2027. With every version of the product you get five years of core support and two years of extended support. Our existing support commitments for ColdFusion Aether, which is the code name for the next major version of the product, and the version beyond that goes up to 2027. That’s the longterm commitment that Adobe has for the product as a platform.


Some of the things that we are doing as a part of the next version really excites me. We are focused on the things that really matter to a ColdFusion developer. We will improve on performance, improve the security aspects of ColdFusion, make the platform more secure by default, improve the CFML language as well. We have some exciting stuff going on in the next version. Somebody who thinks that the language is dying, it’s just a myth that’s floating around. It’s definitely not dead and we are actively working on it and we’re working on the next version of the product, code name Aether.


Script :

I think one of the impressions that people get, and frankly I got that impression myself when you’re out there seeing what’s out on the market. It seems like ColdFusion seems to be mostly focused in like federal government and big bank institutions. Is there any push for ColdFusion in the more nimble, start-up type arena?



Absolutely, so that’s the reason we have two different versions of the product, which is ColdFusion Enterprise focused more towards the larger companies, and ColdFusion Standard geared more towards start-ups and even a small size organization. That’s the reason we still have standard alive today. If we were not focusing on the small companies, the start-ups, we would not even have ColdFusion Standard anymore, we would just focus on ColdFusion Enterprise.


Standard gears towards somebody who’s starting afresh and trying to bring new stuff using ColdFusion. One of the talks that we have, which is still an initiative that we have in mind is, can we do something with the start-ups? For instance if there’s a new start-up coming up, can we provide them with licensing support for the first few years to support the start-up? Then once the organization matures, obviously they will become ColdFusion customers as well.


That’s one of the thoughts, we still are working the details of it, but clearly even though existing customers set-up today, we do have all kinds of companies. We do have federal government, we do have really large customer organizations, and we do have really small organizations, start-ups as well.


Just so that you know, even today we added on 2,000 new customers every year. It’s not just an existing customer story, the platform is growing. It may not be growing to the extent of some of the competing technologies. We have to accept that as a fact it’s not a super growing product, but at the same time it’s not a product that has stagnated. We continue to grow, we continue to add 2,000 new customers year over year.


Script :

One of the questions that we heard here today, somebody wanted to know what you’re doing to go out there and recruit the newer, upcoming junior developers. That’s a good thought, I mean me, I’m an old, grizzled, senior developer, whatever. If you don’t get the fresh blood in there, it’s going to be some problems. What are you doing in that realm to try to get these guys and girls onboard?



Yes, absolutely. That’s a great question. We have quite a few initiatives, we clearly see that as an issue. Whenever we talk to our customers and even developers out there, we hear that hiring new developers, that is the number one challenge out there. It’s not so much about the product; the product runs great. Where can we find those new developers? That’s basically the problem that our customers have today.


We have quite a few initiatives to fix that. It will take some time to eventually see a noticeable difference, but we have made that move already. The first one is we do have a free education curriculum available. It’s a semester long course on web application development; it focuses on web application development in general. We have client-side, HTML, CSS, JavaScript. It introduces the client-side bits to you and then it also introduces server-side via ColdFusion. This is a free course available and we have quite a few community colleges who are adopting this web application development course.


One of the issues that we saw was the curriculum at the community college, they are pretty much outdated. We wanted to come up with this new focused web application development course for the community colleges, or even for any university in general, and provide them with a semester-long course, provide them with instruction videos as well, curriculum material, even projects so everything is right there. They just need to hand it over to a certain instructor to teach that curriculum in the college.


What we’ve also been able to do is create a model where we have tied in our customers with a few community colleges where they typically go hire new developers. It’s worked out quite well for us in a few areas where we have the schools in place at a community college. Developers love to be a part of the course, more so because there’s a customer who’s looking to hire interns from the community college. They take part in the web application development course, and once they’re out of it they get an internship opportunity with one of our customer organizations. It’s kind of like a win-win, both for the new developer as well as our customers who are looking for fresh blood in the ColdFusion community. That is one part of it.


The other issue that I generally see is a lack of introductory training materials out there for ColdFusion. There are a few, like Learn CFML in a Week and a few other training materials, but we are focused on bringing in some new curriculum courses with new training courses as well for a new developer. We have this Adobe platform called Adobe KnowHow. We do have … I don’t know how much it is, I think it’s 30 hours of instructional video for a new developer on Adobe KnowHow. That’s a great resource for somebody who’s trying to get in to ColdFusion and learn. Videos are the in-thing today to learn any kind of technology. You don’t go through a set of documentation to learn, so we are doing that.


The third really interesting project that is my favorite is the CF Fiddle. This is an online tool that works in your browser. What it does is, it shows you a code snippet that you can go tweak and you can run the code snippet from within the portal itself on the browser and see the output right there. The whole idea is instead of showing ColdFusion developers static content or new developers some static content in the documentation, we will have a link to CF Fiddle that will take you to an online portal where you can run the code snippet and see it working.


You can tweak that, share it with others, and also if you have any kind of questions, if you want to ask a question to the community on Stack Overflow or Adobe forums, you can now link a CF Fiddle code snippet and link it in the forum, and somebody who’s an expert in the community can take a look at it, see the output right there, see the issue, fix it for you, and then pass it back to you as an input. We have all these initiatives in place. It’s not going to change things drastically in just a year or so, but we believe that it will change the game in the next few years.


Script :

That’s really cool. We’re going to take a quick break and we’ll be right back with Rakshith Naresh, Senior Product Manager with Adobe.



FAUXMERCIAL: “Fusion Kingdom”



Coming soon to the Adobe Studios Resort in Orlando, a brand new theme park experience for the entire coding family, Adobe’s Fusion Kingdom.


Your journey begins on a scenic ferry boat ride across the majestic CFCs lagoon. Next you’ll take a magica stroll through the enchanted Allaire forest.


Once Inside the Fusion Kingdom your true adventure begins. Enjoy Popular  roller coasters like the Oop de loop, Cache mountain and the futuristic suppress white space mountain.


And be sure not to miss the dazzling splendor of Thunder mountain, where you will bolt like Zeus down the mystic Merrimack river through a stormy blizzard, dodging scorpions while being chased by a centaur. Who knows what else may develop before your ride is over?


For more family-friendly  fun experience the many different settings in the Adventures of Neo and friends  or enjoy classic attractions like the Carousel of Progress Bars.


If you are hungry, you can dine in an award-winning restaurant like the spaghetti code Café, or trythe retro chic Macaroni Meatia restaurant.


As night falls the Fusion Kingdom comes alive with the  glowing pagentry of the Spectra Magic parade followed by the Adobe’s world famous Fireworks.  As you exit the park, don’t forget to preserve those memories by picking up a hat, tshirt or put your name on your very own Fusion Kingdom custom tag.


Great times and precious memories at Adobes Fusion Kingdom. Where the action is always unscripted.  Unless you want it to be.


Construction of Fusion Kingdom is slated to begin soon, upon completion  of Adobes Photoshop pier, Acrobat Adventure, llustrator Island, Flash Fantasy Island, Preimer Park, Dreamweaver Farms, After Effects Experience, Audition Alley, Muse Magic, In Design Dominion, and Creative Cloud Land.






Script :

Welcome back to the Script Van Winkle podcast. I’m Script Van Winkle and I’m here with Rakshith Naresh, the Senior Product Manager at Adobe. The main purpose of this CF Roadshow was to kind of tell us what’s going on in 2016, and then take a look at the future. First off, what do you think are some of the highlights of 2016, the things that you’re most excited about?



I’m really excited about the performance improvements that we’ve done. Your existing applications will run up to 30% faster. Even without having to make any code changes, you can get 30% increased throughput.


What it means for you, for a developer is that your existing applications, even without you having to change the code, tweak the application, you will be able to leverage those runtime improvements, perhaps to deliver on one of your goals or one of the KPIs that you may have. You may have a KPI to reduce the end-user response time by so many percent, but the new platform itself will give you the boost so that you can accomplish your goals. That is one thing that I’m really excited about.


The second one is security. We are focused on security so you have access to a team within Adobe called PSIRT. They’re a group of security experts who work within Adobe and they give us recommendations and how to go about fixing a security threat. Even if it’s a threat in the wild out there, we get to hear about it from the PSIRT team and they interact with the product team and help us release those security fixes on time.


We do have frequent security fixes as well. In 2016 specifically, we came up with this new security code analyzer. Let’s say you may have some legacy applications that you’re just maintaining. Somebody else wrote it, let’s say 10 years ago, and you have been assigned to maintain it. You don’t really know what kind of security issues are present in that particular legacy application. When you run the static code analyzer that we have, it points out exact line numbers, which have the vulnerabilities and it will also recommend how to go about fixing that. That is something that I’m really excited about.


The third one is API Management. I just love what we have built. Even the customers who we work with, they just love the solution. Some of our customers have actually moved out off some of the leaders in the API Management space to adopt our solution. That helps you take your APIs to market with ease. You just have to worry about designing your API, coding the API. Everything else about securing, managing, engaging developers, analytics, everything is baked in, in the product.


This is freely available as a part of ColdFusion and it cannot just manage CFML-based APIs, it works with any kind of APIs. One of the things that we saw was 74% of our customers have multiple technologies in their organization. If the API manager can actually track those individual technology-based APIs as well, be it a .Net API or a PHP API, the relevance of the importance of ColdFusion all of a sudden is so much more within the organization, so that’s one of the reasons why API Management excites me. 2016 in general with performance security language improvements and API Management are like the top picks for me.


Script :

We got a lot of listeners here that maybe aren’t so up-to-date on things and may not understand what you mean by the API Manager. Are we talking like services, micro-services, what are we talking here?



That’s actually a great question. The way API Management platform works is, it’s actually a gateway that sits in-between or before your ColdFusion server. Your back-end APIs, be it REST APIs or SOAP APIs, will be returned in CFML.


Now there’s a gateway component that you install either on the same machine or a different machine, so this kind of routes all your API calls to the back-end. While it’s routing the calls to the back-end, it provides this additional layer of security. It provides you access control so that nobody can hit the back-end API without having to bypass the API Management layer. It has to pass through the authorization mechanism that we have, and then access the back-end.


Similarly SLAs, so service level agreements. You can enforce them at the gateway. Similarly analytics, since the traffic is routed through the gateway as a separate constant, it’s a stand-alone component, it can track analytics as well. All this that you were supposed to take care of as a ColdFusion developer when you’re building an API, is now offloaded to this new component that sits in front of your ColdFusion server. That’s the whole idea about the API Management layer.


Script :

Okay, that makes it sound a lot simpler, because I know there is this big push toward moving toward services and things like that. I have mentioned in other podcasts that this whole of micro-services, I kind of like it. I want these little short things to do what you need to do. Sounds like it’s a good direction.





Script :

One of the things that caught my eye, being an old-school developer, is some of the language changes. In particular, could you explain the changes in the structure?



In 2016, we introduced this concept of ordered structure, so you can now retain the insertion order. So just like an array. An array maintains the insertion order. You can get elements out of an array based on how you insert on index one, two, and three. What if you want something like this on a struct to get data back out of the struct in the insertion order? That is what this ordered collection gives you.


We also have this new capability of ordered structs. What it does is, whenever you insert something on the struct, you can order the struct based on the key values that you insert. You can customize it by your own function that it can pass, or it can say that you want an ascending order struct or a descending order struct, and you would just order the keys based on what you select.


Script :

This keeps us from having to take stuff that was in the struct, moving it into an array to do the ordering, and then dumping it back out?



Yes. Internally it works slightly different but yeah, for a developer it feels as though the struct, when you do an array and got back all those elements in the insertion order, absolutely.


Script :

Awesome. Before we go, real quick. You mentioned some of the things that are coming up in the next version called “Aether”.





Script :

Just a real quick overview of some of the hot things that you think are coming out with that.



I’m excited about Aether as well. Again, through multiple service, through multiple customer interviews, what I find is our customers and developers are looking for performance improvements. We did performance improvements to the runtime in 2016 but we plan to take a slightly different approach in the next version.


We are planning to provide tooling that will help you extract the best part of your existing infrastructure. We’re planning to come up with an auto connector tuner that can optimize your connector to the best. We also will revamp the server monitors so you can figure out any kind of bottlenecks in your application, JVM settings not tweaked in an appropriate manner.


You’ll get notifications on all of this using the revamped server monitor, which will have a new dashboard that will kind of give you a sense of how well is your application performing in just one snapshot. That is one thing. We are also planning to introduce a code profiler for performance. Performance improvements will obviously be there. We’re also planning to support a distributed cache. Those are some of the things in performance.


On security, we may have an integration with a web application firewall just to make your application so much more secure. This also functions like a gateway, even before your ColdFusion applications come in the picture, it just scans your HTTP request pattern and prevents malicious request patterns from hitting your back-end. That is also something that I’m excited about.


Quite a few language changes as well. We are planning to improve the object-oriented support, perhaps look at introducing CFScript 2.0, introduce null support. There are a lot of potential directions but we may not be able to accomplish all of it as a part of Aether because we only have limited resources available.


The directions are pretty interesting and the nice thing is in all these Roadshows, I get a sense that everybody likes the directions that we are taking. That’s the best part about the directions that we have. I had this $100 test for people who are here and it seems to echo what we are planning to do. Clearly performance, everybody likes performance. The performance improvements that we’re doing, the security, the language, so exciting times for the next version as well.


Script :

We appreciate it. We’ve been speaking with Rakshith Naresh. He’s the Senior Product Manager at Adobe. I thank you for your time and real quick, the Aether is due out, when is that 2018?



Yes. We’ve been having a two year cycle pretty much. Potentially I can’t comment on the exact date of-


Script :

Come on, I want a committed day right now, down to the day. Let’s go, break it here!



Okay, it’s going to be in 2018.


Script :

Awesome. Again, we’re speaking with Rakshith Naresh, Senior Product Manager at Adobe. Appreciate your time and thank you for being with us.



Thanks a lot, it was great being a part of the show.





That’s all for my interview with Rakshith Naresh.  I hope you found it as informational as I did and  that it left you with some things to think about it.


That’s all for Episode 5 of the “Wake Up! WIth Script Van Winkle” podcast.  If you’ve got questions or topics you would like me to cover, drop me a line at  script@scriptvanwinkle.com or find me on Twitter @ScriptVanWinkle.  You can subscribe to the podcast in iTunes, Google Play,  or on Stitcher. You can comment on this episode, see blog posts and find more info at ScriptVanWinkle.com.


Thanks for listening and I’ll talk to you next time.


Live(ish) Blogging – #NCDEVCON – Report 1


NCDevCon North Carolina’s Premier Web & Mobile Conference

Ok. So it’s not exactly LIVE blogging (as I am sitting here after an AMAZING BBQ meal)  stealing power and getting ready for the next session. But already, #NCDEVCON has proved to be a great conference!

I have always loved the clear as a bell tape lines helping streamline the checkin process (you guys should patent it).  Then things kicked off with a session on API’s by Elisha Dvorak from Adobe. Elisha talked about the future trends of apis and microservices and how ColdFusion is positioning itself to make those easier to handle.  It was 50,000 ft look at apis for sure but I left knowing more about an area I do find engaging.

Session breakouts after that. I can, of course, only cover those I actually attended.  For me, I kicked up Small Screens, Big Rewards! The Experience of Converting Desktop Websites to Mobile by Jessica Kennedy.  She was fun, informative and a great evangelist for mobile and CSS. I am one of those many developers that are driven mad by CSS…..hate it!  But Jessica really turned my thinking on it.  Looking how seamlessly and quickly it seemed she could make things rearrange, resize, and realign with a few simple code changes was awesome!  I left really jazzed about CSS!

My next session was one put on by Raymond Camden  called Everything They Didn’t Tell You About Hybrid Development.  Always informative and always entertaining, talks by Raymond are usually no-miss.  I learned a lot as he described some dos and don’t with regard to using Cordova to do mobile app development. He spent a great deal of time on the your persistance options (Indexed DB, WebSQL, SQLLite, etc,)  He also mentioned some great tools to use as well.  Kind of wished I had experienced using Cordova before attending but hey, I’ll keep the info tucked away until I need it.

And then lunch!  Did I mention the Carolina pulled pork BBQ and mouth-watering BBQ sauce?  And the baked beans?  Take it from a guy who thinks baked beans is the only side a meal should ever have….they were killer!!!

Well, ready to get my Node on…..Build Your Backend in Node.js  by Matthew Eash. That is assuming I can get my backend up and moving after that lunch!

Different Strokes for Different Folks

In my search for new opportunities I have had a couple of interviews so far. The interesting thing has been the varying philosophies I have encountered with regard to development.  Things one firm swears by the other despises.  It has been an interesting exercise in trying to determine what these are and how to navigate the minefield without abandoning your own preferences. Here are just some of the differences I have encountered.

Source Control

First off, believe it or not, there are still quite a few shops that don’t use it.  Over 50% of companies I have talked with so far don’t use it!  To be fair, when I started my current position back in 2012, I had not used source control either.  So I had to quickly learn how to use Subversion (SVN).  Much to my boss’s chagrin, that learning curve was steep and deeply conflicted! But with time and discoveries like “bunny hopping” (for example merging Staging branch into your project branch first, then merging project branch into Staging) things got better.  Then when we decided to finally “Git” with the program things have really hummed along nicely.  I swear by Git for all my home projects. I have even tried to use Git to version my music compositions.

At least in most cases these businesses are saying they plan to move to source control soon.  But which one? Git or Subversion?  In my observation there is a feeling that Subversion is more in align with “corporate” and Git more in line with “startups”. I definitely don’t agree!  But again I am partial to Git so I may be biased.

Object Relational Mapping (ORM)

Watch where you step on this one!  Wow!  I have played with ORM and like it, but also recognize that it is not always appropriate, especially if your business model involves complicated queries.  Yet I assumed going in that you would not be considered a “modern” developer if you weren’t using it. In fact, many job postings include phrases like “MUST HAVE EXPERIENCE WITH OBJECT RELATIONAL MAPPING”.

So imagine my surprise when in one interview I was asked “What experience have you had with ORM and are you comfortable with it?”  and when I finished explaining that I had played around with it and found it to be easy and useful, the interviewer snapped passionately about how much they HATE it. Lesson learned. Need to feel out my audience on this one.

Those opposed to ORM I have generally found to be people who love SQL. I know that when you are sitting elbow deep in a query with 70 joins on 50 different tables it is hard to believe there are people who love it, but trust me there are!  I can see why  people who eat stored procedures for breakfast would hate to use ORM.  It would be like telling classic car nuts who love to cruise around, that they can only legally use Google self-driving cars from now on.

Stored Procedures and Inline SQL

One of my personal pet peeves is seeing a SQL statement written right into a ColdFusion page.  Call me crazy, but I think SQL belongs on the SQL server.  So I do my best to move all inline SQL I find into a stored procedure on the SQL box and just call the stored procedure from CF.  Some places I have met with say “Right Answer!” when I lay that out. Yet others have suggested that they don’t like stored procedures at all and only use them when a query is extremely complicated.  Many said they prefer to put their SQL directly into a  DAO (data access object).  I guess at least this puts it outside of a CFM page and into a CFC.  That is more tolerable to me, but still not my preferred way of working.  But at least on this topic there does not seem to be as much passion.


The biggest differences here are not what you would expect.  I haven’t encountered any heated battles over ColdBox vs. FW/1 vs. Mach II.  The opinions are over whether or not a framework is needed.   To me, if you are doing anything remotely complicated that answer is yes.  But to a certain extent I can see the other side of the argument.  In most cases, those companies I have talked to who don’t use frameworks, admit that they have kind of put one together on their own.  I suspect that is usually the case in instances where no formal one is used as it is just a natural extension of good programming.


Since I am a ColdFusion developer most of the opportunities I have explored have been in that realm.  But even in those cases, some companies are looking to migrate away from it.  Here there is a definite split!  Some are leaning toward the wonderful world of PHP. Makes sense. It’s open source, borderline free depending on what you are using it for, and has good solid applications like Magento.

Other companies are leaning toward .Net and C#.  I imagine a lot of it comes down to the same argument had about source control.  .Net for “corporate” feel and PHP for “startups”.  Time will tell I guess.  But I also see me needing to learn both in the near future!

What else?

So what other arguments have you encountered out there in the wild?  What are your thoughts on each of these above.  Leave your comments below and let’s get the discussion rolling!



Getting Dumped While Using MXUnit

With all my real world experience getting dumped, I never thought it could ever be a good thing. But in programming, getting dumped, more specifically, dumping variables, is immensely useful when debugging. I use it all the time when writing code.

But having lately been playing more and more with unit testing, specifically using MXUnit in Eclipse, debugging errors through unit testing seemed a bit more problematic.  I could put dumps in my CFCs but that output would never make it to my test case results. How was I expected to debug that way.

Then I had an idea. Stop me if you heard this one.  Instead of using “writeDump”, I raised an error. I used the throw statement. For the error type I put the name of the variable. For the message I put the value of the variable:  For instance, I put:

throw(message=userID, type=”User ID”);

When I run my unit test in Eclipse in my results I see “User ID: 84756”. Voila!  One caveat  however, and it is a big one, it only works with scalar values.  Figuring out how to dump structures and arrays will be my next task.

Always learning….always growing.

OhRM! Why Aren’t You Updating?

One of the great (and probably terrible) things about having so much to learn in the development world is that I often find myself trying to learn several things at the same time.  For example, late last week I began playing with the jQGrid plug-in. But I had to build back-end support for it, so I did that in ColdBox (which I also have been playing with).

Things went great on pulling the data and pushing it to the plug-in.  But things got more complicated when I had to build the back-end methods for processing the updates from jQGrid.  Building the SQL statements was a challenge. In the back of my mind I heard a voice screaming “ORM” (Object Relational Mapping), but while I have flirted with ORM (by that I mean watched one or two online presentations about it), I hadn’t taken the plunge.  So did I really want to add a third variable to this R&D?  I resisted as long as I could…but going non-ORM with this was getting ridiculous, especially since I was building a back-end to handle just about any table we need it to.  No doubt about it. ORM was the way to go!

So I took the plunge.  First hurdle….how can I use ORM on existing tables without running the risk of it modifying those table structures. A quick Google search brought me the answer (on Ben Nadel’s Blog no less…..a lot of CF developers need to buy him drinks for the amount of time his posts save).  Simply adding:

this.ormSettings = { dbCreate = “none”}

to the application.cfc file solves that problem.  It prevents ORM from making structure changes.  Great!  Now I can move on!

Fetching data with ORM was a breeze!  It also allowed me to eliminate several private methods in my CFC.  Sweet!  And look.  Updating information is as easy as loading an entity, changing its properties, and saving it back out.  Perfect….except….the data in the DB table didn’t change.

What was I doing wrong? I scoured numerous blog posts on ORM, tried everything from saving, to not saving, to flushing….no joy! I spent a good 6 hours or more trying numerous things and cursing this wretched beast known as ORM!!!!

Then I found the problem.  Because I was building this back-end to handle any table we need it to, having to know the names of the setters and getters was troublesome.  In ORM, those are created for you and are named based on the property name. For instance, I have a title field. So the setter is setTitle() and the getter is getTitle(). Simple enough, but I won’t know what fields my entity has until run-time since it will depend on what entity is being requested.  As an aside, would it not make more sense to autogenerate a function called “setProperty” and pass it the property name and value, and a function called “getProperty” and pass it the property name and value, than to generate two functions for each and every property in the entity?  Would love to know why its done that way.

However, one way around this I saw was just to set the property directly on the entity. So if my entity’s name was oTest, I could set the title by saying “oTest.title = “This is a test”.   Basically what is happening is, ColdFusion implicitly calls the correct setter based on the property name…but only  if you put the statement

this.invokeImplicitAccessor = true;

into your application.cfc.  What a great solution!

But what confused me is I had done all of that and still it was not updating my DB.  Hours went by. Finally I tried a test using the setter directly. The database changed.  Looking at the dump of my entity showed it having all the properties I set and a property called “properties” that also had each one of the properties but with the values pulled from the DB. That should have been my clue.  The invokeImplictAccessor setting was failing. It was not giving me an error. It just wasn’t working.   The culprit….support for invokeImplicitAccessor started in CF10. I am developing on CF9.  Grrrr! Not giving up on ORM…just have to go find a workaround now. Suggestions welcomed.

Public vs. Private Functions: When is it just redundancy?

A couple of years ago when I first delved into object-oriented programming I was reading a lot of different resources.  One spent a great deal of time describing “public” methods vs. “private” methods.  While I was a little confused at first, I quickly understood that “public” methods were ones that could be accessed from outside of the package (in my case, CFC), and that “private” methods weren’t visible to anything but other methods within the same package (and probably the NSA).  In other words…the actions that take place “behind closed doors”.

This same resource went on to emphasize that best practices dictate that your public methods should contain virtually none of your business logic. In fact, they recommended that your public methods be nothing more than pass-throughs that send the request information on to a similarly named private method.  For example, if your CFC has a method named “login” that is passed the username and password, the only thing that method will do is call a private method named “_login” (note the convention of prefacing private functions with an underscore), and pass it the username and password. Of course, if the private method returns a value the public method will capture the private method’s return value and echo it back to the original caller.

On the whole, this process makes sense to me and indeed is exactly how I have written my CFCs since.  But I am often finding that my CFCs seem to be twice as long as they should be. If I have four public methods, then I have at least four private methods.  And since I love to comment the heck out of everything, this can lead to long CFCs for fairly simple tasks.

So this has left me wondering what you as a developer do.  Is what I am doing “best practice” or is it just bloating my CFCs? Is there a better approach to this that offers the security of private methods without overloading the file with redundant comments and code? I would appreciate comments and suggestions.

As a side note, I have been wanting to employ this same model in the JS files I write. But I think I must be missing something. I can’t figure out how to make “private” methods in JS. Any insight on this would be great as well.

Still playing catch up….and still learning everyday….and loving every minute of it!

Dropping CFScript Functions into Your JS File

This post is about the cool similarities between Javascript and CF Script in ColdFusion.  But since this is my first post, a little introduction is in order.  I have been a web developer since 1996 and started with ColdFusion in 1998.  But once I got to ColdFusion MX, I got in a rut, lost my passion for programming and pretty much took a nap….a long nap….until about 2011. Boy did I miss a lot!!!  It was like waking up to a whole different world!

What an exciting time to be a developer!  With jQuery and a bazillion other JS libraries, MVC  frameworks, CFScript, mobile development, cool things like node.js  (I hear tell it actually flies little helicopters) and even databases without SQL (who knew that was possible), there is so much to learn!  I want to learn it all! But in the meantime, I hope to share some of what I find with you, both in my day to day work, and in memory dumps of things I have picked up since I awoke.  Feel  free to join me in the journey.

What better  way  to kick off  the Script Van Winkle  blog than with a discussion of script.  Before my nap I had programmed a ton in ColdFusion…but in all tags of course.  I had also programmed often in JavaScript, so that was familiar to me as well.  My first thought when hearing you could now do script in CF was,  of course, “why?”.  It did not make sense to me at first.

Despite being a disorganized mess in my private life, I love organization in my code.  I like it to look neat and easy to read.  I love white space and tabbing lines  to make code more readable.  In playing around with CF Script,  I found it looked more organized.  To me,  it seemed much more readable.   So I got it. I thought I had discovered why CF Script was cool.  It’s easier to read.  All the functions in my new or rewritten CFCs are now in script.

But it turns out there is so much more!  I was working on a project at my day job where, when building the page,  a call is made to a third party image renderer  for a preview image.  I have a function in my CFC (in script of course), that builds the URL to use to call the third party rendering.  It works great!

But we wanted to give the user the opportunity to make changes,  have that image rerender  based on those changes, and to do it without  necessarily having to use our server as a go-between.  So I had to write a JavaScript version of the CFC function that built the URL. This is where it got cool!

I copied the CF Script from that function into my JS file. Did it work right away? Of course not.  But it only took a few little adjustments to get it up and running. I did not have to rewrite the whole thing (and my comments didn’t need to change either).

You can do the same thing…just keep a few things in mind:

  1. Don’t forget, arrays in CF start at 1. In JS they start at 0.  This will likely trip you up at some point. Make sure you adjust any loops to reflect that. This usually entails starting loops at zero rather than one, and often your “less than or equal to” comparison to the length of the object you are iterating over, becomes simply “less than” the length.
  2. Speaking of decision operators, operators  such as  “is less than”, “lt”, “lte”, “gt”, “gte”, “is greater than”, “eq”, “equals”, etc.,  need to be changed to the JavaScript equivalents like “<“,  “<=”,  “>”,  “==”, “===”,  etc.  Make sure you have checked all of your loops for this as well.
  3. Speaking of loops, particularly those of the “for” variety, you can replace the incremental in CF with the JS equivalent. For example: “for (intX = 1; intX LT 3; intX = intX + 1)”, becomes “for (intX = 1; intX < 3; intX ++)”
  4. If you are using ArrayLen or ListLen, or just plain Len in CF, change those to use the “.length” function in JS.  For instance: “ArrayLen(aryItems)” becomes “aryItems.length”.
  5. Functions like “Replace” need to be switched out with JS version.  For example “Replace(strTestString, “saint”, “st.”) in CF becomes “strTestString.replace(“saint”,”st.”)  in JS.  There are a few CF functions that fall into this category.  Just figure that any function that takes a variable name as its first argument in CF probably has to modified.

While the amount of changes necessary will depend on the complexity of your particular function, you will more than likely find that a large percentage of the code is unchanged.  This is especially true if your DOM variables on the client side mirror your variables on the server side.  In my case,  I was dropping the entire object containing the graphics information to the DOM via JSON……but that is another post!

There are many reasons why you should switch to using CF Script, these are but two.  Happy scripting!!!!

© 2018 Script Van Winkle

Theme by Anders NorenUp ↑