Early in 2012, Chris Granger - former Program Manager for Microsoft's Visual Studio
product, Bay Area resident, and Clojure enthusiast - released a proof of concept video
for something he called "LightTable", a radical rethinking of our traditional programming
environments. Over the next few months, new videos appeared, followed by a KickStarter
...and gradually the vision of LightTable turned into a series of working software
sketches that drew an ever-increasing number of users, taking advantage of LightTable's
rough edges - until just the other day when LightTable reached a stage where Chris,
and his new team, felt it was ready to be released to the public:
became open source and it also sprouted an ecosystem of plugins.
LightTable is still young but it is already a usable editor with some very unique
features. Over the last year I've kept dipping into LightTable to see how it is
evolving but it's been too rough around the edges, and too feature poor, to use for
anything more than small projects for short periods. It's always shown tremendous
promise though so I knew it was only a matter of time...
...and with the new release, and the plugins available, today I was able to use
LightTable for all of my editing needs (and I'm writing this blog post in it as
well!). Today I've been exploring the
Monger library for MongoDB.
We've been a CongoMongo shop for a couple of years but there are all sorts of reasons
why we're concerned about continuing to rely on that library (and I'm pretty much
the de facto lead on the project!). LightTable's live evaluation and inline
documentation make it really easy to explore and play with new libraries and to
evaluate how a particular library will work with your code.
As I said, LightTable is still young. The plugins available so far are pretty basic.
I'm an Emacs user so I'm used to full keyboard control, integrated Git, and a whole
bunch of powerful packages. That said, LightTable is already doing well: the Emacs
key bindings are usable (but still quirky), there's a great REPL experience,
rainbow delimiters and the Claire plugin provides a good first step toward the
ido-mode C-x C-f experience. Git integration is the biggest missing piece for me right
now. Global find and replace. An integrated shell. And an IRC client would be icing
on the cake.
So I can't leave Emacs behind yet. I doubt I'll be able to leave it behind for
a while. But I expect I'll be able to use LightTable for more and more serious
work going forward.
If you're a ColdBox fan, don't forget Into The Box the day before cf.Objective()!
cfobjective · coldbox · coldfusion
This release contains minor bug fixes compared to 0.3.0, with the main focus being an overhaul of docstrings etc to improve the auto-gen'd documentation.
The community documentation for java.jdbc on clojure-doc has also had a major overhaul.
Details of this release:
- Add nil protocol implementation to ISQLParameter.
- Improve docstrings and add :arglists for better auto-generated documentation.
- Make insert-sql private - technically a breaking change but it should never have been public: sorry folks!
- Provide better protocol for setting parameters in prepared statements JDBC-86.
- Fix parens in two deprecated tests JDBC-85.
- Made create-table-ddl less aggressive about applying as-sql-name so only first name in a column spec is affected.
Please note that the 0.3.1 release is broken and should not be used.
If you've seen my tweets over the last couple of days, you'll know that I've been taking a look at TestBox, the new testing framework from the ColdBox team.
You might be thinking "Do we really need a new testing framework?" and it's a reasonable question. CFML has had a number of testing frameworks over the years but mostly we've seen each one come and go as maintainers have moved onto other things: cfUnit, then cfcUnit, then a brief resurrection of cfUnit, then MXUnit. Does anyone remember cfSpec? I liked that a lot - I like the Behavior-Driven Development style of writing tests. That's why, at World Singles, we use the Expectations library for almost all of our Clojure-based tests.
So why the interest in TestBox? My initial interest was spurred by the inclusion of the BDD style of tests which I find both more natural to read and a better fit for expressing requirements for software that is yet to be written. Then I read that TestBox has MXUnit compatibility which intrigued me - we have been using MXUnit for several years at World Singles and I don't relish having to rewrite all those tests. If TestBox could allow us to run our existing "xUnit" tests as-is while we write new tests in the BDD style, I'd be very happy.
Adam Cameron has been blogging about Test-Driven Development recently and has also picked up on TestBox. He just blogged about trying TestBox on his extensive MXUnit test suite and you can see he ran into a number of issues, all of which he has reported, and which I expect we'll see fixes for. My experience was more fruitful than his - as I mentioned in my comment on his blog post: just two small changes got the whole of our suite running flawlessly!
My next challenge was integrating TestBox into our automated build / test script, which uses Ant. TestBox provides a runner-template that shows how to do basic Ant integration. I followed that recipe but discovered there was no way for Ant to see that any tests failed and so I couldn't "fail the build" if TestBox found errors or failures. After studying the source code briefly, I realized I could extend the TestBox CFC and provide a way for the runner CFM template to access the details of the TestResult object, and write a property file that Ant could read and fail if a certain property was set. Time to fork the ColdBox Platform Github repo and send a Pull Request to add build failing functionality which Luis merged in within a few hours! Nice!
With that in place, I was able to delete MXUnit from the World Singles repo and rely entirely on TestBox for all our testing needs!
Whether you prefer the "xUnit" style of tests, with assertions, or the "BDD" style with expectations, TestBox can support you, and even if you have a lot invested in MXUnit, migration to TestBox should be straightforward (especially once they address the issues Adam has raised). I think we can be sure of ongoing support and maintenance - based on the well-established track record of the ColdBox Team. I think TestBox is a safe bet. Now you just need to start actually doing some automated testing :)
bdd · coldbox · coldfusion · tdd · worldsingles
Framework One version 2.2 is now available for production use! You can download it from the Framework One page on RIAForge. This includes one bug fix over RC2 (interaction between renderData() and trace output).
The main focus of the 2.2 release is improved support for REST APIs, through the addition of renderData() to simplify returning JSON, XML and plain text results to the caller, as well as more sophisticated route handling via "resource packs" which let you define a family of related routes for a given resource type, using a shorthand notation. For more information, see this blog post about the latest FW/1 release and the roadmap.
As noted previously, the master branch is the current stable release (2.2), and the develop branch has become the next release (2.5). 2.5 will be released next month and will be a stepping stone toward some substantial changes coming in 3.0. For more detail, read this blog post explaining the changes coming in 2.5 and 3.0.
coldfusion · fw1
The "gold" release of the Clojure contrib library that wraps JDBC is now available on Maven Central. This release has been in the works for most of this year, as it introduces large changes from the previous "gold" release (0.2.3) that aim to make the library more idiomatic and easier to use in a multi-threaded functional environment. In order to provide a smooth migration path, the old API from the 0.2.3 release has been moved wholesale to the clojure.java.jdbc.deprecated namespace, and the new API in 0.3.0 uses new naming for almost all of the (new) functionality.
The main API change is the removal of the dynamic global variable *db* and the with-connection macro. Instead you now pass the database spec as an explicit argument in all calls, and you can share connections across multiple SQL operations either by using connection pooling (recommended) or the new with-db-connection macro that takes an explicit binding for (a connected version of) the database spec.
A common problem with the old API when performing queries was that with-query-results required care because the result set was lazily constructed and it was easy to let that lazy sequence escape and have the connection closed before you had finished working on the results. The new API provides a query function that, by default, fully realizes the result set to avoid that problem. You can still process very large result sets lazily by passing :row-fn and/or :result-set-fn arguments to query.
For more details of the new API, you can read the reference documentation for clojure.java.jdbc. For a summary of all the changes made since the 0.2.3 release, read the clojure.java.jdbc change log on Github. To use the library in your project, see the clojure.java.jdbc dependency information on Github.
Detailed documentation on using clojure.java.jdbc is being developed for the Clojure Documentation Site and will be found in the java.jdbc section of the Clojure ecosystems area, once the site has been refreshed from the markdown sources on Github.
Clojure's low-level JDBC wrapper inches closer to a gold 0.3.0 release with the first release candidate. Read more on clojure.java.jdbc's Github repo. The changes in this release are:
- Deprecate db-transaction (new in 0.3.0) in favor of with-db-transaction JDBC-81.
- Add with-db-metadata macro and metadata-result function to make it easier to work with SQL metadata JDBC-80.
- Add with-db-connection macro to make it easier to run groups of operations against a single open connection JDBC-79.
- Add ISQLValue protocol to make it easier to support custom SQL types for parameters in SQL statements JDBC-77.
- Add support for :isolation in with-db-transaction JDBC-75.
- Add :user as an alias for :username for DataSource connections JDBC-74.
The reference documentation for clojure.java.jdbc has already been updated. The Clojure Documentation Site java.jdbc section has been updated in Github, pending a regeneration of the site.
Framework One version 2.2 release candidate 2 is now available for testing (download from the Framework One page on RIAForge). This includes a couple of bug fixes, compared to release candidate 1. See the FW/1 2.2 RC2 release notes on Github for more details. Unless any showstopping bugs are found this week, the final 2.2 release will be made early next week, merged to master, and then develop will become the 2.5 branch.
See FW/1 Releases and Roadmap and FW/1 - The Year Ahead for more information about the upcoming 2.2, 2.5 and 3.0 releases, as well as plans for DI/1.
coldfusion · di1 · fw1
A year ago I bought a Windows 8 laptop. How has it stood the test of time?
[Read more →]
wifi · windows8
Based on feedback from the community, I have released clojure.java.jdbc 0.3.0-beta2 to Maven Central.
This includes two very important changes:
- The clojure.java.jdbc.sql and clojure.java.jdbc.ddl namespaces have been removed.
- The API functions that were already marked as deprecated have moved to the clojure.java.jdbc.deprecated namespace
This means that if you depend on the clojure.java.jdbc.sql or clojure.java.jdbc.ddl namespaces, which were introduced in 0.3.0-alpha1, you will need to switch to the java-jdbc/dsl project (release 0.1.0 is on Clojars). The new namespaces in that project are java-jdbc.sql and java-jdbc.ddl. If you depend on these namespaces, I strongly recommend you migrate to a more sophisticated DSL, such as:
- HoneySQL - https://github.com/jkk/honeysql
- SQLingvo - https://github.com/r0man/sqlingvo
- Korma - http://www.sqlkorma.com
More importantly, if you depend on the older (0.2.3) API in clojure.java.jdbc, you'll need to switch to the clojure.java.jdbc.deprecated namespace in your code, until you can migrate to new API in clojure.java.jdbc instead.
These steps are more radical than I would have liked but they simplify the library and streamline the API - and the auto-generated documentation - which should reduce all the confusion expressed about the library right now. This will allow the library to move forward in a more focused manner, with an API that no longer depends on dynamic variables.