cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Menard <kmen...@servprise.com>
Subject Re: [JIRA] Commented: (CAY-915) Add ability to generate a common interface for client and server classes
Date Tue, 06 Nov 2007 21:38:59 GMT
Given that my work essentially blocked on this issue, I've dug into it a bit
this afternoon.  It looks like everything works, but requires some invasive
changes that I wanted to float on the list before committing.

DataMap:

* Add new "interfacesSupported" property
* Add new "defaultInterfacesPackage" property

ObjEntity:

* Add new "interfaceName" attribute
* Add new "noInterface" attribute (although, I think I'm going to remove
this)

With that in place, an interface.vm can generate the interface with the
existing superclass templates conditionally implementing the interface.

To be really clean, there should probably be some mods to EntityUtils, but
I've been able to make everything work without changes to it.

Initially I was allowing ObjEntities to declare that no interface should be
generated for them, but it really of questionable value.  And it becomes a
bit problematic because the generated interfaces and superclasses really
need to operate with the other interfaces for relationships.  Otherwise, the
whole process is pretty shallow and only works for the simplest of cases.

This is my first real work with the datamap and objentity structure and my
velocity skills are practically non-existent.  So, if the overall design is
"approved" and I check the code in, I would appreciate a set of eyes or two
to give it a quick review.

Thanks,
Kevin


On 11/6/07 11:55 AM, "Andrus Adamchik (JIRA)" <dev@cayenne.apache.org>
wrote:

> 
>     [ 
> https://issues.apache.org/cayenne/browse/CAY-915?page=com.atlassian.jira.plugi
> n.system.issuetabpanels:comment-tabpanel#action_12592 ]
> 
> Andrus Adamchik commented on CAY-915:
> -------------------------------------
> 
> Got it now. So the package referred to the "auto" classes, not the interface.
> makes sense.
> 
>> Add ability to generate a common interface for client and server classes
>> ------------------------------------------------------------------------
>> 
>>                 Key: CAY-915
>>                 URL: https://issues.apache.org/cayenne/browse/CAY-915
>>             Project: Cayenne
>>          Issue Type: New Feature
>>          Components: CayenneModeler GUI
>>    Affects Versions: 3.0
>>            Reporter: Kevin Menard
>>            Assignee: Kevin Menard
>>             Fix For: 3.0
>> 
>> 
>> Currently there is a divide between ROP client and server classes.
>> Ultimately, it'd be nice to see some unification of the two.  In some
>> applications, however, there is compelling reason to keep two hierarchies
>> separate.  In that case, it may still be beneficial to have a common
>> interface that other code can use to interact with both client and server
>> classes.
>> Off hand, I'm thinking of two new fields to the class generation panel in the
>> modeler:
>> 1) Check box for indicating that the interfaces should be generated
>> 2) A text field for specifying the package to use
>> This also implies modifications to both the client and server superclass
>> velocity templates.

-- 



Mime
View raw message