You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Tore Halset <ha...@pvv.ntnu.no> on 2006/08/28 00:28:03 UTC

Cocoa Cayenne status

Hello.

I got faults working now :) See attached screenshot of the tutorial  
client app in Cocoa.

I have not done anything with the Core Data-side of it yet, but  
bindings are working out of the box. In the example app, there is one  
NSArrayController for Persons and one for Paintings. The paintings- 
controller are autoupdated (using bindings) from the selection-array  
of the persons-controller. Pressing the Query-button will manually  
(in code) set the content array of the persons-controller. Any  
progress on the Core Data side of it Garry?

There are still some issues with the HessianObjC-framework. I am  
currently using an unaccepted patch for circular refs. It was not  
accepted as Objective-C has issues with circular refs. Will have to  
use Weak refs or something.. This is caused by the fact that DataMap  
has some objects that has refs to the DataMap. In practice, the leak  
are non-existant as we only need a single instance of the  
EntityResolver.

Done:
  * Faults.
  * Edit/commit simple property. Like changing the artist og painting  
name.

Todo:
  * Add/delete objects. I hope to get this working using bindings and  
the array-controller as well..
  * Core Data stuff.
  * fix authentication and object refs in HessianObjC.
  * separate existing project into framework and example client.
  * rollback, NSUndoManager etc.
  * +++

  - Tore.

Re: Cocoa Cayenne status

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Aug 28, 2006, at 00:28, Tore Halset wrote:

> I got faults working now :) See attached screenshot of the tutorial  
> client app in Cocoa.

Sorry for the missing screenshot. Look here instead:

http://www.pvv.ntnu.no/~halset/tmp/cocoa-client-20060828.png

  - Tore.



Re: Cocoa Cayenne status

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Aug 28, 2006, at 14:43, Tore Halset wrote:

> Thanks, I will create the framework and commit it to the sandbox in  
> a couple of days (my next free timeslice).

Done. See http://cwiki.apache.org/confluence/display/CAY/Cocoa+Cayenne

  - Tore.

Re: Cocoa Cayenne status

Posted by Tore Halset <ha...@pvv.ntnu.no>.
Hello.

On Aug 28, 2006, at 14:09, Watkins, Garry wrote:

> ObjectStore and TransactionalObjectStore are abstract classes.
> Transactional is there in contrast to Apple's CD stuff mentioned at  
> WWDC
> which is NDA.  Cayennne and WebObjects are the implementations.  If  
> you did
> not know WebObjects has a remote client layer as well.

Yes, I know about WebObjects and the Java Client. Ok, so the  
ObjectStore is an abstraction of the server system including the  
protocol to talk to the server?

> However, their protocol is not documented.  What are you using to  
> monitor the traffic over
> port 8080?  I am sure that I could use that to watch the WebObjects  
> stuff.

I use tcpmon from axis. See http://cwiki.apache.org/confluence/ 
display/CAY/Cocoa+Cayenne

> Can you check in your latest stuff with the faulting? Maybe I can  
> piece some
> of this stuff together later today.

I committed my latest work yesterday. I generally commit stuff when I  
got something new working without breaking something old, so svn  
should be pretty up to date.

> I already broke you project apart and created a Framework.  It was  
> not too
> difficult.  Just create a new Cocoa Framework.  Copy all of the  
> files from
> (CAYClient) to the new Project via drag and drop that should be in the
> Framework.  Then delete the files out of CAYClient.  Put a project  
> reference
> in CAYClient to the new framework.  Then finally, copy  
> the ???.framework to
> the product linking phase.  Then you should be golden.

Thanks, I will create the framework and commit it to the sandbox in a  
couple of days (my next free timeslice).

  - Tore.



Re: Cocoa Cayenne status

Posted by "Watkins, Garry" <gw...@motleyrice.com>.
On 8/28/06 3:34 AM, "Tore Halset" <ha...@pvv.ntnu.no> wrote:

> On Aug 28, 2006, at 4:05, Watkins, Garry wrote:
> 
>> I ran into the error 500 with Hessian 3.0.20.  I finally had to
>> track down a 3.0.13.  But I got it going late last night.
> 
> Yes, we should probably fix CAY-636 sooner or later.. It can be a bit
> complicated to get started.
> 
>>     Extended
>>         NSManagedObjectContext - which should encompass faulting
>>         NSPersistentStoreCoordinator
>>         NSManagedObjectID
> 
> Will it be possible to have the client side implementation of
> ObjectId subclass NSManagedObjectID or do we need two different
> classes for this?
> 

I think that we should be able to use one subclass for this, but I am still
looking at how to set the NSManagedObjectID,  Apple is not exposing a lot of
the CD API.  Hopefully, I can figure this out in the next day or two.

>>     Created my own classes since these aren't exposed by CD
>>         ObjectStore
>>         TransactionalObjectStore
>>         CayenneObjectStore (I am just starting implementing this)
>>         WebObjectsObjectStore (Planned for the future)
> 
> Lots of ObjectStores. What are the difference between them? I have
> not done any ObjectStore stuff yet - Multiple object with the same
> ObjectId can exist in the same context now. Must of course be fixed..
> 

ObjectStore and TransactionalObjectStore are abstract classes.
Transactional is there in contrast to Apple's CD stuff mentioned at WWDC
which is NDA.  Cayennne and WebObjects are the implementations.  If you did
not know WebObjects has a remote client layer as well.  However, their
protocol is not documented.  What are you using to monitor the traffic over
port 8080?  I am sure that I could use that to watch the WebObjects stuff.

