DATAGRAPH-503 - Polished reference documentation.

Combined the forewords into the preface document.
This commit is contained in:
Oliver Gierke
2014-08-22 14:37:34 +02:00
parent 7573cb1e38
commit 0bde5934c9
7 changed files with 52 additions and 43 deletions

View File

@@ -1,22 +1,26 @@
= Good Relationships: The Spring Data Neo4j Guide Book
Michael Hunger
Michael Hunger; Oliver Gierke
:toc:
:toc-placement!:
:revnumber: {version}
:revdate: {localdate}
:idprefix:
:spring-data-commons-docs: https://raw.githubusercontent.com/spring-projects/spring-data-commons/master/src/main/asciidoc
:spring-data-commons-docs: https://raw.githubusercontent.com/spring-projects/spring-data-commons/issue/DATACMNS-567/src/main/asciidoc
{version}
(C) 2010-2014 Neo Technology, Inc. - Pivotal Software, Inc.
(C) 2010-2014 Neo Technology
NOTE: Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
NOTE: _Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically._
toc::[]
[preface]
include::introduction/rod.adoc[]
include::introduction/emil.adoc[]
[[preface]]
= Preface
:leveloffset: +1
include::introduction/foreword.adoc[]
include::introduction/about.adoc[]
:leveloffset: -1
[[tutorial]]
:leveloffset: 0
= Tutorial
image::cineasts.png[]
@@ -25,7 +29,7 @@ The first part of the book provides a tutorial that walks through the creation o
The tutorial takes the reader through the steps necessary to create the application. It provides the configuration and code examples that are needed to understand what's happening in Spring Data Neo4j. The complete source code for the app is available on http://spring.neo4j.org/cineasts[Github].
:leveloffset: 1
:leveloffset: +1
include::tutorial/about-tutorial.adoc[]
include::tutorial/setup.adoc[]
include::tutorial/domain.adoc[]
@@ -44,8 +48,8 @@ include::tutorial/import.adoc[]
include::tutorial/recommendations.adoc[]
include::tutorial/neo4j-server.adoc[]
include::tutorial/conclusion.adoc[]
:leveloffset: -1
:leveloffset: 0
[[reference]]
= Reference Documentation
@@ -57,16 +61,13 @@ Its content covers information about the programming model, APIs, concepts, anno
Whenever you look for the means to employ the full power of the Spring Data Neo4j library you find your answers in the reference section. If you don't, please inform us about missing or incorrect content so that we can fix that.
:leveloffset: 1
:numbered!:
:leveloffset: +1
include::reference/preface.adoc[]
:numbered:
:leveloffset: 1
include::reference/neo4j.adoc[]
include::reference/programming-model/programming-model.adoc[]
:leveloffset: 1
include::reference/setup.adoc[]
include::reference/cross-store.adoc[]
include::reference/samples.adoc[]
@@ -74,12 +75,15 @@ include::reference/heroku.adoc[]
include::reference/performance.adoc[]
include::reference/aspectj-details.adoc[]
include::reference/neo4j-server.adoc[]
:leveloffset: -1
:leveloffset: 0
[[appendix]]
= Appendix
:numbered!:
[appendix]
include::{spring-data-commons-docs}/repository-namespace-reference.adoc[]
include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[]
:leveloffset: +1
include::{spring-data-commons-docs}/repository-namespace-reference.adoc[]
include::{spring-data-commons-docs}/repository-populator-namespace-reference.adoc[]
include::{spring-data-commons-docs}/repository-query-keywords-reference.adoc[]
:leveloffset: -1

View File

@@ -1,3 +1,4 @@
[preface]
= About this guide book
== The Spring Data Neo4j Project
@@ -8,7 +9,7 @@ Welcome to the Spring Data Neo4j Guide Book. Thank you for taking the time to ge
It was written by developers for developers. Hopefully we've created a guide that is well received by our peers.
If you have any feedback on Spring Data Neo4j or this book, please provide it via the http://spring.neo4j.org/issues[SpringSource JIRA], the http://spring.neo4j.org/discussion[SpringSource NOSQL Forum], http://github.com/SpringSource/spring-data-neo4j/issues[github comments or issues], or the http://neo4j.org/forums/[Neo4j mailing list].
If you have any feedback on Spring Data Neo4j or this book, please provide it via the http://spring.neo4j.org/issues[SpringSource JIRA], the http://spring.neo4j.org/discussion[SpringSource NOSQL Forum], http://github.com/spring-projects/spring-data-neo4j/issues[github comments or issues], or the http://neo4j.org/forums/[Neo4j mailing list].
== Format of the Book

View File

