I will comment that the Domain Driven Design approach and the use of
"Repositories" fits within this prototypes design strategy. Specifically,
when we say "Repository" we are talking about a "Business Service" object
that while its implementation may use DAO services under the hood, the
application does not know anything about the existence of those services...
Repository is part of the Domain Model. Nothing suggests that it need be
"formalized" other than there may be an API contract involved...
For instance one may have a
ItemRepository.sentItemToWorkspace(Eperson e, Item i);
that the application can rely on, but may be overiden under the hood by the
implementation of ItemRepository that was registered in the Service Manager
I have a pile of code on my workspace that reflects this which I need to
start dumping into the dspace-core-api project... but there are already such
buisness Services present...
Replacement for AuthenticationManager:
http://scm.dspace.org/svn/repo/modules/dspace-core/trunk/api/src/main/java/org/dspace/authenticate/AuthenticationService.java
<http://scm.dspace.org/svn/repo/modules/dspace-core/trunk/api/src/main/java/org/dspace/authenticate/AuthenticationService.java>
Replacement for AuthorizationManager
http://scm.dspace.org/svn/repo/modules/dspace-core/trunk/api/src/main/java/org/dspace/authorize/AuthorizationService.java
A hanger for porting the static WorkflowManager to a Service
http://scm.dspace.org/svn/repo/modules/dspace-core/trunk/api/src/main/java/org/dspace/workflow/WorkflowService.java
so... likewise there would be services for each counterpart in DSpace, we
would review the DSpaceObject model in an attempt to extract those services
from it.
Tangent: The question will arise, why isn't it good to have these on the
Domain Model... mostly because then there is then a single "nexus" for
overriding these methods and that will increase the risk that addons wanting
to participate in altering the domain model implementation behavior behind
the business service will all need to alter the same domain model code or
resort to utilizing AOP methods to alter the behavior encapsulated in the
domain model object (not horrible, but not an arrow in most steriotypical
DSpace developers quiver). While is using the repository approach gives us
another method of overriding the Repository method/implementation, if
properly architected, we realize that such methods are really "Actions" and
we may want to divide the Repository up into separate Action classes that
can be individually overridden without having to override all the methods
delivered by the Repository.
WorkflowService.start(collection, item) --->
WorkflowService.getAction(StartAction.class) -->
MyStartActionImpl.start(colection, item)
All this could be wired via the Spring ServiceManager and overriden with
their own implementation by the application developer.
Mark
On Thu, May 26, 2011 at 9:09 AM, Mark Diggory <[email protected]> wrote:
> Robin,
>
> Ah ha... I think your referring to the Hibernate Prototype?
>
> https://wiki.duraspace.org/display/DSPACE/Hibernate+prototype
>
> MAr
>
> On Thu, May 26, 2011 at 8:15 AM, Robin Taylor <[email protected]>wrote:
>
>> Hi Mark,
>>
>> My memory may be playing tricks but I'm sure there was another project
>> undertaken about the same time which looked at creating various Manager
>> classes and moving the relevant code out of the model. It was a kind of
>> partner project to the DAO project, but on the business side rather than
>> the storage side. There was extensive documentation which referred to
>> patterns such as Session Facade and the likes, and a lot of well
>> developed code. It might have been an italian student who worked on it,
>> but possibly pre-GSOC. Unfortunately I've lost my email from that period
>> but I do remember him asking various questions on the mailing lists.
>>
>> Sorry, very vague.
>>
>> Robin.
>>
>>
>>
>> On Thu, 2011-05-26 at 15:13 +0100, Mark Diggory wrote:
>> > Robin,
>> >
>> >
>> > All I can think your referring to is James Rutherfords
>> > (https://wiki.duraspace.org/display/DSPACE/DAO+Prototype) work, which
>> > I am using as an example for some parts of
>> > (https://wiki.duraspace.org/display/DSPACE/Refactoring+the+DSpace
>> > +Domain+Model) finally leveraging a DAO/Repository model to create
>> > individual services for Service Manager.
>> >
>> >
>> > Mark
>> >
>> > On Thu, May 26, 2011 at 5:50 AM, Robin Taylor <[email protected]>
>> > wrote:
>> > Hi all,
>> >
>> > This is one of the topics on Tim's provisional list for
>> > discussion at
>> > OR11. A few years back someone did some work to extract much
>> > of the
>> > business logic from the domain model. I think it was one of
>> > the first
>> > GSOC projects but I can't track down any documentation or the
>> > code, can
>> > anyone help ? It was pre Spring days and made use of various
>> > J2EE
>> > patterns. I'm just curious to look over it to see if any of it
>> > is still
>> > relevant.
>> >
>> > Cheers, Robin.
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > vRanger cuts backup time in half-while increasing security.
>> > With the market-leading solution for virtual backup and
>> > recovery,
>> > you get blazing-fast, flexible, and affordable data
>> > protection.
>> > Download your free trial now.
>> > http://p.sf.net/sfu/quest-d2dcopy1
>> > _______________________________________________
>> > Dspace-devel mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/dspace-devel
>> >
>> >
>> >
>> > --
>> > Mark R. Diggory
>> > @mire - www.atmire.com
>> > 2888 Loker Avenue East - Suite 305 - Carlsbad - CA - 92010
>> > Esperantolaan 4 - Heverlee 3001 - Belgium
>> >
>>
>>
>>
>
>
> --
> Mark R. Diggory
> @mire - www.atmire.com
> 2888 Loker Avenue East - Suite 305 - Carlsbad - CA - 92010
> Esperantolaan 4 - Heverlee 3001 - Belgium
>
--
Mark R. Diggory
@mire - www.atmire.com
2888 Loker Avenue East - Suite 305 - Carlsbad - CA - 92010
Esperantolaan 4 - Heverlee 3001 - Belgium
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel