jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ottinger, Joseph" <jottin...@techtarget.com>
Subject RE: Beginner's question (architecture)
Date Thu, 30 Nov 2006 22:01:16 GMT
Wolf, might I suggest an article on TheServerSide by Alexandru Popescu,
"JCR: A Practitioner's Perspective?"


-----Original Message-----
From: Wolf Benz [mailto:eurojava@gmail.com] 
Sent: Thursday, November 30, 2006 4:28 PM
To: users@jackrabbit.apache.org
Subject: Beginner's question (architecture)

Hi List,

I'm new to this JCR concept, but I'm very thrilled from what I read/ saw
so far.
My prob is: I'd like to get started with it on teh right foot
immediately - but I don't know too well how exactly - architecture wise.

1/ Problem sketch: I guess it's the same for most people beginnen with a
JCR: they came from ORM and now what? :-) It seems to be a bad idea to
directly map the Content (persistence
end) with the fron-end. (correct me if you think otherwise)

-> I woudl think more of an architecture like e.g:

@ backend: a "PersistenceDelegaterInterface" (PDI) & a
"PersistenceDelgator" (PD)

With methods like:
getObject(Class, String ID)
saveOrUpdate(Object obj)

A domain layer object could use thsi PDI.

It seems to have these advantages:
- the domain- and service layer can have a PDI instance, which can be
injected with Spring at runtime
- different strategies can be used for persistence; it becomes
pluggeable (e.g. part of your app could run with JDO2; Spring can inject
the same PDI with a JDO2 implememtation for the classes for which a JCR
is not YET in place)
- it decouples back-end from front-end

Of course the reason I also ask, is as the apps I currently have, do
already have this PDI.

But...  there are new apps in the pipeline. Is this the best way to
continue or is there a more elegant approach?

I could perhaps also perhaps the question as: Every app has its domain
layer. How to -most elegantly- connect these domain objects with a JCR?

(the "class" arg seems o have become obsolete for JCRs as the ID
containes both path and class/ID; all is in the XPath....)

So infact these are 2 questions already: how to do it best for new apps
and what about migrating old apps?

2/ Regarding existing apps: suppose you have an existing DB (schema and
content in place) How best build a system on that? Is it e.g.  
possible to use a mapping file to logically (e.g.) unite 2 DBs and place
one, much more logical, new structure above it? (kinda like the
JDO/Hibernate mapping file if you wish) Or is this seeking for trouble
and is it in this case better to
- have JCR generate the most logical structure for it, and
- then have a DBA make a few views or so?

Ideas are very much appreciated!


View raw message