DEV Community

Discussion on: Five Reasons to Learn CF in 2019

 
mikeborn profile image
Michael Born • Edited

Lot of great questions here!

I think Chris' point was that Coldfusion is not a variant of XML, thus it is being unfairly removed from the ranking entirely.

  1. As an answer to your Google Trends graph, allow me to point you to the Google Trends graph for HTML. Should we abandon HTML? It's obviously unpopular. ;)

  2. I mentioned this briefly in my Why CF? article. In short, CF has two equally powerful syntaxes, and new developers can choose from an HTML-like syntax or a Javascript-like syntax. Error messages are simple and straightforward, unlike the mess you get with minified JS or C compiling, and most functions are designed and named consistently, unlike PHP in the older years.

  3. Yes, there are fewer open source libraries for CF than other languages, mainly because most CF applications are classified or proprietary or both. I don't think the licensing has a factor - I haven't used the licensed version of Coldfusion in years. Most folks in my circles use Lucee, the open source variant. If you want to see CF open source stuff, check out ForgeBox Oh, you can also use any open source Java library within CF if you so choose, by the way, so the "lack" of native CF libraries is not really an issue. As an example, I used a Trulia-built Java library to build a set of RETS data imports really easily a few years ago.

  4. Most of the time, CF's builtins are fantastic. Again, see my Why CF post for how awesome it is to send an email with three lines of code, or watermark/resize/downgrade images with 1-5 lines. There are a few instances where the implementation is poor, such as the built-in REST api. In this case, the community warns against it and advises folks to use open-source frameworks such as Coldbox or Taffy.

  5. See my Why CF post, or this very post above. :) Yes, it is easy to create your own libraries, that was a main point I wrote about in this post. CF is easier (far easier) to build apps in than any other language I have programmed in.

  6. Hmm, I'm not up on functional programming, so I don't know exactly which feature you are asking about. I do know that CF supports functions as a first-class citizen, and thus there are a lot of higher-order functions in CF which are useful for manipulating arrays, structs, lists and query objects. I'm slowly moving to the use of these higher-order functions, using member function syntax and Lucee's awesome new lambda expressions: var submittedCommentIsVulgar = allBadWords.some((word) => return form.comments CONTAINS badWord); I'm actually working on writing a post on Lucee higher-order functions which should be out in a few days.

  7. Drawbacks... CF is not perfect, and you are right that it is a less-used language. (Although it is a good deal more popular than most folks realize.) One big drawback of CF is Adobe itself - Adobe's high licensing costs, terrible (non-existent) marketing and poor treatment of the CF community has turned off many developers. I have moved from Adobe CF to Lucee, and there is a big improvement in features, community support (the Lucee team talks to and works with the community), and of course it's free so it's just a better situation all around. Also, because CF is based on Java it has a bit of overhead for starting up instances - think 20-60 seconds for a new server. This is not a large problem, because how often do you spin up a new server? Just something to consider. The Lucee team is working on shrinking the build size, and you can already download a .jar file with no extensions hovering at ~17MB.

  8. Yes, CF is multi-threaded. Each request is assigned a new thread, up to the specified thread limit. You can also bake in threading as necessary, for example: wrapping HTTP calls into a separate thread. Finally, a lot of new features like arrayMap and arrayEach support a parallel function, so you can loop over an array, perform complex/time-intensive processing on each item, and let Lucee thread the work based on machine capabilities.

  9. CF is awesome for CRUD apps, data processing, and web apps. Basically any app where you need to touch a database is so so easy in CF.

  10. I would not use CF for implementing new encryption algorithms, powering a space shuttle, or heavy string parsing. Pretty much any real-world web application can be easily written in CF. Just make sure you follow standard best practices - don't do stupid things and then blame the language, as many CF detractors seem to do.

  11. Most popular CF open source application is probably Coldbox, an MVC framework specializing in REST APIs.

I sure hope you appreciate this comment, cuz it took me like two hours. :) Thanks for your honest, intelligent questions!

Thread Thread
 
nielsbom profile image
Niels Bom

Hey cool, thanks for the long answer :-)
I read it twice :-)

One more followup to the threading question, are you talking about OS-level threads there?

Thanks!

Thread Thread
 
mikeborn profile image
Michael Born

Well, are there any other kinds of threads? I know that it uses Java threads under the hood, so however Java does it is how Coldfusion does it.

With that said, here's an article of how Java threads work: geekyarticles.com/2011/08/java-thr...

Hope that helps!

Thread Thread
 
nielsbom profile image
Niels Bom

I’ve been learning Elixir and that has very lightweight processes for concurrency, and I believe Go also has some lightweight concurrency built-in to the language.