<linkrel="alternate"lang="fr"xml:lang="fr"title="Cappuccino ou jQuery ?"type="text/html"hreflang="fr"href="/Scratch/fr/blog/2010-07-05-Cappuccino-and-Web-applications/"/>
<linkrel="alternate"lang="en"xml:lang="en"title="Cappuccino vs jQuery"type="text/html"hreflang="en"href="/Scratch/en/blog/2010-07-05-Cappuccino-and-Web-applications/"/>
<li>Tried to make <ahref="http://yannesposito.com/Softwares/YPassword.html">YPassword</a> in jQuery and with Cappuccino.</li>
<li>Cappuccino nice in desktop browser but 1.4MB, not compatible with iPhone.</li>
<li>jQuery not as nice as the Cappuccino version but 106KB. iPhone compatible.</li>
<li>I’ll give a try to Dashcode 3.</li>
</ul>
</div>
<hr/>
<divclass="intro">
<p>Before start, I must say I know Cappuccino and jQuery are no more comparable than Cocoa and the C++ standard library. One is oriented for user interface while the other is and helper for low level programming.
Nonetheless I used these two to make the same web application. This is why I compare the experience I had with each of them for this specific task.</p>
</div>
<p>I made a web version of my dashboard widget <ahref="http://yannesposito.com/Softwares/YPassword.html">YPassword</a>.
It is a simple widget to manage your online password with a <em>strong</em> security and with a totally portable way. It is not intended to replace a <em>keychain</em>.
It is more a password generator.</p>
<p>The first was made from the code of my dashboard widget and with some jQuery.
You can try it <ahref="http://yannesposito.com/YPassword.old">here</a>.
I then made a second version with the <ahref="http://cappuccino.org">Cappuccino</a>. You can try it <ahref="http://yannesposito.com/YPassword">here</a>.</p>
<h2id="what-this-widget-do">What this widget do?</h2>
<divclass="intro">
<p>If you don’t mind about what does my widget and just want to know how the two frameworkcompare, you should go
directly to the <ahref="#cappuccino">next part</a>.</p>
</div>
<p>I manage my password on many site with a simple method.
I remember a strong master password. And my password is mainly</p>
<li><ahref="http://yannesposito.com/YBlog/Computer/Entr%C3%A9es/2009/4/11_Be_able_to_change_your_password.html">change your password</a></li>
</ul>
<h2id="cappuccino">Cappuccino</h2>
<p>First, I’d like to say Cappuccino applications look simply awesome.
It is like having a Cocoa application in your web browser.
And this is <em>great</em>.</p>
<p>I also must admit I enjoyed making my application with Cappuccino.
It is like programming for an iPhone application.
If you are a bit familiar with Cocoa, you feel at home.
If you don’t know anything about Cocoa, I suggest you to look at it.
This is a really <em>great</em> framework to make User Interface.
I am not a specialist, but I have done some MFC, java Swing<supid="fnref:1"><ahref="#fn:1"rel="footnote">1</a></sup> and WXWindows User Interfaces (some years ago).
And I must say, Cocoa is far better than those.</p>
<p>Cappuccino is a great web application oriented development.
But there was also some drawbacks</p>
<p>Things I liked:</p>
<ul>
<li>It looks great</li>
<li>It was fun to program</li>
<li>It was like programming a Mac application</li>
<li>I could have done the User Interface using <ahref="http://developer.apple.com/technologies/tools/xcode.html">Interface Builder</a>.</li>
</ul>
<p>Some things I didn’t like:</p>
<ul>
<li>I made some time to understand how to handle the <code>onChange</code> on the text fields.</li>
<li>Documentation lacked a bit of organisation.</li>
<li>It doesn’t work on iPhone.</li>
<li>It weighted 11MB to deploy.</li>
<li>It weight 1.3MB to load.</li>
</ul>
<p>I didn’t use bindings because I believe they are not ready by now.</p>
<h2id="jquery">jQuery</h2>
<p>The jQuery version of YPassword is not as finished as the Cappuccino one. Because, there is no <em>slider</em> directly with jQuery. I’d have to use jQueryUI. And I believe, using it will make the application weight far more than the today 106KB.</p>
<p>To make this version I simply copied my widget source code and adapted it. It was straightforward. But jQuery is not an <em>application oriented framework</em>. It is more a “<em>dark side</em> javascript animation framework”<supid="fnref:2"><ahref="#fn:2"rel="footnote">2</a></sup>.</p>
<p>I don’t have too much to say about the jQuery version. But this was way more <em>low level</em> programming than Cappuccino.</p>
<h2id="my-conclusion">My conclusion</h2>
<p>If you want to make an iPhone compatible web application just don’t use Cappuccino yet.
If you want to make <em>simple</em> application like mine, I also believe, Cappuccino is a bit too much.</p>
<p>If you want to make a complex web oriented application, Cappuccino is a great choice.
But you may have some difficulties to begin programming with it.</p>
<p>Finally, to terminate my web version of my widget, I’ll give a try to Dashcode 3.
It seems to be a good alternative to create web widgets.
I don’t know if Dashcode 3 is portable on non webkit browser.
But if it is, it could be the end of projects like Cappuccino and Sproutcore.</p>
<hr/><divclass="footnotes">
<ol>
<liid="fn:1">
<p>If you are interested you can take a look at <ahref="http://labh-curien.univ-st-etienne.fr/informatique/SEDiL/">SEDiL</a>. I am proud of the tree drawing view made from scratch.<ahref="#fnref:1"rev="footnote">↩</a></p>
</li>
<liid="fn:2">
<p>I don’t want to feel like a <em>troll</em> I use jQuery to make some <em>dark side</em> animation on this blog. But the javascript on my blog is not needed except for commenting.<ahref="#fnref:2"rev="footnote">↩</a></p>