Skip to content

Conversation

@asiragusa
Copy link
Contributor

Thanks

@dbu
Copy link
Member

dbu commented Aug 8, 2014

interesting!
the page is in french only, right? is this planned to be an open source project or a commercial one? nothing wrong with commercial, and i am happy to link to it - but we should then adjust this page a bit, i guess have a "License" information on each entry, so we can say that this one is commercial.

@asiragusa
Copy link
Contributor Author

I am going to translate the main website to english, as a French webpage is not suitable for an OpenSource project, more precisely it is GPL v3, as ExtJS imposes me this kind of license. The main repo of the project is here https://github.com/togucms/ToguCMS/.

As I said in doctrine/phpcr-odm#538 (comment) I still have to simplify the install, as it takes a good number of steps to do it, and to work on some examples, as actually I have just published an hello world.

I think that the most interesting part are the TemplateBundle and the GeneratorBundle. https://github.com/togucms/TemplateBundle and https://github.com/togucms/GeneratorBundle

The former compiles in PHP and JS a template written with a syntax very similar to the AngularJS one. It takes in input a Symfony CMF Page object and recursively renders the tree of related objects. The feature that makes it really powerful is that every time a variable is rendered in JS, the related component is informed of the element id and he creates the correct updater for that. This updater listens the model for the change events and when a variable changes, immediately writes back the changes to the DOM. AngularJS does more or less the same, but this is more efficient as we never need to compare the old model with the new one, as an event is fired only when a field has changed. Take a look at https://github.com/togucms/Frontend/blob/master/core/Template.js, https://github.com/togucms/Frontend/blob/master/core/model/Model.js, https://github.com/togucms/Frontend/tree/master/core/updater, https://github.com/togucms/Frontend/blob/master/core/component/Component.js and https://github.com/togucms/Frontend/blob/master/core/container/Container.js.

Some of the events you can see are never fired by the Frontend, the trick is that the admin interface hooks the RootModel and therefore the child models that are created afterwards. This allows us to inspect (and draw) in real time the tree structure of the models so we can fire events and change values into the model.

All this may look complex, but the developer is almost never directly faced to this mechanism, as he has only to worry about the template, the JS Component and the model config file.

The GeneratorBundle prepares the Doctrine-PHPCR models (from which are generated the ExtJS ones) and the Frontend ones. It's nothing special in terms of code, as it just uses twig to render the generated classes, but it makes gain a lot of time when developing a website.

I may say in few words that if you develop a website with Togu you will find many concepts used in AngularJS for the Frontend development, BUT it gives you out of the box a full working Backend and a WYSIWYG UI to edit your contents. Togu may be a small revolution in terms of website development.

Feel free to give it a try, until now I have developed all this alone, so all kind of ideas and help are really welcome!

@dbu
Copy link
Member

dbu commented Aug 8, 2014

sounds very cool! we need to get the word out on this :-)

i agree that an english presentation would help, and also having some sort of documentation explaining installation, usage and the concepts and how to customize things.

dbu added a commit that referenced this pull request Aug 8, 2014
@dbu dbu merged commit a67edc7 into phpcr:master Aug 8, 2014
@asiragusa
Copy link
Contributor Author

Here are some slides I have done: http://fr.slideshare.net/AlessandroSiragusa1/togu

I am working on all this, I will update the Github repo as long as I will have written all that. I am also working on a live demo so that it will be easier to test the interface and a Docker container to make it easier to put the hands on.

I will write a post on the mailinglist as long as all this will be ready

@dantleech
Copy link
Member

Do you think you could mention that you use PHPCR on the webpace somewhere? (maybe add the logo to the technologies section?)

@asiragusa
Copy link
Contributor Author

Yep, for sure. I'll do that asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants