PrestaShop / prestafony-project

Some resources to help you migrate PrestaShop to Symfony 3
https://github.com/PrestaShop/prestafony-project/projects/1
11 stars 8 forks source link

CRUD Form management #66

Closed sarjon closed 4 years ago

sarjon commented 6 years ago

Following the idea introduce in this PR https://github.com/PrestaShop/PrestaShop/pull/8908 for Configuration forms management, maybe we can have similar workflow for CRUD forms as well?

Below is an example workflow for Edit action of any Entity (in this case entity with ID 12):

crud workflow

As you can see it is very similar to Configuration forms management workflow, thus easy to learn and implement.

These could be class interfaces used for forms management:

crud interfaces

sarjon commented 6 years ago

@mickaelandrieu wdyt?

mickaelandrieu commented 6 years ago

I think I want to know which tool do you use to do your sequence diagram :)

For the sequence/workflow/implementation stuff, it's up to @eternoendless for the most. I'm interested in the extensibility of the system: where exactly do you plan to dispatch hooks and what will be available in them: be careful to not give access to something that people can break :)

sarjon commented 6 years ago

i think it's the same tool as you use draw.io and i used UML elements https://prnt.sc/kld8z3 :+1:

regarding extensibility, it could be same type of hooks as it is in Configuration FormHandler. For example in getForm() / getFormFor() methods dispatched hook could be action{entity_name}BuildForm and in save() method it could be action{entity_name}FormSave.

mickaelandrieu commented 6 years ago

I think I'll quit PrestaShop to become some UML/draw.io guru soon :p

Ok for the extensibility.

eternoendless commented 6 years ago

Looking good 👍