-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctrine-style annotated Entities to abstract away ExtendedGraph #10
Comments
Like Doctrine ODB and DBAL, core Tripod and Tripod Entites + Manager might be seperate projects... |
This makes a tremendous amount of sense to me in general. I think nearly every actual use case would prefer defined domain objects rather than interacting with the generic graphs. Presumably the graph is still available if you want it. That said, I don't know about baking this into Tripod itself. It seems to me to be an independent layer that can be used to augment base-Tripod. Kind of like the distinction between an ORM and PDO. |
Of course, now I see the comment where you say EXACTLY THAT. |
Would the plan be for this to eventually support associations? |
Yup, see |
Would you always need to define the expected type of the property? |
I guess what I'm saying is that it seems like things could go pear shaped quickly if you don't know what to expect for any given property. Kind of like RDF itself, I guess :) |
LOL. I guess if it is undefined you just get an array of subjects. |
I guess it would just save them as plain literals then? |
good question... a special type of id might see it saved as a uri rather than a literal |
Working on #6 and revisiting the complexity of some of our business logic code that uses
ExtendedGraph
made me consider whether we could use POPOs as the models annotated specially via comments so Tripod knows how to deal with them.For example consider:
The entities are self documenting and nearly have all the data required to generate the
config.json
(aside from database connection details, tlogs etc.)We could even have entities express viewspecs by referencing each other:
Here we might end up with a view spec
v_user
which joins onfoaf:knows
.There could be a simple wrapper around Tripod, like Doctrine's EntityManager, which provides some basic operations for these entities. It would simply wrap
ITripod
and marshalExtendedGraph
objects in and out of instances of Entities.This would mean we could abstract the graph operations away from end users totally if they wish.
Thoughts?
The text was updated successfully, but these errors were encountered: