Skip to content
This repository has been archived by the owner on Mar 5, 2019. It is now read-only.

Visualise data schema as UML class diagram or similar #110

Open
2 of 3 tasks
aspiers opened this issue Jan 14, 2017 · 4 comments
Open
2 of 3 tasks

Visualise data schema as UML class diagram or similar #110

aspiers opened this issue Jan 14, 2017 · 4 comments
Assignees

Comments

@aspiers
Copy link
Member

aspiers commented Jan 14, 2017

Description

Our data model schema isn't trivial, so it would be useful to have a UML class diagram or similar to refer to when hacking on the code.

Comments, Questions and Considerations

Our schema is mainly defined by the files in src/ruby/meetings/app/resources/api/v1.

Acceptance Criteria

Given the schema defined in the Rails app,

When the schema is updated,

Then we can auto-generate a new UML class diagram or similar which visualises the schema in an easy-to-understand way.

Possible approaches

@aspiers
Copy link
Member Author

aspiers commented Jan 15, 2017

I tried out https://github.com/SOM-Research/jsonDiscoverer and unfortunately the JSON API response format is too complex and verbose for it to be able to understand usefully; you end up with diagrams like this:

uml

As a next step, I've asked for advice on the JSON API forum.

@charlottebrf
Copy link
Member

Could be a good diagram to add to our presentation deck, to show working process @aspiers ?

@aspiers
Copy link
Member Author

aspiers commented Jan 15, 2017

Yes it could!

@aspiers
Copy link
Member Author

aspiers commented Jan 22, 2017

Got responses from the forums, and they recommended Rails ERD – Entity-Relationship Diagrams for Rails and RailRoady :: Ruby Model & Controller Class Diagram Generator. Funnily enough, the latter is already in our Gemfile! So it turns out that all I needed to do was

bundle exec rake diagram:all

to get these:

models_brief

models_complete

However they are quite confusing to look at so maybe we can still do better.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants