orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
518 stars 220 forks source link

Resource persistence layer to support read-write operations for Form Builder #2515

Open avernet opened 8 years ago

avernet commented 8 years ago

Some people would like to have form definitions stored on disk, rather than in a database, but this use case isn't well supported as the resource persistence layer is read-only. This RFE calls for the resource persistence layer to support read-write operations, so it can be used to save and publish forms from Form Builder.

+1 from community

bytesnz commented 8 years ago

Hey Alessandro,

Thanks for putting this up as an RFE. Is this something that you guys would be interested in doing and have time to do. I have had a quick look at the code wondering if I might be able to do some of it, but coming from a non-xml/java background it might be a little beyond me (will keep on investigating though).

One other thing that I have noticed and thought I would bring up here is the formatting (namely indentation and line breaking) of the forms with form builder. I have noticed that the forms are stored with the indentation and line breaks (except in text) removed, but when opened in the editor are nicely formatted. This could be an issue for storing the forms on disk if you like nice formatting. Why is the indentation/breaks removed?

ebruchez commented 8 years ago

Is this something that you guys would be interested in doing and have time to do.

The following general rule applies.

We do have a lot on our plate at this time with some major features we would like to implement. We would be very happy if you worked on it and submitted a patch, but yes that would require some Java knowledge!

I have noticed that the forms are stored with the indentation and line breaks (except in text) removed

I tried this and I don't see whitespace stripping upon saving/publishing right now. Are you using a SQL database or eXist? Where/how did you see the whitespace stripping?

We do have an RFE (#1715) to do this for performance and space reasons as we have noticed that for very large forms, whitespace can amount to several megabytes. We also hope that form definitions almost never need to be edited by hand and so that it shouldn't matter in most cases.

bytesnz commented 8 years ago

I tried this and I don't see whitespace stripping upon saving/publishing right now. Are you using a SQL database or eXist? Where/how did you see the whitespace stripping?

Ah. I have noticed it in a MSSQL server. The place I have noticed it is when a form is opened in form builder, the source code is viewed and edited/replaced and then saved. I noticed that the indentation changes and the comments are moved from being on their own line to being included at the start of next line that is not a comment.

ebruchez commented 8 years ago

Got it, thanks. We will have to check this with SQL Server. It might be an issue specific to that database.

avernet commented 8 years ago

+1 from community

ebruchez commented 8 years ago

I have split out the formatting question to #2584.