@@ -1,14 +0,0 @@
= Foreword by Emil Eifrem
"Spring is the most popular middleware on the planet," I thought to myself as I walked up to Rod Johnson in late 2009 at the JAOO conference in Aarhus, Denmark. Rod had just given an introductory presentation about Spring Roo and when he was done I told him "Great talk. You're clearly building a stack for the future. What about support for non-relational databases?"
We started talking and quickly agreed that NOSQL will play an important role in emerging stacks. Now, a year and half later, Spring Data Neo4j is available in its first stable release and I'm blown away by the result. Never before in any environment, in any programming framework, in any stack, has it been so easy and intuitive to tap into the power of a graph database like Neo4j. It's a testament to the efforts by an awesome team of four hackers from Neo Technology and VMware: Michael Hunger, David Montag, Thomas Risberg and Mark Pollack.
The Spring framework revolutionized how we all wrote enterprise Java applications and today it's used by millions of enterprise developers. Graph databases also stand out in the NOSQL crowd when it comes to enterprise adoption. You can find graph databases used in areas as diverse as network management, fraud detection, cloud management, anything with social data, geo and location services, master data management, bioinformatics, configuration databases, and much more.
Spring developers deserve access to the best tools available to solve their problem. Sometimes that's a relational database accessed through JPA. But more often than not, a graph database like Neo4j is the perfect fit for your project. I hope that Spring Data Neo4j will give you access to the power and flexibility of graph databases while retaining the familiar productivity and convenience of the Spring framework.
Enjoy the Spring Data Neo4j guide book and welcome to the wonderful world of graph databases!
Emil Eifrem, CEO of Neo Technology

View File

@@ -1,5 +1,9 @@
= Foreword by Rod Johnson
[preface]
[[foreword]]
= Foreword
[quote, Rod Johnson, Founder of the Spring Framework]
____
Im excited about Spring Data Neo4j for several reasons.
First, this project is in a very important space. We are in an era of transition. A very few years ago, a relational database was a given for storing nearly all the data in nearly all applications. While relational databases remain important, new application requirements and massive data proliferation have prompted a richer choice of data stores. Graph databases have some very interesting strengths, and Neo4j is proving itself valuable in many applications. It's a choice you should add to your toolbox.
@@ -11,6 +15,18 @@ Third, I'm excited about Spring Data Neo4j for personal reasons. I no longer get
Finally, Spring Data Neo4j is part of the broader Spring Data project: one of the key areas in which Spring is innovating to help meet new application requirements. I encourage you to explore Spring Data, and — better still — become involved in the community and contribute.
Enjoy the Spring Data Neo4j book, and happy coding!
____
Rod Johnson, Founder, Spring and SVP, Application Platform, VMware
[quote, Emil Eifrem, CEO of Neo Technology]
____
"Spring is the most popular middleware on the planet," I thought to myself as I walked up to Rod Johnson in late 2009 at the JAOO conference in Aarhus, Denmark. Rod had just given an introductory presentation about Spring Roo and when he was done I told him "Great talk. You're clearly building a stack for the future. What about support for non-relational databases?"
We started talking and quickly agreed that NOSQL will play an important role in emerging stacks. Now, a year and half later, Spring Data Neo4j is available in its first stable release and I'm blown away by the result. Never before in any environment, in any programming framework, in any stack, has it been so easy and intuitive to tap into the power of a graph database like Neo4j. It's a testament to the efforts by an awesome team of four hackers from Neo Technology and VMware: Michael Hunger, David Montag, Thomas Risberg and Mark Pollack.
The Spring framework revolutionized how we all wrote enterprise Java applications and today it's used by millions of enterprise developers. Graph databases also stand out in the NOSQL crowd when it comes to enterprise adoption. You can find graph databases used in areas as diverse as network management, fraud detection, cloud management, anything with social data, geo and location services, master data management, bioinformatics, configuration databases, and much more.
Spring developers deserve access to the best tools available to solve their problem. Sometimes that's a relational database accessed through JPA. But more often than not, a graph database like Neo4j is the perfect fit for your project. I hope that Spring Data Neo4j will give you access to the power and flexibility of graph databases while retaining the familiar productivity and convenience of the Spring framework.
Enjoy the Spring Data Neo4j guide book and welcome to the wonderful world of graph databases!
____

View File

