Skip to content
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

Split the Crud.php class #39

Closed
tabacitu opened this issue Jun 16, 2016 · 1 comment
Closed

Split the Crud.php class #39

tabacitu opened this issue Jun 16, 2016 · 1 comment
Milestone

Comments

@tabacitu
Copy link
Member

The class has become way too big. Let's split it up. Look at the cohesion graph:
render

I'd say it's ok to split it in:

  • Crud.php
  • ButtonsTrait.php
  • AccessTrait.php
  • ColumnsTrait.php
  • FieldsTrait.php
  • EntityTrait.php (set name, save, sync, update, delete)?
  • ReorderTrait.php
  • FakeFieldsTrait.php
  • FakeColumnsTrait.php

Any better ideas?

@tabacitu tabacitu added this to the 2.1 milestone Jun 16, 2016
@tabacitu
Copy link
Member Author

Another option would be to split it using the existing comments structure. This means also splitting the operations (create, read, update, delete) into their own traits:

  • Crud.php
  • CreateTrait.php
  • ReadTrait.php
  • UpdateTrait.php
  • DeleteTrait.php
  • ReorderTrait.php
  • AccessTrait.php
  • EntityTrait.php (basics - model, route, entity_name, entity_name_plural)
  • ColumnsTrait.php
  • FieldsTrait.php
  • QueryTrait.php
  • ButtonsTrait.php
  • AutoSetTrait.php
  • FakeFieldsTrait.php
  • FakeColumnsTrait.php

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

No branches or pull requests

1 participant