ObjectContext & DataContext

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ObjectContext & DataContext

Gary Jarrel
Good Afternoon All & All

I've been away from Cayeene for approx. 6 months and unfortunately
have missed out on the knowledge of the new features, since 1.2M2
which I've used for my last project. With the new upcomming multi
lingual web app that we will be developing, I'm going to use Cayenne
for DB access. So I've spent most of the morning, looking through the
updated user manual, the API and the wiki.

I've notice the new ObjectContext interface, which states an
implementing class as:
org.objectstyle.cayenne.service.ObjectDataContext, but
ObjectDataContext doesn't seem to exist in the API? What is the
purpose of the new ObjectContext? I found very little references to it
in the WIKI, apart from 3 tire stuff. Is it a replacement for the
DataContext?

Also maybe somewhat off topic, but has anyone had much experience with
multi lingual applications (i.e. DB stores traslated versions of some
date) using Cayenne, and what design approach has been taken?

Thanks in advance.

Gary
Reply | Threaded
Open this post in threaded view
|

Re: ObjectContext & DataContext

Andrus Adamchik
Hi Gary,

Re: i18n'ed applications

You may find this thread helpful. It was certainly enlightening to me.

http://objectstyle.org/cayenne/lists/cayenne-user/2005/06/0182.html

Re: ObjectContext

This is related to Cayenne new multi-tier features and documentation is
indeed lacking as this is still work in progress. ObjectContext is a
simplified version of DataContext that doesn't have direct dependencies on
the Cayenne access stack and is therefore more flexible.

As ObjectContext is an interface, it is much easier to provide different
implementations for different environments (e.g. there is a
ClientObjectContext). In the future 1.2 milestones DataContext will
implement ObjectContext as well. Non-public class ObjectDataContext is
actually a temporary bridge between the new and old context API. You can
find it in the sources.

Andrus


> Good Afternoon All & All
>
> I've been away from Cayeene for approx. 6 months and unfortunately
> have missed out on the knowledge of the new features, since 1.2M2
> which I've used for my last project. With the new upcomming multi
> lingual web app that we will be developing, I'm going to use Cayenne
> for DB access. So I've spent most of the morning, looking through the
> updated user manual, the API and the wiki.
>
> I've notice the new ObjectContext interface, which states an
> implementing class as:
> org.objectstyle.cayenne.service.ObjectDataContext, but
> ObjectDataContext doesn't seem to exist in the API? What is the
> purpose of the new ObjectContext? I found very little references to it
> in the WIKI, apart from 3 tire stuff. Is it a replacement for the
> DataContext?
>
> Also maybe somewhat off topic, but has anyone had much experience with
> multi lingual applications (i.e. DB stores traslated versions of some
> date) using Cayenne, and what design approach has been taken?
>
> Thanks in advance.
>
> Gary
>