Form description

8 views
Skip to first unread message

Maximilian Berghoff

unread,
Jul 16, 2015, 6:03:23 AM7/16/15
to symfony-...@googlegroups.com
Hi,

what about implementing some kind of a description of the mapping between a content document and the form to display and edit it in admin tools?
At the moment create our form for Sonata and the frontend editing in seperate ways. Sontata with the FormMapper/FormBuilder, frontend with some kind of rdf files, which are used in the client library. 
So what about creating a xml description for both (and other) use cases? I would suggest to add factory for the sonata admin to create the Symfony and all client side applications (ng-admin/own admin, frontend-editing, maybe an overlay to edit out of the treebrowser) can use them too. I think we would be independent from the implementation of the editing tool then.

Max

David Buchmann

unread,
Jul 16, 2015, 6:35:12 AM7/16/15
to symfony-...@googlegroups.com
hi max,

my thought on sonata is that we should build form types for our
documents, and move as much form-things out of sonata as possible. we
did that in some cases where sonata BCs became a problem.

but indeed that does not cover the frontend really well. i am however
quite afraid of building another meta form framework. i have seen
conference talks on using symfony forms with an angular frontend, to
validate the data. http://de.slideshare.net/aperic/symfony2-and-angularjs

found this experiment which might be helpful (but did not really look
into the code) https://github.com/klaascuvelier/symfony2-angular-forms

if we can find a better way that can replace the rdf-mapping
configuration of createphp, i would be happy. that could be used to know
how to represent editing data in the frontend and a more generic way to
map it back to the model. right now createphp is probably missing out on
the validation symfony form validation would provide.

cheers,david
> --
> You received this message because you are subscribed to the Google
> Groups "symfony-cmf-devs" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to symfony-cmf-de...@googlegroups.com
> <mailto:symfony-cmf-de...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Liip AG // Agile Web Development // T +41 43 500 39 80
CH-8005 Zurich // PGP 0xA581808B // www.liip.ch

Maximilian Berghoff

unread,
Jul 16, 2015, 6:55:26 AM7/16/15
to symfony-...@googlegroups.com
but indeed that does not cover the frontend really well. i am however
quite afraid of building another meta form framework. i have seen
conference talks on using symfony forms with an angular frontend, to
validate the data. http://de.slideshare.net/aperic/symfony2-and-angularjs

found this experiment which might be helpful (but did not really look
into the code) https://github.com/klaascuvelier/symfony2-angular-forms


I will have a look at both examples, looking very interesting atm.  But my point is to define forms only once, to use them in different situations. If there is a way to get the FormBuilder out of the Sontata implementation to use it as described in the talk, it would be one solution, but i don't think we are able to do that. 
Reply all
Reply to author
Forward
0 new messages