maandag 2 juli 2007

DO2P2E

Document Object Oriented PHP Programing Enviroment
pronounce as dope

Dope is a MVC framework where the model returns dom objects and templates are written in xslt

Why ?



Because i think it gives the developer the best of both worlds, oop and xml.
OOP provides code reuse, good design and works wel when building a system.
XML is, in contrast to OOP, a declarative markup language. Tools like xslt have a functional programming like background, is therefor declerative and thus is a natural fit for xml. In other words: xslt is extremly good at transforming xml to xml.

So to have the best of both worlds you would need OOP/OOD techniques to write systems and xml/xslt techniques to create an interface and communicate to that system.

One way of creating an interface is by using the DOM as an storage container/object.

OOP and xml overlap eachother in the DOM. Extending the dom with Design Patterns should provide the best of both worlds.

The DOM has it limitations, it's very bloated, 1 mb of xml file can easaly turn into a 8 to 12 mb dom. For big xml documents, it's usefull to use sax instead.

But were using a database backend, so should not limit us in the short term.


I'm going to try and shape my ideas this with this blog.
Then i'll add the ideas to the dope framework.
Before i will start work on the dope:

  1. I'll "prove" that using oop/desing patterns alone is not a good fit with rest/xml.

  2. Then i'll show how/why xslt is a good fit

  3. The last thing i'll show, before i start work on dope, is how whe can use dom to tie xml with oop.

Geen opmerkingen: