This Site’s Design Pattern
Posted by Elliot.
Any site that needs interaction between various elements (menu buttons to page builders and more) have a behavioural need. This site uses a Command Pattern with a Command List to control the behaviour of the menu buttons and the content. The other reason to use a Command Patterns is to easily change the function of various menu items, in this case say the links menus.
The structure is based on the catagory tags and the publishing date order from my blogg. Once the RSS feed is loaded, the catagories and sections menus are built. This is where a Command pattern works well as the instanisation of the various commands is not static but dynamic. If I wanted to add in different content asides from the RSS2 xml feed like the gallery, I need to create a new command which deals with the creation of this new pagestyle and add a menu to the invoker panel in the main class.
Good OOP allows for easy expansion and change. A Command Pattern in this case suited the dynamic structure and my desire to add in different page styles.
The next stage is to introduce a Creation Pattern to setup the instants of the various Commands.