Hello Greg,
Can't help you with the first part of your question but I will try the
last ;-)
Greg Hulands schrieb:
> I remember reading in a post (but I can't seem to find it) that talked
> about have a tool generate the model classes and then subclassing those
> classes to put in the business logic. Is this generally the accepted way
> of doing things? What sort of naming convention do people use eg User
> and UserLogic or UserCore and User?
>
We use a method for separating model-methods from custom logic as
described in the book "WebObjects 5" (it's a german book, I'm not shure
if there is an english version available).
It's a bit of tricking java: you have to edit the EOJavaClass.template
used by the EOModeler so that this tools generates a java-class file
with an additional non-public interface include with declares all
model-methods in the same file. The eo-class itself extends not the
EOGenericRecord (or EOEnterpriseObject) but your custom logic-class.
In your abstract(!) custom logic-class you extends EOGenericRecord
(EOEnterpriseObject) and implements the Interface. Eclipse doesn't like
this construction and doesn't recognize the model-methods but java is
able to deal with this. Outside your eoclasses definitions you could
ignore the artifical construction and behave as there would be only one
"normal" eoclass.
It's not an elegant solution and you have to provide a custom logic
class for every eoclass even if there is no need for custom logic at all
but it's very convenient: once the template is edited you could update
your eoclasses through EOModeler every time without the danger of
loosing any of your custom code.
HTH,
Susanne
-- Susanne Schneider secuSuite Development CoordinatoriAS interActive Systems Gesellschaft fuer interaktive Medien mbH Dieffenbachstr. 33 c 10967 Berlin Germany
fon +49(0)30 69004-143 fax +49(0)30 69004-101 mail susanne.schneide..nterActive-Systems.de URL http://www.interActive-Systems.de
This archive was generated by hypermail 2.0.0 : Thu Oct 07 2004 - 07:23:43 EDT