french english

RSS 1.0 
 
 Login 
 Password 
 Sign in 
 
02-28-09 / 05:14 PM : OpenJDK 1.7 on OSX (cjed)
Infernus.org provides a guided steps about compiling OpenJDK 1.7 (BSD branch) on OSX. Grpahics APIs will then use X11 (only Apple's VM provides the Aqua bridge, besides many other great exclusive features and optimizations).
 Post a comment
02-27-09 / 12:46 AM : Cappuccino Atlas : extension points ? MDA part (cjed)
As the exact release date of Atlas editor isn't known yet (we hope a beta version will be available in the meantime) and that it should be provided for free, we wonder wether the source code will be open sourced (using LGPL ?), and wheter some extension mechanism will be provided (as with Eclipse extension points). We could then gain access to UI objects without having to load the produced CIB archive, and create more easily an MDA editor part : definition of business objects, remote services, interactions (binding to source events - that is views actions - through dynamic enhancement, in the runtime, of delegate handlers).
We would then benefit from a full client application graphical editor.

UPDATE : Cappuccino team responded that Atlas will not be open source (at least its code, but we still wait confirmation about it being free or not. A Lite version could be released for free, with a full featured one being charged later). An extension mechanism through plugins has been confirmed, and will be provided for free. Then it paves the way for a wide market, like Eclipse did : open source and/or free plugins, then more evolved versions (commercial). Despite Atlas being actually focused on UI design, an MDA extension (plugin) could fill the other client application areas, and a Bespin like code editor part (also as a plugin) could allow to add/modify code (that is without any files, as classes can be generated and enhanced directly in the runtime).
 Post a comment
02-25-09 / 12:26 AM : Cappuccino Atlas : on-browser Interface Builder (cjed)
As I had supposed, 280 North team presented an Interface Builder like editor (named Atlas) that runs directly on the browser (is a Cappuccino application). We can watch a webcast here.

As with IB, Atlas focuses on UI and bindings, and produces a CIB archive.
A dozen of days ago I had a very close idea (complementary in fact), an MDA editor also made as a Cappuccino application running directly on the browser. I thought about that when reading an article about objj_allocateClassPair and other Objective-J runtime APIs. The editor would be able to generate application code from the graphical model (that is code that calls remote services, using CP2JavaWS bridge), by dynamically adding code to the Objective-J runtime (through some test button in the MDA editor). I wrote notes and started to thought about a generic javascript function that wraps the required code for calling a remote service method (that is retreiving a CP2JavaWS service proxy from an endpoint, and then passing the arguments to the proxy). That generic function could then be referenced multiple times as a method_imp of a Method object (added dynamically to the methods_list of the also dynamically added class). It would end with a Method object for each action defined on the model.

Atlas is the tool that was lacking for demos (as IB available on Windows), and nib2cib tool even added some break to the development cycle. An article is still available at Ajaxian. The tool is expected this Summer (we hope by the end of Spring).

I wonder how/if Google and Adobe will catch up, It will be hard work.
 Post a comment
02-24-09 / 11:16 PM : Safari 4 : public beta (cjed)
Apple provides the first public beta of Safari 4, here. It brings a new javascript engine, Nitro, announced as 4.2 times faster than Safari 3 engine (and close to two times faster than the upcoming Firefox 3.1), and also adds support for HTLM 5 (audio and video media tags, database storage), CSS Animation, CSS Effects, CSS Canvas and CSS3 Web Fonts.
A new display mode, Top Sites, shows the most visited sites through an animated channels-like grid, that reminds Core Animation demos. History and bookmarks pages can now be browsed using a Coverflow like mode. These effects require a Quartz Extreme compatible graphic card (Radeon AGP 16 Mb or GeForce 2MX in Leopard). Global zoom is also included (was present in WebKit nightly builds). As with Chrome, tabs can now be displayed on top of the window, to gain space vertically. Finally Safari obtains 100/100 in the new Acid3 test. Full details can be found here.
The last security update must have been installed.
 Post a comment
02-21-09 / 11:49 PM : Cappuccino announces : thoughts/MDA editor (cjed)
Cappuccino members stated that they will be showcasing at the FOWA Miami (23-24 February) next week and going to be making a pretty big announcement in the process, so stay tuned ;).
As you've probably noticed, development on the main branch has not been that active in the last couple of weeks because we've been busy preparing for this thing.