@@ -21,7 +21,7 @@ org.neo4j.server.thirdparty_jaxrs_classes=com.example.mypackage=/my-context
----
====
Running Spring Data Neo4j on the Neo4j Server is easy. You need to tell the server where to find the Spring context configuration file, and which beans from it to expose:
Running Spring Data Neo4j on the Neo4j Server is easy. You need to tell the server where to find the Spring context configuration file, and which beans from it to expose:
.Server plugin initialization
====
@@ -37,7 +37,7 @@ public class HelloWorldInitializer extends SpringPluginInitializer {
----
====
Now, your resources can require the Spring beans they need, annotated with `@Context` like this:
Now, your resources can require the Spring beans they need, annotated with `@Context` like this:
.Jersey resource
====
@@ -64,7 +64,7 @@ NOTE: The Neo4j Server REST API does not allow for transactions to span across r
Please also keep in mind that performing graph operations via the REST-API is about one order of magnitude slower than local operations. Try to use the Neo4j Cypher query language, or server-side traversals (`RestTraversal`) whenever possible for retrieving large sets of data. Future versions of Spring Data Neo4j will use the more performant batch API as well as a binary protocol.
To set up your project to use the REST bindings, add this dependency to your pom.xml:
To set up your project to use the REST bindings, add this dependency to your pom.xml:
.REST-Client configuration - pom.xml
====
@@ -78,7 +78,7 @@ To set up your project to use the REST bindings, add this dependency to your pom
----
====
Now, you set up the normal Spring Data Neo4j configuration, but point the database to an URL instead of a local directory, like so:
Now, you set up the normal Spring Data Neo4j configuration, but point the database to an URL instead of a local directory, like so:
.REST client configuration - application context
====
@@ -99,3 +99,4 @@ Now, you set up the normal Spring Data Neo4j configuration, but point the databa
Your project is now set up to work against a remote Neo4j Server.
For traversals and Cypher graph queries it is sensible to forward those to the remote endpoint and execute them there instead of walking the graph over the wire. SpringRestGraphDatabase already supports that by providing methods that forward to the remote instance. (e.g. `queryEngineFor(), index() and createTraversalDescription()`). Please use those methods when interacting with a remote server for optimal performance. Those methods are also used by the Neo4jTemplate and the mapping infrastructure automatically.

View File

@@ -17,7 +17,7 @@ IDEs not providing full AspectJ support might mark parts of your code as having
Eclipse and STS support AspectJ via the AJDT plugin which can be installed from the update-site listed at http://www.eclipse.org/ajdt/downloads/[http://www.eclipse.org/ajdt/downloads/] (it might be necessary to use the latest development snapshot of the plugin). The current version that does not show incorrect errors is AspectJ 1.6.12 (included in STS 2.8.0), previous versions are reported to mislead the user. Note that AJDT (as of September 2012) requires projects to be rebuild after Eclipse is started to fully support all advanced features.
NOTE: There might be some issues with the eclipse maven plugin not adding AspectJ files correctly to the build path. If you encounter issues, please try the following: Try editing the build path to `include **/*.aj` for the spring-data-neo4j-aspects project. You can do this by selecting "Build Path -> Configure Build Path ..." from the Package Explorer. Then for the `spring-data-neo4j-aspects/src/main/java` add `**/*.aj` to the Included path. When importing a Spring Data Neo4j project into Eclipse with m2e, please make sure the AspectJ Configurator is installed from the following update-site: http://dist.springsource.org/release/AJDT/configurator[http://dist.springsource.org/release/AJDT/configurator]
NOTE: There might be some issues with the eclipse maven plugin not adding AspectJ files correctly to the build path. If you encounter issues, please try the following: Try editing the build path to `+include **/*.aj+` for the spring-data-neo4j-aspects project. You can do this by selecting "Build Path -> Configure Build Path ..." from the Package Explorer. Then for the `spring-data-neo4j-aspects/src/main/java` add `**/*.aj` to the Included path. When importing a Spring Data Neo4j project into Eclipse with m2e, please make sure the AspectJ Configurator is installed from the following update-site: http://dist.springsource.org/release/AJDT/configurator[http://dist.springsource.org/release/AJDT/configurator]
The AspectJ support in IntelliJ IDEA lacks some of the features. JetBrains is working on improving the situation in their upcoming 11 release of their popular IDE. Their latest work is available under their early access program (EAP). Building the project with the AspectJ compiler `ajc` works in IDEA (Options -> Compiler -> Java Compiler should show ajc). Make sure to give the compiler at least 512 MB of RAM.

View File

@@ -3,7 +3,7 @@
This chapter covers the fundamentals of the programming model behind Spring Data Neo4j. It discusses the simple and advanced mapping modes, the annotations provided by Spring Data Neo4j and how to use them. Examples for this section are taken from the "IMDB" project of http://spring.neo4j.org/examples[Spring Data Neo4j examples].
:leveloffset: 3
:leveloffset: +1
include::mapping.adoc[]
include::aspectj.adoc[]
include::simple_mapping.adoc[]
@@ -20,3 +20,4 @@ include::transactions.adoc[]
include::attachdetach.adoc[]
include::typerepresentationstrategy.adoc[]
include::beanvalidation.adoc[]
:leveloffset: -1