Version 1.1: Template System

Class Based

I feel that by using classes and inheritance, I can create an extendable template system that is far easier to update and control. I will have to do a few tests before the final design of the class based system is finalized, but I think it will be far cooler than anything before. I also want to have it to where it only has a few functions for loading the XML files and processing. The rest of the work will be done manually by the coder.

Problems

I need to work out exactly how the class knows about the display and what not. I think I could probably have the parent class the display class, since the functions required would be inhert to all of the base classes. The only other problem is that how do I know which function to use for each of the tags. Do I do a class for each tag or do I use a function for each tag for that possible xml page and setup. It would be better to separate it out, so that it can be reused.

XML Scope

The other problem would be how to control which classes are used when there are two xml tags of the same name but under two different parents. I can already forsee problems with trying to figure a solution for that.

Completion

If I can get it to work correctly then I can create a damn good template system. It will probably take a week or two to get it to work correctly and from all of the different tests. It should keep until version two when a better design is thought of and developed.

Possibly Related Posts:


Comments are closed.