Most definitely a cheer from the peanut gallery. 

In trying to figure out how to do some things, I've found the functionality I 
wanted in other modules.  I'm unsure whether to copy code from those modules or 
just include the appropriate java files.  Either way makes me want to scream; 
even though I only play a programmer at work, they both seem like poor choices. 
 But altering the dspace-api seems like a much more dangerous thing to do.

I'd welcome the attempt to consolidate functionality, whether it turns out to 
be in dspace-api or some other module that will (hopefully) be more stable than 
others (which probably don't count on anyone else using them, and feel free to 
modify anything they want whenever the mood strikes.)

B--

>>> On 4/29/2011 at 10:47 AM, in message
<BANLkTimeUJG=R-Fo8gSypj_-+htZoes=z...@mail.gmail.com>, Peter Dietz
<pdiet...@gmail.com> wrote:
> Hi All,
> 
> I'd like to get an effort going to clean up some of the logic that resides
> in the UI's, and move that near-identical logic to a central service, such
> as dspace-api. The benefit of this is that it will simplify the contract
> that we have the UI's make. Plus, selfishly, when building something that
> talks to DSpace, there is a lot of replicated code, much of it ugly, that I
> don't want to essentially copy verbatim into my project.
> 
> Let me ask you off the top of your head, how do you delete an item?
> 
> Hint: There's no item.delete();
> 
> 
> Examples
> JSPUI - EditItemServlet.doDSPost#CONFIRM_DELETE
> https://github.com/DSpace/DSpace/blob/master/dspace-jspui/dspace-jspui-api/s 
> rc/main/java/org/dspace/app/webui/servlet/admin/EditItemServlet.java#L202
> 
> XMLUI - FlowItemUtils.processDeleteItem
> https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/dspace-xmlui-api/s 
> rc/main/java/org/dspace/app/xmlui/aspect/administrative/FlowItemUtils.java#L4
> 04
> 
> WebMVC - ItemController.processItemDelete
> https://github.com/DSpace/webmvc/blob/master/webmvc-api/src/main/java/org/ds 
> pace/webmvc/controller/admin/ItemController.java#L73
> 
> REST...
> SWORD...
> Some external software interacting with DSpace (Cotinga, Drupal, 3rd party
> software)...
> 
> 
> Typically, its implemented by the following in all cases.
> 
> 
>         for (Collection collection : collections)
> 
>         {
> 
>             collection.removeItem(item);
> 
>         }
> 
> 
> But shouldn't a simple item.delete() should be enough?
> And why do we need to make the UI know all this?
> 
> Then what about item.curate()? That's not something that should live in the
> item domain, but rather some service should do.
> 
> So, how much about the internals of DSpace do we need to expose to a client?
> And continued, who performs the authentication checks?
> 
> There's alot of crud required just to do some CRUD.
> 
> I bring this up now, because even though item.delete is very simple, I'd
> like to get something better in place before something horrifically ugly
> like SaveGroup
> https://github.com/DSpace/DSpace/blob/master/dspace-xmlui/dspace-xmlui-api/s 
> rc/main/java/org/dspace/app/xmlui/aspect/administrative/FlowGroupUtils.java#L
> 162
> 
> I don't want to make the dspace-api code any heavier, but I'd like to
> simplify how things work. Hopefully facilitating some of our GSoC projects,
> and simplifying all projects that interact with the DSpace code. Hopefully
> simpler will mean less buggy.
> 
> Thoughts, ideas, prior-art, cheers, jeers?
> 
> 
> Peter Dietz


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to