read

Now that I’ve finished implementing a trivial timer application in Cappuccino, RestfulX and SproutCore, I want to delve into and compare a few aspects of developing in these frameworks. Of course all of my comparisons will be biased by my choice of application to implement, so I’ll certainly miss exciting parts off these frameworks that I didn’t have the opportunity to explore.

One aspect of working with these client-side frameworks that I found challenging was debugging, which is particularly important when first learning them and experimenting with how to properly use their not always well documented APIs. Compared with server-centric frameworks, even ones based on dynamic languages like Ruby, there are far fewer clues when something goes wrong.

YMMV

When the client lives in the browser, your choice of browser and accompanying tools/add-ons becomes important. The two real choices seem to be either Firefox with the Firebug add-on or Safari with its developer tools. As I’m developing in Linux, I use Firefox/Firebug, so my comments may not be valid for Safari

Compiled or non-compiled

One of the best and worst things about using RestfulX is the compile step. It slows down the development cycle a bit, but does catch a lot of errors. This would be a moot point if SproutCore and Cappuccino were able to report errors, but unfortunately that’s often not the case. I found that both of these frameworks repeatedly left me either with a blank page or a semi-functional interface and no console errors to help me find where things went wrong. Of the two, SproutCore seemed to provide helpful error messages more frequently, and when it did it could show the location of the error in the source, which isn’t currently possible with Objective-J

Logging and Breakpoints

I could be wrong, but from what I understand the only way to use breakpoints with RestfulX (Flex) is to use Flex Builder. Given that it costs a bit of money and I only wanted to briefly explore RestfulX, I stuck with logging, which still took a bit of effort to set up since I needed to have the developer version of Flash. SproutCore had the best free breakpoint setup since all the code is JavaScript and you use the breakpointer in Firebug as you would with any other JavaScript code. It’s also supposed to be possible to hard code breakpoints into your code in Cappuccino and then step through the Objective-J that’s been turned into JavaScript, but I ended up sticking with just plain old logging for Cappuccino as well.

Conclusion

Overall, given that I’m using Firefox and Firebug I found the SproutCore and RestfulX debugging processes to be equal in difficulty, but for different reasons, and Cappuccino slightly harder than either.

Blog Logo

Bruz Marzolf


Published

Image

Destructured

Back to Overview