Posts Tagged ‘Cappuccino’

Release of version 0.9.10 of Cappucino brought a new full featured TextView component. Since there have been many fixes, and it has been announced as one of the main features of Cappuccino 1.0, that will be released this fall.

This may be time to update Emotuned application / store builder.

Motorola Mobility’s Ninja HTML5 framework, that was unveiled mid-2012, however without new references since many months, was replaced by Google Web Designer, an Adobe Edge/Apple iAd Producer like HTML5 ads builder, then with limited scope (no more a rich internet applications builder). The Montage HTML5 framework (that was the basis for Ninja HTML5) is still available (open source).

We can find more details in this greatly written article, that underlines that there isn’t any HTML5 web applications solution (framework and builder) available (GWT is old, not HTML5 focused and no more driven by Google), only basic tools and low level frameworks (jQuery, angularJS, BackboneJS, Twitter Bootstrap).

We can however still use Cappuccino and Apple’s XCode/Interface Builder to build applications such as or (using Direct2CP’s solution mda approach allowed building these easily even without IB).

In fact all single page/anonymous div based frameworks can easily use HTML5 features when required, by extending existing components. That is adding/generating new doms elements (and/or new css values) to components. Cappuccino still uses CSS3 for Popover and other areas, while Direct2CP components wrap HTML5 audio and video tags (also use CSS3 animations) and new upload features.

Then a whole new HTML5 framework would not provide more (as many features aren’t HTML5 specific), at least a true HTML5 framework would be replacing all anonymous divs by WebGL elements (that is wrapping these in components) for rendering (HTML5 also provides features that aren’t display related, like storage).

Cocoa to Cappuccino tutorial

Posted: October 28, 2012 in IT/Dev
Tags: , ,

At slevenbits blog we can find an article about porting a Cocoa component (here a custom NSBox – with editable title) into a Cappuccino one. As expected, it only consists in replacing NS suffix with CP, pointer * sign, and modifying imports. Also in the example the event management (box title editing) is easier, as Cappuccino benefits from the textField html element provided by the browser (with Cocoa we have to determine the editing area and use a fieldEditor).

Emotuned : article at DZone

Posted: September 3, 2012 in IT/Dev
Tags: , , ,

An bistory of Emotuned application project can be found at DZone. It presents the project idea, the work on required framework (porting CP2JavaWS to php and adding new features), the CSS3 player wrapped to a new Cappuccino component, use of new Cappucino dynamic controls (popovers, animating), a new HTML5 drag and drop upload component (that works with Safari and Firefox), tricks for performance enhancement.

A 1.1 update to Direct2CP is available :

– fixed state problem in EMZenView (was in canplay state when switching song – should be buffering state) that prevented play.

– added deferred mode in DCMasterDetailView (createDeferredForEndpoint) : if true numberOfRows returns 0 immediately( without calling the synch remote method). It is reset to false when calling setCriteria, setSortDescriptorsStr or reset.

Emotuned application (free music platform for composers, see here) now uses press (350 KB for the application .sj) and the new deffered mode for the master detail views (that is only one request is sent initially, for the main store tab – no requests for empty table views from other tabs). Performance is now related to the hosting provider.

Building Cappuccino from source requires both root admin account activation (and .profile creation) and installation of gcc tools (not installed by default by Xcode). Moreover we don’t need installing git or another tool as we can download a generated “zipball” archive of latest main source tree.

The Cappuccino reference page for installation can be found here.

Simply follow these steps :

– activate the root account :

– launch Xcode, and in Preferences, Downloads, Components, install Command line tools (185 MB)

– download the zipball archive from  and unzip it to Users/youruser/cappuccino

– from the cappuccino folder in terminal, type  ./

enter yes for all

it creates a narwhal folder in Users/youruser.

– as it says it couldn’t export variables (there isn’t a .profile yet), open terminal, and from your user’s root folder (that is Users/youruser) enter : touch .profile

it creates an hidden .profile file (that can be displayed from terminal using ls -a)

– type pico .profile and add the previous variables (replacing youruser by your user name)  :
export PATH="/Users/youruser/narwhal/bin:$PATH"
export CAPP_BUILD="/Users/youruser/Documents/cappuccino/Build"

