1
votes

I'am new to symfony, even more to symfony cmf. I have project idea and want to get started, but as I'am reading documentation I get more and more confused.

What I need to build is CMS with tree like structure routes and multilingual support for those routes. However I'm confused with this PHPCR stuff as it's new to me and I don't wan't to install java to my server, does that means, I can't use CMF?

I read of Doctrine ORM solution, but didn't find example, clear documentation and there's also 2 more concepts, I can't figure out:

  • doctrine / phpcr-odm
  • jackalope / jackalope-doctrine-dbal

How different they are or maybe they complement each other?

So to summrize the question: If someone could explain me PHPCR, PHPCR-ODM, doctrine-dbal, and tell me can I create CMS using CMF and only MySQL database (I saw note that it's possible load routes from DB) and how would one should approach this problem?

1

1 Answers

1
votes

The PHPCR story is a bit different from what you know from other DB storage systems. That can cause confusion, so let me explain the concepts behind it.

The basic flow chart can be represented as this: basic flow chart

The Application layer is the PHP code that you have written. To put some data in PHPCR, you create a new node (which is like a row in a MySQL db) and inject that into the PHPCR layer. This layer communicates with a jackalope connection, which is bounded to the DB.

If you are using the Doctrine PHPCR-ODM, there is a new layer between the Application layer and the PHPCR layer. You will not use the PHPCR directly, you'll only use it through this Doctrine layer.

The Jackalope layer can have multiple different ways for different DB layers. By now, there are 2 options for the Jackalope layer: Jackrabbit or Doctrine DBAL.
Using the Jackrabbit option, you communicate through Jackalope with a JAVA Jackrabbit DB system. This is the most powerfull, feature-rich and properbly the quickest option.
You can also choose for using Doctrine DBAL. This Jackalope adapter will use the Doctrine DBAL layer to communicate with the DB. Doctrine DBAL can work with most of the relational databases (SQLite, MySQL, Oracle, etc.).

Almost all examples from the Symfony CMF use the Doctrine DBAL version, as it's easier to set-up if you are new into the PHPCR world. Just look at the documentation, sandbox or standard edition for examples.