0

I'm practicing drawing some basic diagrams in Magento. I have completed the use case diagram, I wonder how to draw a class diagram. I see some classes in the directory model in the modules so they have too many attributes and methods. So I think I cannot draw class diagram with some classes.

Can someone explain to me how the components in Magento are designed in classes or objects? Can you give me some examples?

0

Firstable, there is nothing in the world "designed in class or object". We use another term: design pattern.

In short,

A design pattern is a general reusable solution to a commonly occurring problem in software design.

But I recommend you have a read to the following articles:

There are a lot of design patterns in this world, and Magento 2 is using the following:

  • Composite Pattern
  • Strategy Pattern
  • Factory Method Pattern
  • Observer Pattern
  • Object Manager (which consist of 11+ Design Patterns)
  • Decorator Pattern
  • Proxy Pattern

You can also check this: https://www.slideshare.net/MaksymPronko/key-insights-into-development-design-patterns-for-magento-2-magento-live-uk

But if you are talking to database structure in Magento, then these articles are good to start:

Finally, welcome to Magento 2 :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.