Re: Interfaces and Java Client
Re: Interfaces and Java Client
- Subject: Re: Interfaces and Java Client
- From: David Avendasora <email@hidden>
- Date: Mon, 1 May 2006 15:10:54 +0100
Okay, so I should consider the EOModel to be ONLY the Model portion
of the MCV pattern? Should I implement filtering for what subclasses
of Part are valid for a given relationship in the controller or view
portion? (I would think controller would be correct)
Probably more importantly, how do I effectively implement the MCV
pattern in WO Java Client development?
Thanks,
Dave
On Apr 28, 2006, at 5:37 PM, Chuck Hill wrote:
You can not, and should not, use interfaces in the model. EOF
needs real classes. Interfaces are useful for the UI and other
places where you want (a component for example) to use multiple,
unrelated classes that share some common API not related to
inheritance. EOModels are about reality. Interfaces are about
adaptability.
Chuck
On Apr 27, 2006, at 10:03 PM, David Avendasora wrote:
I am using inheritance in the model as well as interfaces but the
problem isn't the inheritance! I'm having a hard time explaining
the structure of my application so I've done my first-ever UML
Class Diagram to try to explain it better. I've attached it -
hopefully it makes it.
I don't think I'm doing anything crazy. I think it is pretty
standard OO stuff (straight out of Head First Design Patterns).
Can anyone tell me a better structure?
Dave
<InheritanceAndInterfaces.gif>
On Apr 27, 2006, at 6:10 PM, Ken Anderson wrote:
Inheritance can vastly improve the features of EOF if used
properly. In general, I usually make all super-entities
abstract, and have a different table for each leaf. However, if
your data is all the same and you just need inheritance for
different behavior in code, I typically use a single table and
use well defined qualifiers for the entities. A while ago (after
much complaining), the EOF engineers worked out a way to not do
queries for all the sub-entities if you're entity qualifier was
straightforward like: "type = 'A'". I highly suggest sticking
with this for performance reasons.
Ken
On Apr 27, 2006, at 1:00 PM, Chuck Hill wrote:
On Apr 27, 2006, at 1:13 AM, Paul Lynch wrote:
You may want to use entity inheritance to design your model;
see http://developer.apple.com/documentation/WebObjects/
UsingEOModeler/7ModelingInheritance/chapter_7_section_1.html
The only thing I'll add is that, from experience, most of the
times that using inheritance is possible, I choose to flatten
out the model instead. Other people may have different
experiences. From the OO viewpoint, a complex design has the
same problems as overnormalisation has in relational database
design.
On the other side of this fence, I use inheritance whenever it
makes sense in the OO view. I have found that this greatly
simplifies many aspects of the application.
Chuck
--
Coming in late 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40avendasora.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Coming in late 2006 - an introduction to web applications using
WebObjects and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden