Semantic web meets frontend-awesomeness

6.8.2012
I repost some of my blog posts made @ liip. Please see here for the original post and comments: https://blog.liip.ch/archive/2012/08/06/semantic-web-meets-frontend-awesomeness.html

Frontend editing is a hot topic at the moment. With the HTML5 content-editable, there is no longer any excuse to reload a page in edit mode and render forms on server side. And even less to use the iframe mess of traditional WYSIWYG editors. One excellent frontend editing project is create.js. Its main strength is to use RDF annotations in HTML (RDFa) to explain the semantic structure of your content. Then you load create.js and tell it what editors to use for your entities. Storage happens based on backbone.js, the server backend is easy to implement.

The Symfony CMF was using parts of create.js for a while with the LiipVieBundle. At the recent create.js hackathon, I pushed the upgrade of LiipVieBundle further, there are only a few things missing to be able to merge this update. The next important step will be migrating to the createphp library. This library allows to define RDF mappings for your domain model classes, much like Doctrine does for database storage. Where in the current LiipVieBundle RDF information was both hardcoded in the template and done by the model class, there is now a clean separate concept that you can add on top of everything, and template editors no longer need to know about RDF details. After this pull request is merged, we will probably rename LiipVieBundle to LiipCreateBundle to make the naming more clear.



Using createphp as a Symfony bundle was an interesting experience. I wanted to put as much of the code into the library rather than the Symfony2 bundle, so that it can be used by all, not only by the Symfony2 users. Finally I managed to put all except the Symfony glue code into the library. Updating the actual bundle was mainly removing obsolete code - the real work was adding a twig extension and the RDF data loader system to createphp.

Thanks a lot to @flack for his patience when discussing my numerous pull requests.


To see create.js in full action (backed by simple php code using createphp), visit demo.contentcontrol-berlin.de/.

symfony javascript create.js cmf