Hi Klas,

The document you're writing is spot on! The subject really needs to be described. And probably discussed too :-) I've read some of it and you'll find some of my thoughts below in no particular order.

** Prefix pojo naming
*public class NeoOrder implements Order
I don't think anyone wants to use this naming scheme. The neo-prefix displays an implementation detail and moreover will make the sorted order (for instance Order and NeoOrder) separate the two files even though they are clearly linked.
I would go for:
  OrderImpl --> Order

** Repeated iterables
*In the chapter "Coding Relationships" there is a

private static class OrderIterable extends AbstractCollection<IOrder>

Should probably be parameterized using IOrder and the pojo object Order so that there would be no need to write a specific wrapping OrderIterable for each pojo. I do believe that there is such a utility already in the code somewhere. The Neo crew should be able to help on this. Anyone?

** Exposed underlying node
*In the chapter "Adding a relationship between wrapped nodes" you have an example doing
 myCustomer.addOrder( order );

This is fine. However, the getUnderLyingNode() is exposed using protected.
This will help with the above code and also for testing purposes (which I think you don't mention), but I have a problem with it - it's exposing the node.

One could go the other way in Customer.java:
 public void addOrder( Order order ) {
     order.addCustomerNode( this.underlyingNode );
 }
Not pretty and it does not help in the testdriven approach. Maybe it's for the best as you have done it.

** Meta model
*"Organizing your Nodespace" and subreferences pattern. This looks like a poor man's meta model. I've lobbied for a proper meta model support in Neo since there are many things one could do with a such a concept. This example could drive for home-grown solution where a standard support in Neo itself would to the trick for me. The pattern in itself looks fine, apart from scaling, I guess. A couple of millions of customers might not be too fun. Does anyone have experience with scaling this pattern?

/Björn



Klas Ehnrot wrote:
Hi all,

I just wanted to let you know that there is some small additions and
fixes to the Neo Design Guide which can be found here:

http://wiki.neo4j.org/content/Design_Guide

Basically I have added a section about using Lucene as search engine
when doing property based searching.

I have also cleaned up the document somewhat, fixed typos etc.

So there are still one or two topics missing but I think the best
thing now is to get some feedback, especially from the Neo crew so
that I know if I'm going in the right direction. Despite some possibly
missing topics, I believe the guide could be linked to now.

Regards
Klas
_______________________________________________
Neo mailing list
[email protected]
http://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo mailing list
[email protected]
http://lists.neo4j.org/mailman/listinfo/user

Reply via email to