>> Hopefully, I will have some time this week and we will get to
>> integrate it
>> all together with the stuff that you have been doing.
> 
> Cool.
> 

Can you check in your latest stuff with the faulting? Maybe I can piece some
of this stuff together later today.

I already broke you project apart and created a Framework.  It was not too
difficult.  Just create a new Cocoa Framework.  Copy all of the files from
(CAYClient) to the new Project via drag and drop that should be in the
Framework.  Then delete the files out of CAYClient.  Put a project reference
in CAYClient to the new framework.  Then finally, copy the ???.framework to
the product linking phase.  Then you should be golden.  If you would like, I
will build the framework project for you, and zip it up and send it to you.
 
> Currently, I am wondering if we need a NSArrayController subclass to
> get the "add:", "insert:" and "remove:" bindings to work. Or perhaps
> create an CAYManagedObjectArray (and/or CAYToManyArray) that
> automatically register new objects in the context and set the correct
> relation.
> 
>   - Tore.

-- 
Garry Watkins

Database Administrator
Motley Rice LLC
843-216-9639






Confidential & Privileged

Unless otherwise indicated or obvious from its nature, the information contained in this communication is attorney-client privileged and confidential information/work product. This communication is intended for the use of the individual or entity named above.  If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies--electronic, paper or otherwise--which you may have of this communication.




Re: Cocoa Cayenne status

Posted by Tore Halset <ha...@pvv.ntnu.no>.
On Aug 28, 2006, at 4:05, Watkins, Garry wrote:

> I ran into the error 500 with Hessian 3.0.20.  I finally had to  
> track down a 3.0.13.  But I got it going late last night.

Yes, we should probably fix CAY-636 sooner or later.. It can be a bit  
complicated to get started.

>     Extended
>         NSManagedObjectContext - which should encompass faulting
>         NSPersistentStoreCoordinator
>         NSManagedObjectID

Will it be possible to have the client side implementation of  
ObjectId subclass NSManagedObjectID or do we need two different  
classes for this?

>     Created my own classes since these aren't exposed by CD
>         ObjectStore
>         TransactionalObjectStore
>         CayenneObjectStore (I am just starting implementing this)
>         WebObjectsObjectStore (Planned for the future)

Lots of ObjectStores. What are the difference between them? I have  
not done any ObjectStore stuff yet - Multiple object with the same  
ObjectId can exist in the same context now. Must of course be fixed..

> Hopefully, I will have some time this week and we will get to  
> integrate it
> all together with the stuff that you have been doing.

Cool.

Currently, I am wondering if we need a NSArrayController subclass to  
get the "add:", "insert:" and "remove:" bindings to work. Or perhaps  
create an CAYManagedObjectArray (and/or CAYToManyArray) that  
automatically register new objects in the context and set the correct  
relation.

  - Tore.

Re: Cocoa Cayenne status

Posted by "Watkins, Garry" <gw...@motleyrice.com>.
Cool, I have been pretty busy catching up, with work since WWDC.  However, I
spent about 12 hours working on it this weekend.  I spent most of yesterday
just trying to get the 3t stuff working.  I ran into the error 500 with
Hessian 3.0.20.  I finally had to track down a 3.0.13.  But I got it going
late last night.

For the CoreData stuff, I have written the following:

    Extended 
        NSManagedObjectContext - which should encompass faulting
        NSPersistentStoreCoordinator
        NSManagedObjectID

    Created my own classes since these aren't exposed by CD
        ObjectStore
        TransactionalObjectStore
        CayenneObjectStore (I am just starting implementing this)
        WebObjectsObjectStore (Planned for the future)

All of the above have not been tested yet, since they all work together.
Hopefully, I will have some time this week and we will get to integrate it
all together with the stuff that you have been doing.

Garry

On 8/27/06 6:28 PM, "Tore Halset" <ha...@pvv.ntnu.no> wrote:

> Hello.
> 
> I got faults working now :) See attached screenshot of the tutorial
> client app in Cocoa.
> 
> I have not done anything with the Core Data-side of it yet, but
> bindings are working out of the box. In the example app, there is one
> NSArrayController for Persons and one for Paintings. The paintings-
> controller are autoupdated (using bindings) from the selection-array
> of the persons-controller. Pressing the Query-button will manually
> (in code) set the content array of the persons-controller. Any
> progress on the Core Data side of it Garry?
> 
> There are still some issues with the HessianObjC-framework. I am
> currently using an unaccepted patch for circular refs. It was not
> accepted as Objective-C has issues with circular refs. Will have to
> use Weak refs or something.. This is caused by the fact that DataMap
> has some objects that has refs to the DataMap. In practice, the leak
> are non-existant as we only need a single instance of the
> EntityResolver.
> 
> Done:
>   * Faults.
>   * Edit/commit simple property. Like changing the artist og painting
> name.
> 
> Todo:
>   * Add/delete objects. I hope to get this working using bindings and
> the array-controller as well..
>   * Core Data stuff.
>   * fix authentication and object refs in HessianObjC.
>   * separate existing project into framework and example client.
>   * rollback, NSUndoManager etc.
>   * +++
> 
>   - Tore.

-- 
Garry Watkins

Database Administrator
Motley Rice LLC
843-216-9639






Confidential & Privileged

Unless otherwise indicated or obvious from its nature, the information contained in this communication is attorney-client privileged and confidential information/work product. This communication is intended for the use of the individual or entity named above.  If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited.  If you have received this communication in error or are not sure whether it is privileged, please immediately notify us by return e-mail and destroy any copies--electronic, paper or otherwise--which you may have of this communication.