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

Missing documentation items for Symfony migration #198

Open
15 of 25 tasks
matks opened this issue Feb 1, 2019 · 10 comments
Open
15 of 25 tasks

Missing documentation items for Symfony migration #198

matks opened this issue Feb 1, 2019 · 10 comments
Assignees

Comments

@matks
Copy link
Contributor

matks commented Feb 1, 2019

Here's a list of things we need to document (the list will evolve in time)

Related to Grid

Related to Symfony (focus on controller / app layer of the migration)

Related to CQRS (focus on domain / core layer of the migration)

  • What is CQRS Document CQRS #232
  • Focus on CQRS being used by PrestaShop: legacy handlers layer
  • Use of ValueObjects and DTOs (related to CQRS)
  • Using Domain Exceptions and how to handle them Document domain exceptions #255
  • What is the usage of Adapter namespace and its content

Related to new Admin Theme

  • A zoom on how we use webpack
  • Using scss

Related to testing

  • Writing unit tests
  • Writing behat tests
  • Writing puppeeter tests (soon)
@zuk3975
Copy link
Contributor

zuk3975 commented Apr 9, 2019

How to use reusable Javascript grid Extensions #240

@sarjon
Copy link
Contributor

sarjon commented Apr 10, 2019

overview of the main services being used in PrestaShop

What are these? 🤔

twig folder structure and usage
using scss
thin controller, fat models
internal usage of roles for PrestaShop, linked with security
a zoom on how we use webpack
using Domain Exceptions and how to handle them
use of ValueObjects and DTOs (related to CQRS)

Can you explain these what you mean?

how to use composition and SF services to extend PrestaShop behavior

Is this in context of module development or PrestaShop customization (either by creating custom bundle or adding new services to core)?

@matks
Copy link
Contributor Author

matks commented Apr 10, 2019

  • overview of the main services being used in PrestaShop
    I was thinking about the SF and 3rd party we are using and how they are being used.
    Example:
    -- we use symfony form types
    -- we do not use Doctrine
    -- we use Tactician command bus
    -- we use Twig and some custom extensions
    -- we do not use symfony translator
    -- we use symfony security configured for us

  • twig folder structure and usage
    Main folder for a template will be built following the Page location in the BO (example: Sell > Catalog > Manufacturer), in there we usually have main templates (add.html.twig ...) and a subfolder Blocks ...

  • using scss
    An introduction of what is scss, why and how we use it in prestashop. A short explanation and some links to scss doc. Idea is to answer to "hey, I want to contribute to PS css but I dont understand what is this scss thing ?"

  • thin controller, fat models
    This is a standard best practice where you try to avoid business logic from Controllers. As it was not followed in legacy controllers, I think it's good to re-explain it, what value it brings (and we do it in controllers by delegating business logic to services).

  • internal usage of roles for PrestaShop, linked with security
    Basically, it explains to a developer what are the CREATE, READ, UPDATE and DELETE rights used by PrestaShop for each page/tab, how to grant them (from Permissions page), and how this is being implemented using Symfony Security Voter

  • a zoom on how we use webpack
    Same as for scss: "hey, I want to contribute to the admin theme but I dont understand, I modified the SCSS file and I cant see my change" => short explanation of webpack, what it does, why we use it, then links to official webpack doc

  • using Domain Exceptions and how to handle them
    Explanation of why we have so many Exceptions (I say this on purpose because actually a lot of php projects dont use custom Exceptions), show how a developer can benefit from it and provide a usecase of "I want to handle exception A but not B"

  • use of ValueObjects and DTOs (related to CQRS)
    A reminder of what are VOs, what are DTOs, why we use them instead of arrays and StdClass

how to use composition and SF services to extend PrestaShop behavior

Is this in context of module development or PrestaShop customization (either by creating custom bundle or adding new services to core)?
Both, but first I need to discuss with @eternoendless whether we can talk publicly about Symfony services override as an extensibility mechanism or not.

@sarjon
Copy link
Contributor

sarjon commented Apr 10, 2019

Additional topics to document:

  • Reusable PrestaShop form types
  • PrestaShop console commands

@rokaszygmantas
Copy link
Contributor

Using Domain Exceptions and how to handle them #255

@zuk3975
Copy link
Contributor

zuk3975 commented Apr 17, 2019

Reusable PrestaShop form types #245

@sarjon
Copy link
Contributor

sarjon commented Apr 18, 2019

We mark some classes and methods (mostly adapters) with @internal tag. However, I believe that it's not clear for most of the community what they mean, so I suggest to document them and explain how we use them, wdyt @matks?

@matks
Copy link
Contributor Author

matks commented Apr 18, 2019

@sarjon good idea 👍 you can link it to http://docs.phpdoc.org/references/phpdoc/tags/internal.html

@matks
Copy link
Contributor Author

matks commented Sep 11, 2019

🆙 to @matks myself

@matks
Copy link
Contributor Author

matks commented Jun 15, 2021

Updated

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

4 participants