Hi 

> Effectively what I'm looking at doing is along the lines of an extension to
> Node/NodeManager, using java beans on the spring platform.  The beans will
> provide generic logic to handle complex objects (and relations between other
> complex objects) and each instance will be created as a new complex object -
> driven by it's corresponding meta-data tables.  A transactional component
> will perform validation on the object relations and "low-level" node updates
> - driven by actions specified by the client (add, update, delete, cache in
> memory, whatever).  Certain relations could possibly invoke actions -
> somewhere to put business logic. 

I think that if you do it that way you will need to create object just
for about everything
and you will keep switching between the bridge interface and you own objects.
But I have been thinking in the same lines.(only i would ike my data
object to be nodes)
see
http://carlit.mine.nu/~keesj/mmbase-jxpath/xref/
http://carlit.mine.nu/~keesj/mmbase-jxpath/xref-test/net/sf/mmapps/bridge/tests/ExtendTest.html

the basic idea was to create interfaces for nodes

public interface MMServers extends Node {
      /***
       *
       * @return the current uptime
       */
      int getUptime();
  }

implement those interfaces by using delegation and a base class

public class MMServersImpl extends ExtendableNode implements MMServers {
    public MMServersImpl(Node node) {
        super(node);
    }

    public int getUptime() {
         return 2134;
     }
 }

Have a node mapper that can convert normal nodes to "extended" nodes.
  public class NodeMapper {
      public Node map(Node node) {
          if (node.getNodeManager().getName().equals("versions")) {
              //basic automapped node using proxy classes
              return (Node)
Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] {
Versions.class }, new AutoMapper(node));
          } else if (node.getNodeManager().getName().equals("mmservers")) {
              //extended node with extra code
              return new MMServersImpl(node);
          }
          return node;
      }
  }

The extendTest shows how this works.
Same kind of methods should be able to retun relations etc.
Only I would like the bridge to return those "extended nodes"
Does anybody know if it is possible to plug this in the bridge?

greetings



>   
> The philosophy for me is that getting the data in is only one aspect - there
> should be a facility to use the neatly-defined relation definitions that
> exist in the editwizard, for playing back content as well, without
> re-inventing the wheel.  Apart from this - I tend to deal in nothing but
> complex objects, therefore complex code.  Specifying keys for data
> retrieval, helper html wrappers for lists (through something a bit more
> dynamic than xsl) for embedded content will also be useful - some sort of
> templating engine.  Standard websites would then become more of a
> configuration exercise than the massive coding effort that is currently
> required. 
>   
> I haven't started the serious thinking yet, so any idea contributions at
> this stage would be welcome.  
>   
> cheers 
> Emile 
>   
> _______________________________________________
> Developers mailing list
> [email protected]
> http://lists.mmbase.org/mailman/listinfo/developers
> 
> 
>
_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to