Skip to content

Use Flyweight pattern for blocks in layout updates #29

Closed
@stalniy

Description

@stalniy

I think it's necessary to use Flyweight pattern for blocks in layout updates that does not have their own state information. In more cases when developer need only to display some template he uses a Mage_Core_Block_Template without any parameters for example

<block type="Mage_Core_Block_Template" name="my.banner" template="banners/some_banner.phtml" />

For such situation you can create "Context" object that will observe all parameters for block by his name. It can decrease usage of memory during displaying View part of system.

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