guest [95.90.223.65]  Mon, 17 Feb 2020 16:21:01 +0000

Modified page: https://wiki.horde.org/Project/Rdo
New Revision:  8
Change log: Some thoughts on subtyping, wrapping or replacing the entity class

@@ -8,15 +8,21 @@

Rdo currently gives unexpected results for to-one relations where no or a wrong relation key exists. [#10880]

 ++ Ideas for H6
- * Allow subtyping or wrapping the Horde_Rdo_Base class
- * Refactor against interfaces rather than base class
- * Have a minimum interface which allows "plain" entity objects without the smart delete, update etc shortcuts. - * Move some of the rarely used stuff to traits. Keep the traits in the default Horde_Rdo_Base but don't require them in the base interface
- * Maybe some more dynamic approach to lazy loading?
- * __toString() for Horde_Rdo_Query objects. Basically a convenience wrapper for ->getQuery(). - * returning exceptions instead of null for wrong relation keys or null relation keys. Facilitates chaining relations like $baby->mother->granny->name. Currently if granny isn't present, we run into a php fatal (method on non-object). This is a BC break.
+ +++ Allow subtyping or wrapping the Horde_Rdo_Base entities
+ * All parts of the Rdo framework delegate the actual instanciation of entities to Horde_Rdo_Mapper::map() + The map() method can be overwritten by the implementing mapper or an intermediate app-specific base class + You may even do away with Horde_Rdo_Base entities completely, but then you will want to patch create(), update() and delete, too + If you use Horde_Rdo_Factory, you may want to subclass it and overwrite the create() method.
+    Most likely you will want to inject some dependencies to your entities.
+
+ +++ Refactor against interfaces rather than base class
+ +++ Have a minimum interface which allows "plain" entity objects without the smart delete, update etc shortcuts. + +++ Move some of the rarely used stuff to traits. Keep the traits in the default Horde_Rdo_Base but don't require them in the base interface
+ +++ Maybe some more dynamic approach to lazy loading?
+ +++ __toString() for Horde_Rdo_Query objects. Basically a convenience wrapper for ->getQuery(). + +++ returning exceptions instead of null for wrong relation keys or null relation keys. Facilitates chaining relations like $baby->mother->granny->name. Currently if granny isn't present, we run into a php fatal (method on non-object). This is a BC break.

 ++ People

 ChuckHagenbuch is the primary author of Rdo.

--
commits mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]

Reply via email to