Re: an outsiders view
"B. Kamer" <[email protected]> Fri, 16 Dec 2005 18:06:46 +0100
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
On Dec 16, 2005, at 5:15 PM, Nathan White wrote:
Hi Nathan,
> I have been using Binarycloud off and on for about 4 months now and
> I am very impressed with how quickly I can get results. The core is
> really solid. I do have a few concerns about some of the API that I
> thought I would share. Some of these may come from my lack of
> knowlege and experience with Binarycloud, if this is the case
> please ignore.
> The Conf Class is awesome! Why isn't this incorporated more into
> the Node class? Instead of having setParam and getParam why not
> have a node automagically create its own conf namespace so all
> nodes have an easy place to reference; a uniform interface. In
> addition with node creation the Conf class could be used to
> autocreate a tree manager so you could crawl the tree and pre and
> post process nodes in this fashion.
The Conf class was rewritten some time ago. It then introduced this
concept of paths.
This thought has crossed my mind too. I'm a bit concerned about
speed, but i like the idea...
This format could be used for all sorts of info.
eg. instead of;
$parent = $this->getParent();
$related_node = $parent->getChild('someid')
one could do:
$related_node = $this->getRelatedNode('../someid');
> I also think the Event class is great. I just think its a shame
> that it isn't being used more, Nodes should fire events when
> entering the initialization/process/render steps and fire events
> that other nodes can listen for so they can respond without having
> to know the parent/child relationship. This would make Nodes
> insanely powerful.
I haven't used the events ever at all. But i think i see were this
could go. Elaborate please...
> Having Smarty/Templates integrated so closely to a node sucks in my
> option, if you want to output to a template create a template node,
> or have a "/template" namespace in Conf. Render should have
> settings like HTML,SVG,PDF,JPG etc
Agree here. I would too like to seperation between nodes tree and the
rendering tree. It is workable, but can become a bit messy. Not sure
myself how this would work. There is allready an RenderManager but i
am not sure you can just add a renderer. bc is pretty much
intergrated with smarty.
> The public interface to a node is way too big.
Yep
> I have already implemented alpha code for myself with all the above
> including a setCondition and runCondition method on the Node class.
> These methods allow one to add conditional nodes inside a node that
> point to an NDF file, and automatically creates the child node and
> runs init and process as well.
>
> Speaking of NDFs, I hate XML config files, they are great for
> porting configs from one environment to another but to work with by
> hand is painful. I have patched my Binarycloud install so it runs
> native php config files, I find it much easier to deal with.
Personally I do like XML and I do not see the diff in editing php
array's or xml files. Especially since the via the xml one can use
<node:include>. Which would become a function or something in php.
messy to my opinion.
> My though with this is to create a simple web base interface for
> handling the editing/creation of config files. In this fashion we
> could then create resources and the config manager could
> automagically manage them and validate that all required parameters
> are filled and valid.
yep. I think the idea was to get the conf data into a db. an
interface to that could be dont...
an interface to edit ndf's should also be possible... there are not
that complex (params, templates, template params, contains &
includes). But that might change if you need to hook node up in a
different way than a simple tree. Not talking about the sepeartion of
Node and Rendering.
> I have many more ideas but I don't want to get carried away. I
> thought I would share and see if this could be of any use to the
> direction of Binarycloud. If so I would be more then happy to
> contribute to the project, else I may create a branch if that is ok.
any idea is welcome... so please get carried away..
don't know about a seperate branch, the current one needs improvement
as it is anyway...
are you using php 4 or 5?
Bas
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev