Apache Cayenne > Index > Cocoa Cayenne

Introduction

Several people have expressed an interest in Cocoa Cayenne – an Objective-C/Cocoa implementation of the client-side of Cayenne's Remote Object Persistence (ROP). The basic idea is to be able to build a rich OS X client application with database persistence handled on a server by Cayenne. Please add comments and notes below.

Components

Several components/layers will need to be implemented to achieve this goal.

Modeler/Template

At a minimum, new templates for Objective-C client classes will need to be created.

Hessian Protocol

Hessian is the current protocol used to communicate with Cayenne ROP. One possible option for this is to use Blue Bear Studio's HessianObjC framework, which has an Apache 2 license. Another option is to use the C++ implementation (Objective-C can call C++ natively). A third option is to write a custom implementation.

Cayenne Stack

Parts of the Cayenne Stack (contexts/etc) would have to be implemented in Objective-C. Not sure the scope of this.

Core Data Support?

If Core Data supports extension and it is possible to integrate Cocoa Cayenne into the framework, this might be the best approach. Another interesting option would be to support Core Data's query language/etc. I see this as a nice-to-have, but not a requirement.

Cocoa Bindings Support

Support for Cocoa Bindings should exist.

Getting Started

HessianObjC

Checkout, Build and Install the latest HessianObjC framework

svn co https://hessianobjc.svn.sourceforge.net/svnroot/hessianobjc/trunk hessianobjc
cd hessianobjc
xcodebuild
sudo rm -rf /Library/Frameworks/HessianObjC.framework
sudo cp -r build/Deployment/HessianObjC.framework /Library/Frameworks/ 
cd ..

CocoaCayenne framework

Checkout, Build and Install the latest CocoaCayenne framework

svn co https://svn.apache.org/repos/asf/cayenne/sandbox/CocoaCayenne/CocoaCayenne CocoaCayenne
cd CocoaCayenne
xcodebuild
sudo rm -rf /Library/Frameworks/CocoaCayenne.framework
sudo cp -r build/Release/CocoaCayenne.framework /Library/Frameworks/ 
cd ..

Tutorial client

  1. Start up cayenne ROP tutorial server application.
  2. Check out CAYClient - the example CocoaCayenne client.
svn co https://svn.apache.org/repos/asf/cayenne/sandbox/CocoaCayenne/CAYClient CAYClient
  1. Open in Xcode, Build and Go

Tools

Protocol debug

Axis tcpmon are a swing based protocol analysis tool that act as a proxy. Download the latest axis distribution and start it with the following command

java -cp axis.jar org.apache.axis.utils.tcpmon 8090 localhost 8080

The client connect to the tcpmon proxy at port 8090 and tcpmon will forward the request to port 8080.

Developers

Developers interested in helping on this are:

  • Garry Watkins
  • Michael Gentry
  • Tore Halset