Entries Tagged as cfmljure
Even tho' it's far from a 1.0 release, I've updated the cfmljure project on github to contain the latest version that we're using at World Singles and update the examples so they work again, along with updated instructions - mainly that the Clojure code needs to be in WEB-INF/classes/ so that it can be picked up dynamically. This is a fundamental piece of our infrastructure at World Singles, since we rely heavily on Clojure for the Model of our application, with our View-Controller in CFML. It's not intended to be general purpose code but if you want to play around with calling Clojure from CFML, it should get you started.
Don't forget the cfmljure mailing list if you need assistance!
Tags:
cfmljure · clojure · coldfusion · oss
Last year I'd talked about getting at least an alpha of FW/1 2.0 out the door by year end. It didn't happen. I was reminded of this on the FW/1 mailing list the other day and I provided a fairly detailed response on the plans for FW/1. I figured, since I haven't blogged about FW/1 in a while, I should post that roadmap response on my blog as well.
Is the 1.x version outdated?
No, the 1.x stream will continue to be supported. It will get bug fixes
but it will not get new feature - except where I want to provide a
migration path for people moving to 2.0 (for example, if I remove
certain things marked deprecated in the docs, I'll provide the new API
in a 1.x build to make it easier for folks to transition to 2.0). Expect at least a 1.3 version, possibly more. These versions will continue to support CFMX7+ as well as the older versions of Railo and OpenBD that 1.2 currently runs on.
Wasn't 2.0 imminent late last year?
Yes, FW/1 2.0 was very imminent at that point but work and then
conference preparations overwhelmed me and it got put on the back
burner for a while, along with DI/1.
Since a respite is coming in my day job (World Singles) - we're
launching the second phase of our new platform soon - and I have
a couple of months before the next conference, I expect to get back on
top of FW/1 2.0 soon and once an alpha of that is available, I'll work
on DI/1 to get an alpha of that out as well. And then I'll probably
focus on cfmljure for a while, as we start to add Clojure to our
production code base at work. And then it'll be beta versions of FW/1
2.0 and DI/1 and cfmljure, round and round, until they're all three
"baked" and ready for official releases.
So DI/1 is coming?
Yes, DI/1 is still on my radar - I have plans for it at work so it will definitely happen! It's just been delayed (ironically, by the pressures of work). Since FW/1 2.0, DI/1 1.0 and cfmljure 1.0 will all be used in my production code at work, you can expect them to receive regular updates once I actually get to the alpha releases!
Tags:
cfmljure · clojure · coldfusion · di1 · fw1
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!
Tags:
cfmljure · clojure · coldfusion · oss
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).
Tags:
cfmljure · coldfusion · fw1 · oss
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?
Tags:
cfmljure · clojure · coldfusion · oss
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.
Tags:
cfmljure · clojure · coldfusion · oss
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!
Tags:
cfmljure · clojure · coldfusion · oss
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!
Tags:
cfmljure · clojure · coldfusion
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!
Tags:
cfmljure · clojure · coldfusion · oss