save the file (Ctrl-X and y)

Note you could also have created the .profile file before command, then the script would have added these export to it automatically.

– logout from terminal and log in (for the new profile variables to be used)

– from the cappuccino folder in terminal, type  jake

Once completed, there is now AppKit, Foundation and Objective-J builds in cappuccino/Build/Release. Just copy  these to your application to replace the older.

To compress an application type  jake deploy from the application folder. A new Build folder is created in the application folder, and then move Browser.environment folder from Build/Release/NewApplication to the root application folder (also add here the generated Info.plist from NewApplication). Previous .j files can now be deleted (except Main.j).

Direct2CP available

Posted: April 20, 2012 in IT/Dev
Tags: , , , , , ,


Direct2CP is available.

This new version of CP2JavaWS brings the following features and enhancements :

– Added support for php on the server side (not yet full php objects encoding/decoding, only CPDictionary and CPArray encoding/decoding to anonymous php objects), including digest authentication.
– Added easy forms creation by code, including validation management (local and remote validation methods) with automatic error messages display.
– full support for exceptions and errors.
– support for complex nested master detail views (forms views can be used as detail views, and even composite detail view is allowed, for example a detail view that contains both a form view and another master detail view).
– enhancements and fixes in master view : technical id column can now be hidden, columns labels and sizes can be set, master/detail layout split can be horizontal besides vertical, fixed in transient wrong values when sorting in Firefox (now asynch read), fixed additional triggered selection after master view element selection (now asynch read).
– endpoint’s url can now be relative.
– support mix of java and php endpoints (separate tracking of java sessionid and php sessionid)
– generic dao service for php and connection factory
– fix in decoder for null dictionary or array properties
– fix in request parameters (now urlencoded – required for special chars like + or = used in encrypted values, criterias or text content)
– support aes encryption for form fields
– window controller for password reset
– fixed log errors for xhr’s non allowed (and not useful) request headers (content-length, connection) or unsafe ones (set-cookie)
– added paged grid collection view
– added drop upload controller (compatible with Safari 4, Safari 5.1, Firefox)
– added css3 based Zen html5 audio player (including fixes for Firefox)

Emotuned / Direct2CP

Posted: April 18, 2012 in IT/Dev
Tags: , , , , ,


New music platform launched !

This rich web application (uses latest open source solutions – Cappuccino, CSS3, and Direct2CP framework) allows indie composers to sell their music for free (full royalties – minus Papal fees), with a HD quality (lossless 16bit or 24bit), fair pricing (5$/euros for a 10 tracks albums) and fair ranking system (open).

It uses Dropbox service as a decentralized approach and low cost/lite infrastructure (also allows artists to keep full management of their files).

Moreover it is a community site : submited releases are validated and rated initially by members (users can apply as members at account creation time), allowing an independant and effective day to day management.

Finally it is a social site, as cover artists (singers, arrangers, pro composers) can submit covers to orignal composers (these will be validated by composer first, then by a community member, and added to the existing release if accepted). It will then allow reaching best indie music quality by enhancing initial composers music using other artists skills.
Moreover purchased releases are in progess ones (additional and/or updated songs will be available for free for previous customers), being then more valued.

Direct2CP framework (previously CP2JavaWS) brings php support, easy forms creation and validation by code (with management of nested mater/detail views), many enhancements and fixes, new features and new components (full Cappuccino conversion of CSS3 Zen player, Grid view, drop upload and Dropbox service).

Emotuned provides best practices from Direct2CP,  as  client code is available. Full details and download link for the framework will be added soon.

Vaadin : still way behind Cappuccino

Posted: October 14, 2011 in IT/Dev
Tags: ,

The recent Vaadin framework, that has been developed for at least one year (however far later than Cappuccino) brings application navigation/logic on the server side (en Java), by limiting json messages to widgets (GWT) state changes. Moreover, as the communication layer is generic (common, many bridges still available), GWT’s Java to Javascript generation step isn’t required anymore while developing (contrary to ExtGWT and Smart GWT). However this solution still does not catch up with Cappuccino in practical use, both in terms of achieved result, performance, and concepts :

