Hi Kevin,
I've not used Cayenne, no.  I don't notice it much in the news either (but
that's not a criticism - it's not like Isis gets much coverage either).

If you're interested in working on a Cayenne integration, then there are
two options.

1. you could write a new object store, like the SQL object store that you
took over.

2. you could instead write a new runtime.

We haven't talked much about (2), but you'll know that I restructured the
modules last year in order to give us oai.runtimes.dflt as well as
oai.runtimes.embedded.  The key interface here
is oai.core.metamodel.runtimecontext.RuntimeContext, which is the
"pipeline" through which the metamodel API reaches back to the runtime.

You'll see that there are just two proper impls of this interface,
the 
org.apache.isis.runtimes.dflt.runtime.persistence.internal.RuntimeContextFromSession
which delegates to the (singleton) IsisContext in the dflt runtime, and
there's also
the oai.runtimes.embedded.internal.RuntimeContextForEmbeddedMetaModel,
which is the capability I put together (though haven't properly advertised
or promoted) to allow the Isis metamodel to be embedded in *any* other
framework.

At any rate, what you might want to do is consider writing an
oai.runtimes.cayenne.RuntimeContextForCayenne impl.  It'd be interesting to
see how well this API works for a new requirement.

Just a thought,

Cheers
Dan

PS: We have a JIRA that was raised a while back (ISIS-14) for Isis to
provide support for JDO.  When, one day - haha - we get around to tackling
this, my thought was that it should use the RuntimeContext API.  After all,
since JDO abstracts a ton of persistence APIs, I can't see the point on
layering our dflt runtime on top of it.



On Wednesday, 23 November 2011, Kevin Meyer - KMZ wrote:

> I'm just going to focus on the bits that are close to my heart (I don't
> have any issues with the rest, though)... continued below...
>
> On 23 Nov 2011 at 17:26, Dan Haywood wrote:
>
> > ~~~
> > Alexander's slightly tongue-in-cheek question is funny, cos actually
> > long-term I do think that Isis should lose its persistence layer.  My
> view
> > is that the fact that it can only be deployed on the handful of
> > objectstores that we have implementations for counts against it.  In
> time I
> > would like to simplify the whole, rather complex, runtime/back-end, and
> > plug into JDO or JPA or maybe have a really lightweight implementations
> > around NoSQL (eg Mongo).
>
> I just read a little about Cayenne[1]. Has anyone used it?
>
> I am particularly anti any DAL that *requires* additional annotations or
> XML files or other extra bits to support persistence. I resent Hibernate,
> OpenXava, etc.
>
> As it stands, the Isis SQL/JDBC objectstore works (but is perhaps not
> suited for large scale production use - let me know if you've tried and
> failed). And it works automatically, as far as the domain developer is
> concerned. It even supports polymorphic domain objects. (Yes, yes, it
> could do with some improvements.. I have some ideas, already).
>
> I am happy for the Isis Persistence API / Objectstore API to be
> simplified (can't actually say I really noticed the split, myself), and I
> do
> see advantages to making some Objectstore functionality more
> apparent (accessible) to the domain (e.g. pagination, custom queries).
>
> But, having said that, I would like to see how is it possible to integrate
> with other store technologies (JDO/Cayenne/etc) - but, to me, it must
> be seamless - only requiring "something extra" when you're trying to
> do something special (What special? To be determined).
>
> Regards,
> Kevin
>
> [1] http://cayenne.apache.org/
>

Reply via email to