Building Better Web Apps in Cappuccino
Believe it or not, we have several applications built using Excel and Excel macros that employees at SPARTA use. So each time we update the Excel file, we have to send it out to the users manually. There are issues with these apps running in Excel 2007 that we haven’t fixed yet, so whenever someone inadvertently upgrades, we have to get them to downgrade to Excel 2003.
So for many reasons, we’re replacing these Excel-based apps with a web-based system. As is typical with SPARTA, we’re the exception to every rule, so no Commercial of the Shelf (COTS) system really did everything we needed it to do. So now it falls on us to develop the web application. One decision we’ve made was to make the web version similar to the Excel-based versions to reduce the learning curve. Then as users get used to the web apps, we’ll gradually make changes and redesigns as we find necessary.
One of the apps is mostly just a report viewer, so it will be built using a traditional XHTML/JavaScript interface to mimic the Excel functionality. Of course, we will be offering methods to export the data so the users can use the data in a way they’re more comfortable, but we’ll take care of all the calculations and data persistence on the web server.
The second web app, of which I am in charge, is mostly just a data-capture application. It needs to do a lot more than the reporting app, so we decided to go down the path of creating a full-on web application. For that, we have decided on developing the app in Cappuccino.
Cappuccino is a JavaScript-based framework for developing web applications. For anyone familiar with programming for the Mac or iPhone, it’s touted as “Cocoa for the web”. Just like how Cocoa is built on the Objective-C language, Cappuccino uses its own Objective-J language. Where Objective-C is a superset of the C language, Objective-J is a superset of JavaScript. Which means even when coding in Objective-J, you still have access to all the regular built-in JavaScript functionality, much like C functionality is available to Objective-C applications.
In fact, the Cappuccino team has already ported many of the frameworks available in Cocoa to Cappuccino. So really, any seasoned Cocoa developer could easily create a Cappuccino application with minimal learning required. The Cappuccino team even points out that one iPhone developer was able to port a game he created for the iPhone from Cocoa to Cappuccino in just one hour.
They’ve also created an impressive web application, written entirely in Cappuccino and Objective-J, that is essentially a web-based version of PowerPoint called 280 Slides.
How is Cappuccino any different than any of the other JavaScript libraries like jQuery, MooTools, Script.aculo.us, etc? Well, they all use the same basic fundamental design: you build your site using HTML and CSS, then you plug in the library where necessary. Cappuccino apps require no knowledge of HTML or CSS; it builds the HTML and CSS for you in your application. So you spend more time developing the application, and less time worrying about design or attaching your JavaScript to your HTML.
We’ve had a chance to test out and develop a few test applications in Cappuccino and I’ve been very impressed so far with the results. We’re finally moving ahead on these applications, so as I use Cappuccino and Objective-J, I will likely be posting up some thoughts and maybe some tutorials as I see fit.