– Interest of Java on the server side is less obvious for navigation application code (only UI management and actions). Using Javascript is sufficient for these, and Java is more useful at services layer (more complex, connectors to heterogeneous systems).

– Defining the user interface is based on Swing syntax and principles, that is very limited use of design patterns, and not in the elegant manner found in AppKit (responsability chain, dynamic bindings, KVC, KVO, delegates instead inheritance). There is no real/elegant architecture, nor innovative. The provided features are limited to widgets, whereas AppKit adresses most of applications needs, thanks to proven best practices.

– Such a solution to generate Cappuccino client side would be long and not fun, as it would require to define Java wrappers/generators for each control. Moreover as previously said the AppKit is more than just a widgets library. This redondancy would also be unuseful, as client side service proxy (using CP2JavaWS) seems comfortable for agile development.

– Objective-J 2.0 will bring a modern parser, and WebKit still allows powerful and easy debugging. Validating using Java compilation doesn’t seem so great, besides adding weight/complexity. Moreover state changes and/or display bugs would still require digging into generated Javascript code (despite it being simpler since most of navigation/application has been moved on the server side).

– Some controls (notably Table view) are limited in Vaadin. Most importantly, performances look really behind : while live scrolling, it takes many seconds to update the rows. The developers choosed then to display a waiting message (range of rows being loaded – however not accurate).
Cappuccino and CP2JavaWS allow live scrolling among thousands of rows without any pause (on WebKit), or really slight ones using Firefox. The lite client side application code in Vaadin may require more messaging with the server (the client side is less autonomous – probably no caching in table view, etc.), that might lead to this performance concern.

– Vaadin does not provide abstraction for media layer, contrary to Cappuccino’s implementations of Quartz/CoreAnimation above its DocumentBridge.

– provided layouts arent’s as evolved as the constraint based one from Cappuccino (with automatic recursive calculation).

-the interface builder, whose design is derived from Atlas/IB, faces same limitations as other common editors (as they do not follow the principles that did make IB great)

– the default theme, despite being (too much) derived from Aristo, isn’t as polished. We just can compare Vaadin Tunes with ThatMusicApp. Recent buyout of Sofa (that created Aristo) by Facebook tends to confirm their advance. Even Google didn’t try to compete in this area, where they have always been known to be weak.

WebKit / Cappuccino / Google

Posted: August 25, 2011 in IT/Dev
Tags: , ,

WebKit framework, derived from KHTML and having initiated many of HTML5 features (thanks to iPhone’s WebKit implementation, that was also allowed by Core Animation), was launched 10 years ago by Apple. The first verison of Safari was released later in 2003, and the project became open source in 2005 (Google contributed, and it has been used by Nokia, Adobe and Palm/HP).

Creator of Cappuccino worked at Apple in the initial development team for iPhone’s WebKit version (the most impressive from 2007 to 2009). Google may then be interested by 280 North, that was bought by Motorola a year ago, and is now owned by Android/GWT editor.

As I had supposed, Google may use Cappuccino to replace Java as Android SDK. Besides solving the licensing problems, this solution could lure iOS developers, easing Cocoa to Android porting.
The new Google mobile OS would just have to be based on WebKit, in the same way Palm/HP’s WebOS does.

A new 1.1 version of CP2JavaWS (Cappuccino to remote Java services framework) is available here. It includes the following new features/enhancements :

– Added Basic Authentication scheme besides Digest, and a generic Active Directory/Ldap authentication service (automatic check of user password and retrieve of its profiles related to the application from the directory, that are then stored on the client side’s endpoint for UI conditional display – besides being used on the server side from the authorization service).

– global authentication to an endpoint (in order to allow connect/disconnect menu for login/logout) besides per service check, by calling a dummy service listed in authenticated services (needed to keep – not duplicate – authentication process managed by the authentication filter).

– better error management, and easy to read full server error trace in the client’s alert window.

– parameter to set the encoding information sent from the Json filter to the client (depends from encoding used in custom services and/or database).