Some important upcoming features have been listed recently for the next version of Cappuccino : revamped text engine (including shadows), display modes, themes. So what bigger other announcement can we expect ? :

- Apple will adopt Cappuccino for its next RDA (MobileMe, etc.) applications ?

- A GWT like generation tool will be unveiled for Cappuccino (however it would conflict with CP2JavaWS) ?

- An Objective-C server will be presented (with session management and database connections pool) ? Cappuccino team was interested by a CPCoding implementation of JSON/Objective-J conversion in CP2JavaWS, in order to allow an Objective-C server implementation.

- a new graphical editor (Interface Builder like) done using Cappuccino, running directly on the browser, that allows to test applications by dynamically generating (adding) classes (business objects, views, etc.) to the Objective-J runtime (using objj_allocateClassPair, etc.) ? It would allow some of on-browser MDA development by graphically defining business objects, services and interactions (that is my second idea following CP2JavaWS, and that MDA editor could generate code that uses that bridge for remote services calls...)
We can also now edit Objective-J code using the recently on-browser Bespin editor (based on Canvas), that could trigger a CPApplication launch by registering the appropriate observer event.
 Post a comment
02-21-09 / 05:10 PM : Web 3.0/Client MVC/non J2EE server (cjed)
Following GWT, Cappuccino opened the path for web 3.0. Common JSP taglibs libraries (RIA web 2.0) are deprecated (JSF RichFaces, ADF, etc.), and the newly announced JSF 2.0 version is only a slight evolving. RDA applications (RWA if the container is a web browser) then access directly to the server's services layer (application or business layer, depending on the required workflow and transaction management), and the presentation layer (MVC) is moved on the client side (Cappuccino uses Next/Cocoa AppKit). Calls to remote services are made using a bridge framework, a proxy, that is either specifically generated (when using GWT), or a generic dynamic one when using CP2JavaWS (uses the Objective-J runtime forwardInvocation method as there isn't yet a Cappuccino implementation of NSProxy class. However these dynamic features are far more powerfull and easy to use than Java dynamic proxies). On the server side there is no more need for a servlet, a sole servlet filter can be used (also allows to set url mapping), that is the solution that was retained for CP2JavaWS.

The interesting point with filters is that we don't set anymore a dependency (such criticism was made on Struts, that requires to subclass a servlet, ActionServlet). Someway filters can be seen as interfaces. We can then even add classic servlets declarations (Struts, Spring MVC) to the application, and attach the CP2JavaWS filter (for example) to these. That filter will determine what requests it should manage, and will forward other requests to the filter chain (up to the classical servlet). We will then be able to invoke application layer services from multiple client technologies : classical (html produced from JSP tags rendering) and RDA (dom/javascript based like Cappuccino). Such configuration will also help when migrating applications and/or during maintenance operations.

Then why using a J2EE server anymore ? Its servlet/jsp container isn't so much relevant (we don't use jsp), and the interesting remaining stuff is the various connectors (JDBC, JCA, asynchronous messages channels). Even sessions management could be done in another technology (we could imagine an Objective-C based server side, that idea was suggested by Cappuccino members).

What about the messages format ? JSON seems the growing one, as it is easy to learn, despite its lack of support for namespaces and cycles (have to be managed manually - by a non standard way -, the case in CP2javaWS). In fact that format wasn't intended to exchange complex objects graphs, nor contracts (WSDL and SOAP were conceived with these goals in mind). JSON is only a simple text representation of a javascript objects graph (we can even use eval() on such string to get the javascript objects). In CP2JavaWS documentation I introduced some discussions about JSON limitations and possible extensions. However the greater benefits (in terms of ease of development) when combining Cappuccino with a bridge solution like CP2JavaWS overcome its limitations. Moreover CP2JavaWS still manages heterogeneous collections elements, and nested ones (and soon cycles). When the methodSignatureForSelector method will be implemented in Cappuccino, we will be able to check for passed method's arguments with a contract (Objective-J protocol/interface that will be specified when getting the proxy).
 Post a comment
