Integration of a Project Domain Model in Neos

Hi!
I 'm working at energiegewinner.de, a cooperative that builds solar power plants.
Our business model is to build power plants (Sun and Wind) and sell shares of them to our Members.
I’ve allready talked to some of you at the webWeekand the inspiringConference this year.

I have to do the relaunch of the web site and display our projects (Details and Overviews).
It will end up in a “shop” for shares of solar power plants. So the domain model contains e.g. how many shares are still available etc. .

I have a “Eg.PvProject” domain model. CRUD-Operations can be done in a Backend Module. That works fine, so far.
My idea is to make a page NodeType Eg.ProjectPage for the project details.
Beside normal content Eg.ProjectPage contains the plugin Eg.ProjectPlugin.
The editors should be able to choose the matching Project in the inspector.
The page has the variable projectReference, in order to persist the related project in the page.
The projectReference should be passed to the showAction of the pluginController, to retrieve the related data.
To choose the project I want to integrate a selectBox in the inspector, filled with the title (as label) and the reference/identifier/path (as value). A dataSource may be used to fill the select box .

The project overview page is the parent of the project pages. It iterates over its children and should be able to access eg. node.name and project.amountOfSharesAvailable in TS and in Fluid.

Questions:

  1. Is that a good way to integrate the domain model data in Neos? Can I do better?
  2. Data Source PHP code, that delivers the references; and the NodeTypes settings and TS to work with it.
  3. Is it possible to fill this select box using eel in the NodeType definition or in TS?
  4. In the ProjectOverviewPage: What has to be done to access project.someDomainModelProperty of the childrenNodes?

Thanks a lot in advance
Klaus

As discussed during Inspiring, take care with domain model (aka doctrine entities), features like workspace and content dimensions are not available and currently the integration in Neos need work from your side (by ex. no simple way to edit doctrine entities in the Neos Inspector)

So my first advise, ask twice if you really need a doctrine entity, or if working only with Node in the CR is not the way to go ? I know it need some brain shift to work with Nodes when we are so used to our relational databases :wink: Without knowing more detail about the data you will store in those model, hard to give you more precise advice.

Did you miss something in the official document about Data Source (http://neos.readthedocs.io/en/stable/ExtendingNeos/DataSources.html?highlight=data%20source) ? Maybe we can improve it ?

See the documentation about Data Source, is basically a PHP class where your standardize data before displaying them in a select box editor (or something else)

Build your Project as NodeType, and use EEL to build the overview on the parent page. I don’t think you need a doctrine entity to store your project. Node should work fine here.

Hi Dominique,

thanks for your Reply. After our short conversation at the conference, I took your good(!) advive to do the most things possible with NodeTypes.
“Projects” have some “Hard Data”, like a product in a shop. Furthermore there are lots of other models attatched to “Project”, in order to do all kind of business calculations (Dry stuff).
Last weekend I read a lot about Flow, and I think I can hack myself through it.

When it works, I’ll post my solution here.
In the whole documentation there is no description, on how to “connect” a destinct domain model to a destinct Node. DDD is a feature of Neos. So, such a simple use case should be explained.