The inside scoop on what's happening with Tapestry ... from the creator of the Apache Tapestry framework. Plus all the normal, random thoughts on coding and technology.

Tapestry Training -- From The Source

Let me help you get your team up to speed in Tapestry ... fast. Visit howardlewisship.com for details on training, mentoring and support!

Sunday, October 04, 2009

Cascade Exception Reporting

I've been taking a little time from my billable projects to continue working on Cascade. One feature that's very important to me is to have great exception reporting, akin to Tapestry's. Here's a current snapshot of where I am:

This is very Tapestry-like (I've even borrowed the CSS styles). You can even see the start of the Request object's properties being displayed.

Something to notice here: Clojure stack frames are in Clojure syntax. To appreciate this, see what you get when you click the "Display hidden detail" button:

The exception report view is omitting a lot of clojure.lang internals, and it is working backwards from the mangled Java class name to the Clojure namespace and function name. This, plus only displaying the stack trace for the root exception, makes it much more reasonable to figure out where problems are actually occurring.

I expect to expand this further, adding a pop-up or hover window to display Clojure source associated with the stack frame.

8 comments:

Chewy ... please take another look at the first screen shot ... that's exactly what's going on; we're de-mangling the Java class names to Clojure symbols, and we're hiding a lot of stack frames that are part of the "Java under-pinnings" of Clojure.

Howard, I realize that, and it is a vast improvement over a raw clojure stack trace. I just think there's room for hiding even more internal details. It's still showing core.clj calls and cascade calls for example. As a first step I'd like to see just my application

BTW, one confusing thing. From your screenshot it seems that when the checkbox "display hidden detail" is checked that it's actually hiding details.

My intention is to highlight the application-specific stack frames, but leave all the Clojure ones in there. Also, I'm not sure what was up with the screen-shots; I'm not sure how I managed to get the checks reversed (when I run it, it works as expected: no-check == most data hidden).

There is no Tapestry integration, or any point to one ... very different world views: Tapestry is very, very stateful. Cascade is (ideally) totally stateless.

Cascade is a learning exercise for me, in a domain I know backwards and forwards. That it may also be very useful to a certain class of developers is a very nice bonus.

My longer-range plan includes building graphical games using Clojure (on top of Java2D, not Cascade). However, I'm not a domain expert there, so I'd be fighting two battles. The focus I get writing Cascade (from a Tapestry background) pushes me to explore more of Clojure in ways that just playing around would not.

Should anyone be concerned that your long-range plans do not have Tapestry in them? Your involvement with Clojure and Cascade are nice, but they do kind of validate the point not to stick with a framework that is a one man show...

@Craig ... right, and the fact that I'm writing code for the Adruino means I'm going to abandon Java and start coding for micro-controllers exclusively.

This came up on the mailing list earlier ... same response here: everyone should keep learning new things to keep their brain fresh. I enjoy Clojure a lot and I hope to start teaching Clojure to people, but it won't replace Tapestry in any significant way.

There's lots of cool ideas in Tapestry but they didn't just magically appear inside my head. Many of the best ideas in Tapestry started with the other committers, or with the user community, and I've just refined and streamlined them a bit. Other great ideas in Tapestry have come about from seeing what other projects are doing ... or even from previous times I've dabbled in other languages.

Tapestry is far from a one man show ... in fact, as I've stepped back temporarily to build up my independent consulting career, you can see that the other committers have been much more active. Not sure what the cause and effect is there, but it's very telling regardless.

Day to day, my main work is Tapestry and that's not going to change any time soon! I haven't been up to my normal furious level of commits because of I've been preoccupied with other tings: mostly project work for my clients, and prep work for some training, but also some physical computing with the Arduino, learning a bit about Cappuccino, and yes, Clojure/Cascade.