What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

is there a way to namespace transfers to avoid name collision? or all of them belong to common names

U01G4K5E0J2
U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet
edited January 2021 in Help

is there a way to namespace transfers to avoid name collision? or all of them belong to common namespace and thers is nothing one can do about that?

Comments

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    can you write your example when you need different namespaces?

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    how abount Module\CategoryTransfer?

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    @ULL9CA6CB what do you think

  • Ahmed Sabaa
    Ahmed Sabaa Senior Application Architect @Spryker Posts: 54 πŸ§‘πŸ»β€πŸš€ - Cadet

    Why is this needed? A module owning a transfer object is against the generated and common nature of transfer objects. It might help with Project development (maybe) but I do not see a reason why a transfer should be β€œowned” by a module

  • Ahmed Sabaa
    Ahmed Sabaa Senior Application Architect @Spryker Posts: 54 πŸ§‘πŸ»β€πŸš€ - Cadet

    In core it would not do much help, but you’d probably have to duplicate a LOT of classes during the generation

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet

    why is it needed? probably not needed, but might be useful, since Category, SomeModule\Cagetory and SomeOtherModule\Category might be entirely different things

  • Ahmed Sabaa
    Ahmed Sabaa Senior Application Architect @Spryker Posts: 54 πŸ§‘πŸ»β€πŸš€ - Cadet

    Why would it be called Category then? If it’s a specific kind of Category

  • Stanislav Matveyev
    Stanislav Matveyev Sprykee Posts: 211 πŸ§‘πŸ»β€πŸš€ - Cadet

    btw you can create own class using AbstractTransfer parent inside the module for your needs

  • Ahmed Sabaa
    Ahmed Sabaa Senior Application Architect @Spryker Posts: 54 πŸ§‘πŸ»β€πŸš€ - Cadet

    The concept of bounded context can be adapted to naming also

  • U01G4K5E0J2
    U01G4K5E0J2 Posts: 194 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    @ULL9CA6CB if it's specific then namespacing it would be nice way to point that