Giter Club home page Giter Club logo

Comments (10)

zuk3975 avatar zuk3975 commented on May 24, 2024

How to use reusable Javascript grid Extensions #240

from docs.

sarjon avatar sarjon commented on May 24, 2024

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)?

from docs.

matks avatar matks commented on May 24, 2024
  • 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.

from docs.

sarjon avatar sarjon commented on May 24, 2024

Additional topics to document:

  • Reusable PrestaShop form types
  • PrestaShop console commands

from docs.

rokaszygmantas avatar rokaszygmantas commented on May 24, 2024

Using Domain Exceptions and how to handle them #255

from docs.

zuk3975 avatar zuk3975 commented on May 24, 2024

Reusable PrestaShop form types #245

from docs.

sarjon avatar sarjon commented on May 24, 2024

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?

from docs.

matks avatar matks commented on May 24, 2024

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

from docs.

matks avatar matks commented on May 24, 2024

🆙 to @matks myself

from docs.

matks avatar matks commented on May 24, 2024

Updated

from docs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.