Tuesday, May 30, 2006

Action Strategy

XCube doesn't have full-fledged framework because it isn't development framework. 'Framework' is coming to have significance for PHP, and sticks pins into PHP programer. Therefore, I don't want to use this word 'Framework' to untrigger extra discussions.
('Framework' is given special treatment in web program world. I wanted to use Japanese 'Wakugumi' instead of 'Framework'. But, the meaning of 'Wakugumi' is Framework...)

XCube_Controller is Controller class. It is called Virtual Controller in Legacy 2.1 because XOOPS2 structure can't have controller well. Modules can work without accessing controller. Developers don't need to turn their coding style.

XCube_Controller has the empty member function about module process. It is execute(). The function delegates to XCube_ActionStrategy object that is the member property of XCube_Controller. The default value of the member property is null. In other words, XCube_Controller doesn't work as framework until you set your policy to it. You can create your ActionStrategy and embed it to XCube_Controller. Yes, it is removable.

As you know, Legacy include many codes that is like framework programing. But, we don't force it to developers. And, that framework isn't the feature of Legacy. See class/ directory. We have defined the subclass of XCube_ActionStrategy in every modules.

If you are professional, you don't want to use the easy framework of Legacy that is more simple than mojavi2 and exFrame::mojaLE. I designed it too simply to untrigger extra discussions. It is the part that I have paid much attentions to.

This circumstances have added the stress to me. To know PHP world, I wanted to research it. But, I have not kept enough time to research PHP world. I'm sorry it is another world for me. But I believe that most developers think 'Wakugumi' no problem by ActionStrategy AS Removable ActionStrategy.

No comments: