An Architect's View

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

An Architect's View

Entries for month: September 2010

cfmljure mailing list

September 21, 2010 · No Comments

I mentioned it in passing in one of my early posts about using Clojure from CFML but, since only one person signed up, thought it was worth mentioning again: there is a mailing list for cfmljure where you can ask questions about the project and Clojure itself or, if you're new to CFML and coming from the Clojure world, you can ask questions about CFML!

I'm planning to add a couple of more involved examples to the project repo, one of which will use FW/1 and have the entire Model built in Clojure with the View-Controller portion written in CFML / cfscript - and I'm also planning to create a simple ready-to-run Jetty-based package so folks can simply download cfmljure and try it out without needing to worry about installing anything.

You can always get the latest version of cfmljure from RIAForge!

No CommentsTags: cfmljure · clojure · coldfusion · oss

FW/1 1.2 RC 2 Available

September 19, 2010 · No Comments

FW/1 1.2 Release Candidate 2 is now available on RIAForge! It contains a number of fixes committed over the last three weeks that address a serious bug found in RC1 and provide some enhancements that improve consistency. If this RC passes everyone's tests, it will be the Gold release of 1.2!

No CommentsTags: coldfusion · oss · fw1

cfmljure updated again

September 18, 2010 · No Comments

I've updated cfmljure to version 0.3 and made a small API change to clean things up and better support access to Clojure variables from CFML - see the last section of the README on the github site.

The API change will break code that tries to use the old public data member .defn. Sorry (but that was an ugly way to implement it, wasn't it?).

In the next week or so, I plan to work up an example application that uses FW/1 and cfmljure together to implement the Model entirely in Clojure and the View-Controller portion in CFML - probably a little contact list manager that uses a database (so the SQL access will be done via Clojure).

No CommentsTags: cfmljure · coldfusion · fw1 · oss

cfmljure updated

September 13, 2010 · No Comments

cfmljure has had a number of updates over the weekend and today to get to a fairly nice, stable API (in my opinion) so I've declared a 0.2 version number and documented as completely as I can for now. The next step is to create a full application example with the model entirely in Clojure that does something vaguely useful - or perhaps the DB access in CFML and the rest of the model in Clojure. Suggestions?

No CommentsTags: cfmljure · clojure · coldfusion · oss

cfmljure and Leiningen

September 04, 2010 · No Comments

Leiningen is a build tool for Clojure that handles all of your project / library dependencies and makes it easy to work in a more test-driven development style. Once you've installed Leiningen, you can start a new project, on the command line, by typing lein new myproject and it will automatically create a project folder structure with a source tree (src/) and a test tree (test/). Leiningen will download and manage all of your library dependencies transparently, just by typing lein deps. Then you can develop you tests and your code and just type lein test to run all your tests to ensure your code is working. When you're ready, you can package up your project as a JAR file, with or without the Clojure runtime, with lein jar or lein uberjar. Leiningen does a lot more, but that's the basic outline.

Because Leiningen assumes a particular directory structure, I have updated cfmljure to work more easily with Leiningen projects and I have updated the examples that come with cfmljure to be a Leiningen project, complete with unit tests so you can see how things work. I've also updated the installation instructions in the cfmljure README on github to show you how to set things up via Leiningen.

Take cfmljure for a spin and let me know if the new installation process, with Leiningen, works for you!

Learn more about Leiningen on github.

No CommentsTags: cfmljure · clojure · coldfusion · oss

Online Clojure Documentation

September 03, 2010 · No Comments

ClojureDocs - Not only will this be useful if you're learning Clojure but it is an awesome example of online documentation! Easy to navigate (drill into Clojure Core and scroll down - the ToC stays visible), everything is categorized, drilling into any function shows examples and you can click to expand the actual source code of the function!

No CommentsTags: cfmljure · clojure · coldfusion · oss

Thinking in Clojure?

September 03, 2010 · 1 Comment

There's a discussion on the Clojure mailing list about how to learn to "think in Clojure" (or think in Lisp or, really, think in functional programming terms). A prominent recommendation is The Joy Of Clojure by Michael Fogus and Chris Houser, which everyone says is a great book, but here are a couple of free online books that were also recommended:

  • Structure and Interpretation of Computer Programs by Abelson, Sussman, and Sussman. It's the "entry-level subject in computer science at the Massachusetts Institute of Technology" and it uses a dialect of Lisp called Scheme, not Clojure, but it provides a good grounding in both computer science and functional programming.
  • How to Design Programs by Felleisen, Findler, Flatt and Krishnamurthi. This is another introduction to programming / computer science style book that also uses Scheme for its examples.

Enjoy!


Update: videos of the Abelson and Sussman lectures, as given to Hewlett-Packard in 1986, are available for download and there are also versions optimized for the iPod etc!

1 CommentTags: cfmljure · clojure · coldfusion

cfmljure - using Clojure from CFML

September 03, 2010 · 5 Comments

If you follow me on Twitter, you'll have seen me posting about Clojure quite a bit recently. I really like the simplicity and elegance of Clojure. I like the function programming style. I like that it's a dynamic scripting language. I like that it can also be compiled to JVM bytecode and used in any mixed-language project on the JVM.

About a month ago I helped someone get some Clojure code compiled and integrated into CFML, like any other Java-based project, but that set me thinking about being able to just use raw Clojure scripts from CFML without needing to go thru the compilation and deployment process. I asked on the Clojure mailing list how to load and run scripts from Java and that gave me what I needed to create a simple CFC wrapper that lets you write Clojure scripts and dynamically load and execute them from inside CFML.

That's how cfmljure was born on github! It's very early days for the project - I consider this an 'experimental' version - but I've created a Google mailing list for cfmljure and it's also listed on RIAForge). I don't expect it to be crazy popular (like FW/1 for example) but I expect to use it on production projects and thought it would be good to put out there for others to experiment with and provide feedback on.

Things on the roadmap include making it more Leiningen friendly (Leiningen is the de facto standard build tool for Clojure and it definitely makes life simpler) as well as figuring out how to access Clojure variables from CFML. I may even try to figure out how to pass CFCs into Clojure and have them be callable (Clojure can call Java but I'll probably go the route of a Clojure proxy function initially).

Have fun with it! Join the Google Group if you have questions / problems / suggestions!

5 CommentsTags: oss · clojure · cfmljure · coldfusion

Scotch on the Rocks 2011 - I'm speaking...

September 01, 2010 · 6 Comments

I'm very pleased to have been accepted as a speaker for Scotch on the Rocks 2011! Wow! What an incredible line up of speakers! It's going to be an awesome conference!

SOTR 2008 was incredible so I was very sorry to have missed SOTR 2009 - due to my wife breaking her ankle! Schedule and finances got in the way of me even considering SOTR 2010.

So what will I be speaking about?

To be honest, I don't know. Topics will be announced in about five or six weeks. I submitted three suggestions to the SOTR folks. I don't know what they'll pick.

But I want to open it up to everyone who'll be at SOTR 2011 - what would you like me to talk about? If there's a strong preference for a topic, even if it isn't one that I submitted, we'll see what we can do about accommodating your choice!

6 CommentsTags: scotch2011 · coldfusion