Mike, other Java Client developers out there, interested bystanders,
I've got what I think is a new feature request for Entity Modeler and
Velocity EOGenerator, but I want to throw the idea around here first
and see what other minds come up with.
For Java Client projects, a key design concept is to have a common
Entity class that both the server-side and client-side classes
extend. Apple mentions it in the old Java Client documentation, and
I've talked to several others that do use this.
The problem is that there is no way to really generate this class
using EOGenerator because there's no way to specify a "common" Class
in Entity Modeler only Server and Client classes, and EOGenerator
wouldn't look for it even if it was there. This means that any
template variable that would print the fully qualified class name
won't work to generate a common class package. This makes it
impossible to define relationships and such in the common class. In
theory, I could leave the defining of relationships and even
attributes to the server and client classes and simply use key-value
coding in any methods I add to the common class, but this seems very
limiting.
So, here's what I'm proposing:
- Add a "Common Class Name" to the EOModel Entity definition.
- Add a "Common Class Attribute" flag to the EOModel Attribute and
Relationship definitions - maybe not this one, because if it is
flagged as both a Class Attribute and Client Class Attribute, then
you can automatically put it in the Common Class.
- Add a "Common" checkbox (next to the Java and Java Client
checkboxes) to the .eogen editor that would tell EOGenerator to look
for the above attributes.
(really, these should be renamed to (Server and Client, and the
accompanying text changed, it doesn't make sense as is)
Am I missing anything?
Dave
This archive was generated by hypermail 2.0.0 : Wed Feb 06 2008 - 09:14:01 EST