rom-rb / rom-rb.org

The official rom-rb website
https://rom-rb.org/
45 stars 108 forks source link

Feedback on ROM - Quick Start #313

Open qortex opened 4 years ago

qortex commented 4 years ago

On page: https://rom-rb.org/learn/repository/5.2/quick-start/

Now we have a full CRUD setup, we can create, update and delete user data:

As far as I understand, the snippet gives CUD capabilities, but not a Read capability, which would need to add a selector that routes to a Relation selector method.

solnic commented 4 years ago

@MicMicMon technically speaking, repositories have full support for CRUD w/o commands declaration. You have access to all relations and they expose CRUD interface. How you encapsulate CRUD is important. That's why repositories exist - a place to encapsulate data access. This whole section should be improved or even rewritten to be honest.

For now we can just change this confusing sentence to:

Now we have a full CUD setup, we can create, update and delete user data:

qortex commented 4 years ago

Ah ok. Indeed, that's not what I understood from the writeup :)

If you're interested, I can give a shot at a doc PR when I get my head around the various concepts. I guess it could be interesting coming from someone like me who has no prior background on ROM.

solnic commented 4 years ago

@MicMicMon sure! contributions like that are always welcome