[Opensource] JDO
Michael Rimov
rimovm at centercomp.com
Sat Jan 4 18:59:46 PST 2003
At 07:39 PM 1/2/2003 +0000, you wrote:
>Geeta Ramani wrote:
>>Hey, that's *exactly* what I have been wondering about too!! Expresso gurus,
>>would sure appreciate and answer to this.. especially since Mike has been
>>rethinking component architecture..?
>>Thanks, and happy new year to you too!
>>Geeta
>>Marc Schipperheyn wrote:
>>
>>>Hi all,
>>>
>>>Best wishes for the New Year. I've been using my time off to read up on JDO
>>>(Java Data Objects). This looks to be very promising and I was wondering is
>>>this were at all a candidate for replacing DBObjects by a JCP standard?
>
>Hi
>
>It depends on how on far the data object architecture is going a long?
>There is already a new package `com.jcorporate.expresso.core.dataobject'
>with java interfaces. There is a implementation package also
>`com.jcorporate.expresso.core.dataobject.jdbc'
>
>In theory you should able to write your own implementation in terms
>JDO. However the whole way that data objects are constructed internally
>in the Expresso Framework and outside will have to change.
>
>
>First, a way has to separate the data object manipulaton from the
>data object access, I believe `DataExecutorInterface' does this from
>design. So you must avoid direct JDBC code in your own DBObject
>classes. You cant call stored procedure for example.
>
>Second, a factory design pattern is a possible the key to the design.
>
> DataObject x = DataObjectFactory.create("jdbc",
> com.acme.dbobg.SalesPerson,
> requestContext );
>
> DataObject x = DataObjectFactory.create("jdo",
> com.acme.dbobg.SalesPerson,
> requestContext );
>
>Every new Expresso application will have use these API and not
>the current ``new SecuredDBObjectType( RequestContext r )''
>
>Third, it is not clear whether you would use the interface `DataObject'
>or the `DBObject' in your web application. What type will the factory
>return depends on how well the DBObject divorces it data manipulation
>from it access operation ? In other how generic is the new data object
>interface.
Actually, you would normally use the DataObject interface directly rather
than DBObject... however DataObjects are still pre-alpha, because I'm
working on paring down DBObject so we get the same functionality in not
quite so monster of a class. So you can safely continue to use DBObjects
for some time, the migration to DataObjects will be some time yet.... and
since DBObjects will implement the DataObject interface, eventually the
migration will be fairly painless.
>Fourth, the current code base will need a secured data object possibly?
>So may be we will have
Actually, I was planning on doing away with the concept of DBObject vs
Secured DBObject and Controller vs DBController... instead I was thinking
of having a setSecurityManager() that would be common to all. If you don't
want security (like the current DBOBject implementation), you'd just call
something like:
setSecurityManager(NullSecurityManager); But I plan on JAAS Subjects to be
an integral part of the security system, so the API will appear the same,
just the behavior will be different.
And, that's a good point in that Expresso has a good security framework
that JDO would have to work with.
I'll have more to add later :)
-Mike
More information about the Opensource
mailing list