Hello everybody,

I'm currently working on the design of a software that will use eZ Components.

Question: how to bind a UserInput field to a PersistentObject field?
How to test that binding?

Several solutions i can think of:
0) Duplicate field specifications in UserInput.
1) Read the field definition from the PersistentObject definition and
create the UserInput field.
2) Decouple the field specification from PersistentObject into another
object, and generate the PersistentObject *and* UserInput field from
that.

Pros and cons of each solution that i could think of.

Solution 0:
+ fastest design to develop the first version of the software,
- hardest to maintain.
test: duplicate tests or make a high-level test with selenium.

Solution 1:
+ viable for model-driven development,
- requires to read the field specifications from the the database
schema as well (null? lenght?)
test: make a fixture of the PersistentObject, assert that the
generated UserInput field matches expectations.

Solution 2:
+ re-usability of the field for any component: makes the software
cheaper to maintain,
+ viable for model-driven development,
+ useful to generate the DatabaseSchema as well,
- requires the description of a standart to use for the whole
application or will cost to maintain.
test: make a fixture of the middle object that has the fields
specifications, assert the generated DabatabaseSchemaField,
PersistentObjectField and UserInput field.

Thanks in advance for your input!

Regards, James.
-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to