02-12-09 / 10:34 PM : Record a Core Animation animation (cjed)
The famous CIMG site provides a solution to Core Animation animations recording into a QuickTime movie, from te code that launches the animation (then faster than using an external tool). The trick is to trigger a timer at animation start, and at each timer invocation we make the CA layer draw into an in-memory Core Graphics context, then we convert it into an NSBitmapImageRep, and finally the image representation (TIFF here) is added to the previously instanciated QuickTime movie object. The CA layer used to draw into the context has to be the rootLayer's presentationLayer (bounding layer), not the animated layer.
 Post a comment
02-12-09 / 10:12 PM : Core Animation for automatic grid-cell layout (cjed)
At Mozketo blog, we can find a great trick about automatic grid cell layout in Objective-C, using Core Animation CAConstraint. This example defines the width constraint on the parent layer (superlayer) that contains the cells grid, and the constraint value is set as relative to the columns number. Then the grid's cells width automatically adapts to the columns number if it changes, and doesn't require any calculation to layout the cells in the grid bounds.
The example also adds random rotation and 3D transform to each cell (also through Core Animation).
The CAConstraint class isn't yet available in Cappuccino however.
 Post a comment
02-11-09 / 11:37 PM : Cappuccino : automatic recursive layout (cjed)
Among many stunning features in Cappuccino for user interfaces creation (and among Interface Builder, dynamic binding/delegation chain, infinite and non fixed combination of components, specialization without need for inheritance - by using delegates -, very high abstraction level) is automatic layout management (tutorial posted two months ago). Contrary to JSP tags libraries (including JSF) and Java/Swing components, Cappuccino's AppKit (as with Cocoa) automatically manages the layout of components in the parent container view.
We just have to define for each component the desired behaviours (constraints), through a properties mask (setted by using the setAutoresizingMask method) : CPViewWidthSizable, CPViewHeightSizable, CPViewMinXMargin, CPViewMaxXMargin, CPViewMinYMargin, CPViewMaxYMargin. The parent view then takes care of the components layout automatically, in a recursive manner (if nested views levels).

In a recent thread, a user stated :
Thankfully "layout managers" are a dopey Java-like paradigm that Cocoa avoids. Cocoa pretty much has one (fairly sensible) layout paradigm. If you look at the 6 layout-related attributes that you can set on any view in IB, these translate directly to flags that you can set on any view's setAutoresizingMask: method from code. Views tell their parent which edges they want to be anchored to and which directions they wish their size to be expanded in. CPView figures out the rest "automagically" when it lays out its subview.
 Post a comment
02-09-09 / 10:42 PM : Article about CP2JavaWS at Ajaxian (cjed)
The reference site about rich client / Web 2.0 (soon 3.0), Ajaxian, today published an article about CP2JavaWS Cappuccino/Java webservices bridge.
 Post a comment
02-09-09 / 02:18 AM : CP2JavaWS 0.31 available (cjed)
A new version of CP2JavaWS (0.31) is available at sourceforge. It includes the following changes :

- CP2JavaWSJSONServlet has been replaced by a filter. Then no need anymore for a servlet. If a servlet is still present, your application could then manage both JSON requests (originated from Cappuccino client applications using CP2JavaWSRemoteService proxy), through the CPJSONFilter, and classic web requests (managed by your servlet, Struts or Spring MVC servlet for example).

- the CPJSONFilter can work with any service factory (custom framework and/or IOC container). A listener is provided for integration with spring container (see the provided demo). You have then to add cp2javaws-springsupport.jar in web-inf/lib besides cp2javaws-filter.jar (and spring.jar obviously). If not using Spring, spring.jar (and cp2javaws-springsupport.jar) can be removed, avoiding any dependency.

- for custom service factory/framework, a listener example is provided (see server source code, DummyContextWrapperListener.java and DummyContextWrapper.java). Just modify these classes to get you service factory injected, and then export these two classes into a support.jar (the same as with cp2javaws-springsupport.jar).

- fixed date timezone management.
 1 comment
02-07-09 / 12:57 AM : Apple WebKit/HTML5 : end of Flash and Gears ? (cjed)
With its enhancements in terms of accessibility - new features and performances optimizations (CSS Visual Effects extensions for graphics and HTML5 Javascript database/Application Cache for data storage), the Apple WebKit engine (still fully compliant and hardware accelerated on the iPhone) directly competes with both Adobe AIR/Flex and Google Gears. In both cases Apple uses standards, as it did for video (H264). These standards should be merged in the QuickTime X container...

We can read at Macgeneration a very interesting comment/analysis (as usual with oomu) :

At the end, Flash has no future, why ? Because ALL flash services are now (or soon) available in the standardized browser :
- video and animations ? HTML5
- local database ? HTML5
- sub-processes ? HTML5
Actionscript ? That is javascript (actionscript engine in flash9 was given to mozilla under licence gpl)
For vector and animation : canvas dom+svg+javascript.

What was previously only available in Flash black box container is now exposed through html, css and javascript combination.
- html is the content,
- javascript is the programming language,
- css is the view style definition.
And soon OpenGL will be accessible through DOM/js.


All that however lacks some wrapping architecture for mainstream/large scale RDA applications development. But Cappuccino adresses this (dynamic binding, delegation chain, high level code - full DOM abstraction - and reduced code, proven solution), and CP2JavaWS provides the transparent bridge to J2EE SOA services. Web 3.0 is born !
 Post a comment
02-07-09 / 12:31 AM : HTML5 Javascript database/Application Cache (cjed)
Among new features added by HTML5, we find Javascript database support (available since Safari 3.1 for desktop, and in iPhone Safari since OS 2.0), and Application Cache, available in iPhone Safari since OS 2.1 - not yet on desktop version of WebKit :
web application with a manifest - defined perr the HTML5 spec - will be saved with any cached resources.

A cross-platforms and cross-browsers wrapper, ActiveRecord.js, allows to manage transparently (using the same APIs) access to data from a RDA javascript application, whatever undelying implementation : in js memory or database (through adaptors for Jaxer MySQL, Jaxer SQLite, Adobe AIR, Google Gears, and HTML5 Javascript database support).
 Post a comment
02-06-09 / 11:27 PM : WebKit CSS Animation / accelerated / VFX (cjed)
Apple unveiled CSS Animation, stil available in latest versions (nightly builds) of WebKit and iPhone's Safari (since OS 2.1). These animations are of explicit type, can be repeated, and keyframes can be defined. Three examples are provided.

Available animated properties are common CSS attributes : position (left, right, top, bottom), background-color, opacity, etc. We can also manage transforms animating (CSS Transforms) : scale, rotate. Then transforms happen as transitions. In the same manner we can create gradients and masks. All thse CSS extensions are parts of the CSS Effects project.

We define properties to animate (their initial and final values) through a CSS style, and we set/trigger the animation (reference to previously declared CSS Animation name, animating duration, iterations and direction) by fixing properties on a div, or on a second CSS. Keyframes can be defined by declaring many properties groups entries for the CSS Animation (with a prepended percent for each, that specify the frame position in the timeline, relative to the transition duration).

Moreover the iPhone Safari contains optimizations : accelerated animations and transforms, including 3d (not yet included in the desktop WebKit version). Examples are available at the iPhone Dev Center (registration required), notably Poster Circle, Card Flip, Finger Tips and Simple Browser.
Apple also provides Javascript/CSSOM interfaces for deeper control of animations (programmatically adjust the keyframes in an animation, or get the current transformation of a node), but they seem less documented.

All that is close to what we can do with the CoreAnimation implementation available in Cappuccino (partial, only manages explicit animations - no implicit ones -, the same as with CSS Animations, but apparently without acceleration). In an Ajaxian article about CSS Animations, we can read the following comment : Having animation directly in the browser will always be faster than using JS for every frame. With CSS animation, JS could just handle keyframes. It seems that Cappuccino goes in the same way, but perhaps for now only WebKit has hooks to access to graphic card acceleration for computed frames. That principle is however dealed with in a Cappuccino presentation - The Road to Cappuccino with Francisco Tolmasky- (36') : Graphics, no DOM, card_do(), DOM (W3C DOM/IE DOM) or CSS (CSS/IE CSS) or Canvas (Canvas/VML). Some also expect work on the SVG side.

We can discover a last example of CoverFlow like animation (zflow) on iPhone Safari, that uses CSS Visual Effects extensions (hardware accelerated on the iPhone) : 3D CSS transforms, CSS Transitions, use of Canvas (available in WebKit/iPhone Safari implementation of HTML 5) to simulate reflections.


UPDATE : here is the answer about the graphics technology used by Cappuccino for Core Animation (depends from the browser), and later use of CSS Animation and transforms :
This is the plan, but it is not yet implemented. Currently, CA in Cappuccino uses Canvas in Safari/Firefox/Opera and VML in IE to achieve transforms. However, it would be much more desirable to use the built in CSS transforms when supported. We would also like to do the same with animations: using timer-based animation in IE/Firefox but CSS "server" based animations in Safari. Unfortunately we simply haven't gotten around to take on this pretty daunting task.
We can read a Canvas's presentation, reactions and complaints about Apple not supporting SVG instead.
 Post a comment
02-05-09 / 11:46 PM : Cappuccino TextField animating with CoreAnimation (cjed)
You can find here an example (source code) of a CPTextField animating I've done in mid-December, using the CPPropertyAnimation code provided by Nicholas Small.

Initially the text is clipped (but visible part for the initial wrapping view bounds is correctly wrapped on available lines), and then extends (live) while the view size growths or shrinks (click on the view to expand or shrink). For that animation (explicit mode) we only pass the initial and final property (size) values and the animating duration. CoreAnimation computes the required Quartz drawing commands, relative to incremental size values returned by the CPPropertyAnimation class.

This is a proof of concept (no view design, basic shapes and colors to see more evidently the animating area). It will serve as a basis for the next version of the site, with advanced windows and views (Cappuccino still offers great looking Windows, with live dragging, compositing and dynamic shading - thanks to a Quartz implementation in javascript, that can lead to stunning applications, and even more when adding CoreAnimation - basic support provided).

However as the application is javascript, CoreAnimation cannot benefit from the graphic card acceleration here (one great advantage of OSX CoreAnimation - see iPhone strong use of CA - towards other frameworks), that normally allows to stack thousands of layers without performance hit.
 1 comment
02-02-09 / 11:25 PM : Macintosh 25th Anniversary Reunion (cjed)
Despite the absence of Steve Jobs and other famous people for the Macintosh 25th anniversary, we can still look at interesting photos from the event.
 Post a comment
02-02-09 / 11:13 PM : Flash for iPhone / Google Earth 5 (cjed)
Adobe may be developing a full and optimized version of Flash for iPhone, with Apple support. Meanwhile Google presented a beta of Google Earth 5 : oceans exploring, time machine mode that allows to get back to ancien time (historical images), visits recording (with added soundtrack and/or audio comments).
 Post a comment
02-02-09 / 12:02 PM : CP2JavaWS 0.3 final release (cjed)
The final 0.3 release of CP2JavaWS is available. It brings the following enhancements :

- major refactoring and code cleaning, completely rewritten encoding and decoding on the client-side and server-side.
- that version now uses Objective-J categories to encode/decode full objects graphs, and allows to customize encoding/decoding (if needed) for custom objects
- encoding and decoding now manages any depth, including nested collections
- collections (CPArray/List and CPDictionary/Map) elements can be heterogeneous
- method's arguments (JSON encoded parameters) and return now provide the objjClassName for each node (including collections's elements), so the client-side is independant from server-side technology (language).
Besides the CP2JavaJSONServlet, a PHP implementation could then be added for example, keeping the same client-side CP proxy classes.
- the custom Objective-J classes to Java custom classes mapping has now to be done using a properties file on the server-side.

- version 0.35 is expected to use CPCoding protocol redefinition in categories in order for having transparent decoding/encoding on the server-side when Objective-J is also used on the server. - version 0.4 will add transparent authentication feature (automatic display of a user-provided view if 401 return code) with full Digest management (nonce, cnonce).

Note : the 0.3 final release also fixes bugs (that still were present on the 0.3 alpha pre-release) with Objective-J objects encoding (if an attribute was named "name", it leaded to a wrong value in the JSON string) and decoding (didn't manage decoding of collection elements).
 Post a comment