An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries for month: October 2011

Real World Clojure - i18n resources

October 31, 2011 · 2 Comments

With a name like World Singles, you won't be surprised to know that our dating platform supports several different languages so our (non-Clojure) code is littered with calls like i18n.getResource( keyText, user.getPreferredLocale() ) and i18n.formatRBString( translation, [ arg1, arg2, arg3 ]). The former returns the localized translation for the keyText and the latter replaces substitution patterns like {1}, {2}, {3} with the matching argument from the supplied list.

[

2 CommentsTags: clojure

Real World Clojure - SQL and noSQL

October 30, 2011 · 10 Comments

Persistence is core to pretty much every real world application.

[

10 CommentsTags: clojure

Real World Clojure - Tooling

October 29, 2011 · 5 Comments

The easiest starting point is to get Clojure up and running with Leiningen. Leiningen is an essential Clojure tool that can create projects, resolve library dependencies, compile your code, run your tests, fire up a REPL and a whole lot more.

[

5 CommentsTags: clojure

Real World Clojure - HTML email generation

October 28, 2011 · No Comments

Like many companies, we send HTML emails. This has always been extremely easy in CFML because it has a cfmail tag built-in which allows you to put HTML directly inline inside it - which in turn can include CFML code so the HTML can be dynamically generated on the fly. As we unravel parts of our application model and make them reusable from both CFML and Clojure code, we have to replace low-level CFML code with Clojure because, right now, CFML cannot be easily called from Java code, especially outside the Servlet in which CFML runs.

[

No CommentsTags: clojure

Real World Clojure - XML generation

October 27, 2011 · No Comments

As mentioned earlier in this series, we have a process written in Clojure that reads updated member profiles from our MySQL database, converts them to XML and posts them to our search engine. XML generation in Clojure is made very easy by using a library called hiccup.

[

No CommentsTags: clojure

Real World Clojure - environment control

October 26, 2011 · 2 Comments

Our platform uses some minimal per-environment configuration to determine on which tier it is running: dev, CI, QA, production. We have a fairly large number of application settings which vary by tier, such as data sources, ports and hostnames for external services, email addresses to be used for error reporting and so on.

[

2 CommentsTags: clojure

Real World Clojure - PowerMTA log files

October 25, 2011 · 1 Comment

I've touched on this in an earlier blog post about parsing PowerMTA accounting files but I wanted to cover it again as part of this blog series and go into a bit more depth. In that earlier post, I showed an outline for processing the large CSV files produced by PowerMTA but there are some interesting smaller pieces of the puzzle that warrant coverage too.

[

1 CommentTags: clojure

Real World Clojure - Prelude

October 24, 2011 · 3 Comments

Clojure is still a fairly new language with a growing community that is very passionate about it. Understandably, folks new to Clojure - or still in the process of evaluating it - are concerned about how Clojure can be used in the "real world", to solve everyday problems that regular companies have. Alex Miller recently posted about how Clojure is used at Revelytix and whilst Alex provided the big picture, with both pros and cons, he didn't drill down into much detail.

[

3 CommentsTags: clojure

cf.Objective() 2012 - Call for Speakers

October 21, 2011 · 3 Comments

The call for speakers for cf.Objective() 2012 is now open. You can either submit proposals for something you'd like to talk about or make suggestions for topics you'd like to see someone else talk about.

Right now, I don't know whether I'll submit any proposals. I'm not sure what topics I'd like to promote. I don't want to do another "Intro to FW/1" (but I'd be very happy to see others continue to promote FW/1 - and I'd hope someone will mention DI/1 alongside FW/1!) and most of the non-FW/1 stuff I've been doing has been Clojure, at least in terms of open source projects. If you have ideas for something you'd really like me to submit a proposal on, let me know!

3 CommentsTags: coldfusion · cfobjective

DI/1 0.1.7 available for testing

October 16, 2011 · 2 Comments

Things are moving along with DI/1 now that FW/1 2.0 is close to Gold status and you can download version 0.1.7 now. I'd still consider it pre-release but it's getting close to a true Alpha release with only one (hard) open issue to solve. Read on to see the recent changes...

[

2 CommentsTags: coldfusion · di1