No subject


Mon Nov 23 20:10:05 CET 2009


recipe stays the same, even if some properties change (like if a rating
or review is added). Additionally your recipes _need_ some kind of
external identity (even if this is just the UID in the database), as you
need to link to them I guess :)

Furthermore, you are _not_ allowed to change a ValueObject after its
creation. This is +1 for _entity_.

Additionally, only _entities_ are findable by Repositories, as only
Entities have an Aggregate Root.

> 2. Can Value Objects without real identities get ratings, reviews,
> etc... on the website?  If someone rates a recipe for "Chocolate Cakee"
> "4 stars" and then I fix the name, I have created a new Recipe.  Would
> the rating be transferred?
See above ;-)


> 3. What is the best practice for modeling Unit?  Units are standard
> things that shouldn't change.  I'd like the User Interface for choosing
> a measure to limit it to a defined list.  I see two options:
> 
> 	A. Create a Unit Model, Repository, etc.. Build CRUD forms for Units.
> Make one of the views return all Units in a format that creates a select
> box.  Then when creating the form for creating new Recipes, it would
> call the "all units" view to build the form. My problems with this one:
>  It seems way complex just to build a drop down that lists "cups,
> tablespoons, teaspoons, ounces, etc.."
If there isn't any semantics associated with these units for now, you
could f.e. just use a simple list of named integer constants.

For me, the _Measure_ is a Value Object. This has a quantity and a unit.
As the unit is a fixed list, I'd use a fixed list here as well.

> 	B. Yet to be implemented Single table inheritance.  Ala
> "static_info_tables"  Only problem with this one is that it's not
> implemented yet. :)
I'm not sure how you want to apply this to your use case, but maybe I'm
overlooking something ;-)

Jochen already has some prototypical code working for that, so I'd
expect this to come to trunk in the coming months :)

> 4. Where should non-Recipe domain fields go?  Currently our recipe
> editor can assign each recipe to a handful of websites using a "Web
> Instance" multi-select that is build based on a query of our sys_domains
> table.  A real recipe doesn't have any concept of different websites.
Is the website an information of the recipe, or is it rather a meta-data
which f.e. decides on which website the recipe will be shown?

If it's for the former case, I'd include the website into your recipe,
because the websites of the recipe are a concept of _your_ domain I'd
say... Or if you want to separate this somehow, then move the "website"
property to a subclass of "recipe" (f.e. OnlineRecipe or the like) - and
make the "Website" a part of your domain model.

Hope this helps!

Merry Christmas :-)
Greets,
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list