Skip to content

Module inconsistencies #882

Closed
Closed
@tzyganu

Description

@tzyganu

This is not an issue. It's a set of questions, but in my opinion it would be nice to get some answers to see where Magento 2 is going code wise.
I see that some modules are now some how inconsistent. I know that the code gets refactored and maybe some of the modules did not get to that point yet, but I also see different changes in different directions.
Let me give some examples so you understand what I mean.
It would be nice if you could answer them and indicate which one is the "right" way to do it, so we don't waste time investigating what's going to go away.

  1. Admin grid filters.
    • All of the admin grids except the CMS blocks and pages have the Magento 1 look. Each filter above the corresponding column, The CMS blocks and pages have the filter section separated. Are the other grids going to be changed to look this way? (My personal opinion that should not count but I have to say it...I hate this separation between the filters and the grid) What about the grids that appear as secondary objects? Example...when selecting a related products for a main product. Are these going to be made to look the same as the CMS grids?
  2. Admin grid generation
    • The admin grids are now generated via a layout XML file except the ones for Products which is a magento 1 style block. Is this one going to be refactored also?
  3. Admin grid data source.
    • In the grids generated by via XML files there is a dataSource object. For most of the grids this is a simple collection (magento 1 style). For the CMS pages and blocks there is a new type of data source Magento\Cms\Model\DataSource\PageCollection that uses some Criteria objects.
  4. Service Contracts
    • Some of the modules have them, some don't. For example why aren't there any service contracts in the CMS module?
  5. Controller actions
    • for the actions that basically load the layout and render it there are 2 methods used. $this->_view->loadLayout()->renderLayout(); and return $this->resultPageFactory->create(). Which one is the correct one? The same goes for action redirection and forwarding.
  6. Coding standards
    • Some of the protected members use an underscore prefix in their name, some don't. From what I got from here underscores should not be used to prefix private and protected members. Is everything going to be refactored?
  7. Fully qualified class names
    • Some of the files contain fully qualified names for classes, others have use declarations. What should we use?

That's all I got so far.
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions