Atom: First Impressions

I spent a bit of time today playing with Atom, and it does not suck. I have to admit I went into it with low expectations.

Things I like (in no particular order):

  • a UI that obviously is designed to support largely keyboard-driven interaction (e.g., it is very straightforward to turn on/off soft-wrapping of text, something that I need for whatever I use for my Q&D text editing, as soft-wrap for drafting text = necessary while soft-wrap for any sort of code = worse than bad),
  • a language mode for CFML (thank you, Adam Tuttle) already available,
  • availability of Emmet as a package,
  • a reasonably-polished preferences UI that makes it simple to configure.

Perfect? Not by a long shot. But good enough to convince me that I need to poke a little further before I write it off.

Setting Up a Fake SMTP Server

On my team’s various development boxes (which are almost always laptops and therefore not always connected to our corporate intranet and sometime not on any network), we have typically configured our ColdFusion and Railo application servers to use our internal mail servers. Many of our Web applications send user-composed, automated, or process-based email messages, in addition to security-related event notifications. We’ve been bitten a couple of times in developing this mail-related logic, with messages being generated and sent to real system users from our development servers which, as you can imagine, has significant potential for generating concern and/or confusion on the users’ part. This hasn’t happened recently, in part because we are collectively more careful and in part based on our approach to how email gets addressed depending on whether the app is running on a development, testing, or production server.

I’ve long believed that a safer approach would be to configure our non-production servers to use something other than a “real” mail server. I’m in the process of standing up a new development system for myself, and decided I was going to poke at this a bit. For this first foray, I wanted something

  • simple to set up, configure, start, and stop
  • free
  • preferably available cross-platform (my team develops on Mac OS, Linux, and Windows systems based on developer preference for platform)
  • completely local (because of the need to be able to run without being on a network)

A solution would need to support SMTP, as both the ColdFusion and Railo application servers are configured to talk to an SMTP server. Anything beyond that set of basic requirements would be a bonus.

After a bit of looking, I decided to use FakeSMTP. It ticks all of the above boxes, and is implemented as a single Java JAR compatible with Java 1.6 and above. It has a simple UI for watching activity and  “outbound” mail handed to it, and can easily be configured to store transmitted mail messages to disk as .eml files for review (making developing email-related content fairly straightforward).

I use a bash shell script to start and stop my Tomcat instances for ColdFusion and Railo, so I added logic to that script to optionally start and stop my local mail server, as follows (wrapped here only for presentation):

# Start our fake SMTP server:
if [ "${3}" = "mail" ]; then
  java -jar ~/opt/fakesmtp/fakesmtp-1.13.jar -s -b -p 2525 \
    -o ~/opt/fakesmtp/out/ -a 127.0.0.1 \
    >> ~/opt/fakesmtp/logs/fakesmtp-`date +%Y%m%d`.log &
fi

and

# Stop our fake SMTP server:
if [ "${3}" = "mail" ]; then
  kill `ps -a > /tmp/ps.out && grep -i fakesmtp /tmp/ps.out | \
    cut -f 2 -d ' ' -`
fi

The start logic runs the mail server in the background (as I really don’t intend to use the UI), listening on address 127.0.0.1 and port 2525 (to avoid needing to run with elevated privileges on the default SMTP port of 25). It dumps mail messages to a folder for review, and logging server activity to a log file with a date-based name. The stop logic finds the mail server process and kills it.

I’ve tested it with both ColdFusion and Railo application servers, and it works. I will probably add some shutdown-related logic to do a bit of cleanup to make sure neither the log files or the saved email files get out of control.

Final thought: If it weren’t for my desire to be able to run completely standalone at times where I either do not have access to or do not want to use a network connection, I probably would have gone with something like Debug Mail. I have not used it, but it looks excellent. Given Railo’s ability to configure multiple mail servers, I may still play with it a bit as part of my solution.

New Dev Boxes

It is time: I’m standing up a couple of new development systems, so I am going to use Tomcat 8 and Java 8 as the basis for deploying Railo and Adobe ColdFusion 10 on them. This is the first time I’ve done anything with either Tomcat 8 or Java 8 as the base for the application server stack but with Java 7 set for EOL this (I first wrote “next”) year, the timing for moving seemed appropriate.

I have Railo deployed and running without issue on the first of the two systems, and have encountered no issues at all to this point.

I will blog a bit in the near future to describe my approach and a couple of minor Tomcat differences I have found.

Updated 2014-01-02: Well, that didn’t take long to go sideways… I spent several hours this afternoon trying to deploy ColdFusion 10 on Tomcat 8, and so far have been unsuccessful. I can get the WAR to unpack, but the application simply refuses to start with a very non-specific error in the Catalina log file that (I’m guessing here) appears to indicate an incompatibility with Tomcat 8 in ColdFusion 10. More to come, but my next run at this will probably be to drop back a step or two and try deploying on Tomcat 7 and Java 8.

Updated 2014-01-03: Moving forward again. As of this morning, I now have both Railo 4 and ColdFusion 10 deployed against Tomcat 7 and Java 8.

Komodo-CFML: A quick status update (2014-11)

It’s been a bit since I’ve said anything here about Komodo-CFML, and thought a quick update would be appropriate.

As of last weekend, I finally was able to get a version of Komodo-CFML to work successfully on the version 9 alpha builds of Komodo IDE ActiveState has made available beginning earlier this year. I had hoped this not be a big deal, but it ended up taking quite a bit more time and effort than I had hoped. In the end, I resorted to rebuilding the plumbing for the language extension from the ground up in order to get it to work. So, that’s done (and I am currently using v9 with Komodo-CFML as my primary CFML editor on a daily basis).

With that hurdle out of the way, my intent is to get back to implementing tag/attribute support for both Adobe ColdFusion 11 and Railo 4.2. I’m also including a handful of useful (to me, anyway) macros with the language extension. I’ve made a small handful of minor tweaks to the language syntax highlighting, most of which are in the handling of CFSCRIPT syntax as I use it more and more rather than tag-based coding.

I’m hoping to have a version 0.2.4 with all of this available by the late November timeframe, shooting for something around Thanksgiving. If you are using Komodo-CFML and want to use it with the early versions of Komodo IDE v9, let me know in the comments below and I will send you my current working version with v9 support.