I’m researching a better templating system that could work a lot better for adding modules and the like. The technology won’t use the average templating system and has been available for the past six years. It also has been supported by all major browsers that support XML. What the hell am I talking about?
XSL
I have long been contemplating how the hell to add XFORMs to test the ability and get started on it now. In my infinite wisdom I never learned XML and XSLT, which is a shame seeing as how simple it all looks now. I most certainly won’t be diving my head into everything XML has to offer at the moment, but I do want to try my hand at the XSL processor and see if I can’t create a better templating sytem based off of it. One that can be easily extended and be fairly quick too.
Difficulty
I never learned XML, so it will be extremely difficult for me to learn how to do a lot of things XML. It doesn’t seem too hard, but if something breaks then I won’t know how to fix it. After a while it will be like, “How did I ever think this was hard?”. Right now, it is fairly new to me, so I am likely to make mistakes. I will do some test code and see if I can’t work at least something simple out at the start and then work on some complex examples later. I want to work to include XFORMs, but right now, I have no idea how to include it without screwing alot of things up. I still don’t really know anything about XFORMs.
Content Pages
The content pages will be the same for each template design, so I can make those pages either dynamically or hard coded. The content pages are then processed by the game page. The game page loads the xml page that has the content and then loads the design style and style sheet. I may create a class that does everything automatically, but I think that each page should do it manually, so that the page can be extended as much as possible.
Template Styles
Each game will have a different style that should be easy to change with little to no effort on the part of the programmer using the game engine. I could use MySQL so that the programmer can easily drop what each thing does. I really think they should edit the XSL page manually, so that they have complete control to extend what tag outputs. I should also have detailed documentation on how they can do this. Not every programmer is going to be able to know XML, hell I don’t, but that doesn’t mean that the other programmer should know.
I need to do some more experimentation to see if it is possible to add CSS and JavaScript to what is outputed for the browser. If it is possible then it will create a better system then one I can do by myself.
Game Pages
These pages do all of the processing for the XML and XSLT and output it to the browser. They won’t be the same name and they won’t use GET to get the page. The pages also need to do admin checks and player checks to make sure that the player has the ability to see the page and do the functions. Using the XML, it should be easier to assign permissions to each element.
Game Engine Version
I will add versioning control to the XML pages, so that the programmer can control which version the page was designed for and not load it, if it is less than the current game engine. All of this will be added to the first version of the game engine and the new one won’t be released until the new template system is finalized. The game elements still need to be finialized and I want to get a lot of things done before I start this project. The current template system, as flawed as it is, works fine for now.
Possibly Related Posts:
- Mecha Asylum Design Document
- Data Store is Finished, but Still Imperfect
- If You Look at it This Way
- Configuration SPL Usage
- New Configuration Factory Possible Features
Comments are closed.