Re: Model Driven Architecture

Per Nyfelt <[email protected]> Tue, 14 Jun 2005 13:18:52 +0200
Newsgroups gmane.comp.java.ozone.user
Organization Resourcing Networks
Message-ID <[email protected]>
Hi Karl,

Sunday 12 June 2005 18.55 skrev Karl Wettin:
> On Sun, 12 Jun 2005 12:02:43 +0200
>
snip...
>
> Did I get the general idea on how to map persistency in the OCD?
Yes, it looks about right.

>
> > 3. You use "this" a lot. Use of this might get you into problems.
> > Consider  self() as an alternative. self() will give you a proxy
> > reference back rather  than the "raw" object.
>
> When might that become a problem?
Anytime you want to pass a reference for an OzoneObject to another OzoneObject 
in the database. E.g.
    
     public void foo(SomeOtherObj anOtherObj) {
         anOtherObj.add(this);
     }

instead do

     public void foo(SomeOtherObj anOtherObj) {
         anOtherObj.add(self());
     }

Basically you can just replace use of this with self() and your are good to 
go.
>
> > 4. If you Maps and Sets contains Ozone Objects it is not too bad but
> > are  scalable only up to a certain point (when the number of proxies
> > that are  stored in the Set becomes so many that memory is filled up).
> > In that case you  need a lazy loading collection. Look at the
> > Collections module for this.  Basically it goes like this:
>
> There are no collections in my jar-file, except for the DxXX, and if I
> got it all right they are for interal use only? So.. yhe collection
> module in CVS? Or what?

Yes, in the collections module under "modules". They are under development and 
some things (like List) is not done yet...

>
> > * Normal Objects in java.util collections -> OK for very few,
> > serializable and  small objects
> >
> > * Ozone Objects in java.util collections -> OK for collections with a
> > couple  of hundred or perhaps a couple of thousand items
> >
> > * Normal Objects in org.ozoneDB collections -> OK for many,
> > serializable and  small objects
> >
> > * Ozone Objects in org.ozoneDB collections -> OK for large collections
> > with   hundreds of thousands of items
> >
> > 5. Human does not extend OzoneRemote but HumanImpl extends
> > OzoneObject. Same  thing with Employment, Company and BankAccount.
>
> So all root interfaces should extend OzoneRemote,
> and all root classes should extend OzoneObject?
Yes.

Any OzoneObject must have an equivalent OzoneRemote. If you implement this as

interface Human extends OzoneRemote
class HumanImpl implements Human extends OzoneObject

or as

interface Human
interface OzoneHuman extends OzoneRemote
class HumanImpl implements OzoneHuman extends OzoneObject

Is of course up to you ;).

>
> Thanks

Welcome.

/Per


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20