Oktavilla/Porthos-Engine — Issue #129: Datum as EmbeddedDocuments stoopid?
Author: joeljunstrom
Created: 2012-03-03 22:15:36+00:00
State: open
Labels: Questions

With regards to how ours views look atm (well besides from the ”presenter” being part very bad and part not even used)
and how fickly it is to handle embedded documents I started question the reason for the current implementation.

The initial reasons for datum being embedded documents was that we hoped to be able to update them autonomously (which we can't) and that we wanted to be able to build up page types from dynamic building blocks (which we do but we still need to use the data in the views so we cannot change the data structure without changing the representation in the views).

So for the question: Why is the Datum class and classes inherited from it not implemented as "plain old ruby objects" with to_ / from_mongo methods and used as keys.

Then we could be specific in code when we define page types. I realize this goes against the idea of being able to build the page types in the interface but to be honest that does not really work atm anyhow.

What I havent thought much about is collections (and nested such) but it should not be much of a trouble as long as things know how to persist itself.

Am I making sense @arvida ? :beer: