Cappuccino’s FlickrDemo in 45 lines of jQuery
brokendigits.com
brokendigits.com
It actually highlights several of the reasons we set out to do Cappuccino in the first place (some of which might be offensive to web developers):
1. This is minor, but the speed comparison is a little unfair, since the original has 3 times as many photos to scale. Yes, Objective-J method calls have a little bit of overhead, but in profiling a real world application (280 Slides), the message dispatch overhead is not a bottleneck (something like 1%).
2. It's 45 lines of JavaScript... plus several hundred lines of CSS. With Cappuccino you don't have to write CSS, ever. Some may see this as a disadvantage, but we don't. No more fiddling with CSS hacks to get it to look right in all the major browsers, which brings me to my next point.
3. It doesn't work correctly in at least Firefox 2 (OS X) and IE. Yes, this could be fixed, but it's another thing you (theoretically, and usually practically) don't need to worry about when developing in Cappuccino.
4. Cappuccino is designed to scale. The FlickrDemo is a small demo which is just that, a demo. It's definitely on the small side of the types of applications Cappuccino is good for. I'm not bashing jQuery, but I'm honestly curious if anyone can point me to an application written in jQuery approaching the complexity of 280 Slides.
Try writing 280slides in jQuery to see why complexity can be hard to manage.
I just don't think your assertion is a slam-dunk. HTML is remarkably good at describing layouts, and HTML+js is remarkably good at making very complex UIs that would take hundreds of lines of code to replicate, even in Cocoa.
That said, once you get to a certain point, the need for further abstraction disappears. Obviously, Lisp-like languages are the epitome of what I'm getting at: as soon as you have powerful macros, you can make the programming for any application trivial by defining a high-level base for it. Domain-specific languages, while typically not as powerful, are also hard to beat, since it doesn't get much easier than, "Put an image with these dimensions <here>."
My point is that jQuery is a powerful enough language (having great abstraction capabilities even if it falls short of Lisp) and HTML and CSS are great DSLs. The combination of the 3 are simply good enough to make defining an entirely new approach a game of diminishing returns.
Of course writing C is more productive than writing assembler. Is writing Cappuccino easier than using jQuery/HTML/CSS? This submission raises the possibility that it is not.
As a developer I'm wary of learning new platforms until I know that I am going to get returns on my new knowledge(skills). We all have limited time, and there are plenty of techniques or popular platforms I could be learning or improving on that I know will make me employable in more situations.
Make an IDE with a blank page and a bunch of "tools" on a toolbar. One can drag a tool to the IDE, double click it and type alert('hello world'). I remember when I first did that using VB5. How exciting that moment was when the dialog displayed.
Make the start very easy. What the web needs is a gui builder.
Further I see the trend more and more web development is shifting to model of desktop application development; as most good programmers can keep whole thing in head while designing complex web application.
jquery is sweet and fits the bill all the time.
Examples for the trend are
1. GWT
2. Apache Wicket
3. Cappuccino
Although I doubt the Cappucino version was written with line count in mind.
There are a lot of advantages of having this layering (usability, degradable functionality). The biggest problem I see is network latency and rendering appears slower while HTML loads progressively. What are the pro arguments in favour of removing this layer?
The biggest (pro) argument I can think of is reliability in construction, cost & development speed. Less to worry about reliably piecing together sites with css/html.
This isn't so much of a problem for the types of applications Cappuccino is intended for: long running applications, rather than transient web pages.
In fact, in some cases 280 Slides launches faster than PowerPoint or Keynote. Uncached I often see load times of about 3 seconds. Cached is about half that.
Good point I totally missed this.