|  | Posted by Evert | Rooftop on 05/16/05 22:24 
Hi people,
 I'm working on a component system and started with a component class.
 The idea is the following:
 
 <component id="c1" type="forms/LoginForm" class="joop" />
 <component id="c2" type="TextArea" width="200px">
 Sample text
 </component>
 <component id="c3" type="VPanel" class="sample">
 <component id="c4" type="Button" caption="Yoo!" />
 </component>
 
 Don't worry about speed or anything, I'm taking care of that..
 
 This is my PseudoComponent class
 
 |
 class PseudoComponent extends PseudoModule {
 
 function __construct(&$sabretooth, $id) {}// constructs the
 component
 function __destruct() {}                  // destructs the component
 function addChild(&$child) {}             // Ads a child to the
 component
 function canAcceptCDATA {}                // Returns wheter or
 not this component can contain CDATA
 function canHaveChildren {}               // Returns wheter or
 not this component can contain children
 function display() {                      // displays the component
 function displayChildren{}                // displays component
 children
 function &getParent()                     // returns this
 components' parent
 function getProperty($property) {}        // returns a
 property-value
 function insertComponent($targer) {}      // inserts this
 component into another component
 function setProperty($property,$value) {} // sets a property
 
 }
 
 I want to give PHP to have a natural application-programming feel, along
 with events and all (which is implemented by the PseudeModule class).
 And after that, start off with a web-based PHP RAD tool. (which I plan
 to do with either document.designMode or XUL)
 ||But! I also want to keep things simple, a low learning curve, and
 still very extensible.
 
 I want to start really good and I have given myself a lot of thought
 about it and I decided the best thing for me would be to start out with
 a proper base class while looking at how the guys from Macromedia Flex
 and Borland Delphi did it =)
 
 This is my idea, am I missing something essetial, I know everything is
 still very vague, but if you could give a comment on it, I would appriciate.
 
 One issue I still have, I would like to make the components produce
 different output based on skins, to give an idea about how I want to do
 this, i'll show you an example list:
 
 xhtml_default
 xhtml_fire
 xhtml_storm
 wml_default
 xul_default
 xul_pimping
 mxml_default
 xforms_default
 xhtml_ajax_default
 xhtml_ajax_fire
 
 Any ideas or suggestions are welcome =)
 
 grt,
 Evert
 |
  Navigation: [Reply to this message] |