Grails Form Builder Plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Grails Form Builder Plugin

Lim Chee Kin
Hi,

the same post was created with the same title in Grails developer forum at http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-td2713996.html.

I am looking for Form Builder Plugin which allow user to create forms from browser without any programming or coding, for example http://wufoo.com/ (may not be that full-scale in term of functionality). I am surprised that I couldn't found any, given maturity of the Grails framework. Do you know any?

I plan to create one if there is no such plugin in the market. Is it feasible to create Form Builder Plugin? What do you think?

Your inputs and ideas is important, please advice.

By the way, you can refer to some plugins developed by me at http://limcheekin.blogspot.com/p/my-grails-plugins.html.

Thank you.

Regards,
Chee Kin
Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

basejump (Josh)
Do you know of any good open source form builders out there? I know of none that are any good.
I have yet to find one that is really usable or that can come close to what can be done with something like jotform or wufoo
I would love to see one that could be integrate with grails. I really think the kung-fu skills that are needed are very much in the UI ninja camp(jquery?) and not so much in the grails camp.
If you and/or others can get a UI put together that gets close to as usable as wufoo or jotform I will gladly help with the grails integration part.


On Sep 30, 2010, at 10:27 PM, Lim Chee Kin wrote:

>
> Hi,
>
> the same post was created with the same title in Grails developer forum at
> http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-td2713996.html.
>
> I am looking for Form Builder Plugin which allow user to create forms from
> browser without any programming or coding, for example http://wufoo.com/
> (may not be that full-scale in term of functionality). I am surprised that I
> couldn't found any, given maturity of the Grails framework. Do you know any?
>
> I plan to create one if there is no such plugin in the market. Is it
> feasible to create Form Builder Plugin? What do you think?
>
> Your inputs and ideas is important, please advice.
>
> By the way, you can refer to some plugins developed by me at
> http://limcheekin.blogspot.com/p/my-grails-plugins.html.
>
> Thank you.
>
> Regards,
> Chee Kin
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2818208.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi there,

Thank you. I am glad that you are offer to help on the Grails integration part.

As commented by Peter at http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tt2713996.html#a2717190, we may build a wizard-based form builder and generate the domain class based on input from user, then use Grails scaffolding to generate the controller and views. The challenge is ... how these generated file get compile and deploy in run-time environment while the application is running? I think to make this plugin feasible we need something like "dynamic compilation" so that the newly generated form will take effect without restart the Grails application. Do you have any ideas on this?
 
By google "open source form builders", I found the following form builders:
1) Orbeon Form Builder (Webcast looking promising) - LGPL license
http://www.orbeon.com/forms/screencast/form-builder
2) Better Form (Look lightweight) -Apache2 license
http://sourceforge.net/projects/betterform/
3) Chiba (Look dated, last release was 2009)-Apache2 license
http://sourceforge.net/projects/chiba/

Wish to hear from you soon!

Regards,
Chee Kin



On Fri, Oct 1, 2010 at 12:00 PM, baseJump-3 [via Grails] <[hidden email]> wrote:
Do you know of any good open source form builders out there? I know of none that are any good.
I have yet to find one that is really usable or that can come close to what can be done with something like jotform or wufoo
I would love to see one that could be integrate with grails. I really think the kung-fu skills that are needed are very much in the UI ninja camp(jquery?) and not so much in the grails camp.
If you and/or others can get a UI put together that gets close to as usable as wufoo or jotform I will gladly help with the grails integration part.


On Sep 30, 2010, at 10:27 PM, Lim Chee Kin wrote:

>
> Hi,
>
> the same post was created with the same title in Grails developer forum at
> http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-td2713996.html.
>
> I am looking for Form Builder Plugin which allow user to create forms from
> browser without any programming or coding, for example http://wufoo.com/
> (may not be that full-scale in term of functionality). I am surprised that I
> couldn't found any, given maturity of the Grails framework. Do you know any?
>
> I plan to create one if there is no such plugin in the market. Is it
> feasible to create Form Builder Plugin? What do you think?
>
> Your inputs and ideas is important, please advice.
>
> By the way, you can refer to some plugins developed by me at
> http://limcheekin.blogspot.com/p/my-grails-plugins.html.
>
> Thank you.
>
> Regards,
> Chee Kin
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2818208.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2825721.html
To unsubscribe from Grails Form Builder Plugin, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
In reply to this post by basejump (Josh)
Fyi, managed to download and install Orbeon Forms in my local tomcat and play around with it. It is using YUI as it's component suite. You can download it's binary and source code from http://forge.ow2.org/projects/ops/ and it is well documented at http://wiki.orbeon.com/forms/doc. I'm impressed. But I don't have any knowledge about XForm, how about you?

Will evaluate Better Form next.

Lastly, did anyone here know about any other open source form builders besides the one listed above?

Regards,
Chee Kin

On Sat, Oct 2, 2010 at 11:45 AM, Chee Kin Lim <[hidden email]> wrote:
Hi there,

Thank you. I am glad that you are offer to help on the Grails integration part.

As commented by Peter at http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tt2713996.html#a2717190, we may build a wizard-based form builder and generate the domain class based on input from user, then use Grails scaffolding to generate the controller and views. The challenge is ... how these generated file get compile and deploy in run-time environment while the application is running? I think to make this plugin feasible we need something like "dynamic compilation" so that the newly generated form will take effect without restart the Grails application. Do you have any ideas on this?
 
By google "open source form builders", I found the following form builders:
1) Orbeon Form Builder (Webcast looking promising) - LGPL license
http://www.orbeon.com/forms/screencast/form-builder
2) Better Form (Look lightweight) -Apache2 license
http://sourceforge.net/projects/betterform/
3) Chiba (Look dated, last release was 2009)-Apache2 license
http://sourceforge.net/projects/chiba/

Wish to hear from you soon!

Regards,
Chee Kin




On Fri, Oct 1, 2010 at 12:00 PM, baseJump-3 [via Grails] <[hidden email]> wrote:
Do you know of any good open source form builders out there? I know of none that are any good.
I have yet to find one that is really usable or that can come close to what can be done with something like jotform or wufoo
I would love to see one that could be integrate with grails. I really think the kung-fu skills that are needed are very much in the UI ninja camp(jquery?) and not so much in the grails camp.
If you and/or others can get a UI put together that gets close to as usable as wufoo or jotform I will gladly help with the grails integration part.


On Sep 30, 2010, at 10:27 PM, Lim Chee Kin wrote:

>
> Hi,
>
> the same post was created with the same title in Grails developer forum at
> http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-td2713996.html.
>
> I am looking for Form Builder Plugin which allow user to create forms from
> browser without any programming or coding, for example http://wufoo.com/
> (may not be that full-scale in term of functionality). I am surprised that I
> couldn't found any, given maturity of the Grails framework. Do you know any?
>
> I plan to create one if there is no such plugin in the market. Is it
> feasible to create Form Builder Plugin? What do you think?
>
> Your inputs and ideas is important, please advice.
>
> By the way, you can refer to some plugins developed by me at
> http://limcheekin.blogspot.com/p/my-grails-plugins.html.
>
> Thank you.
>
> Regards,
> Chee Kin
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2818208.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2825721.html
To unsubscribe from Grails Form Builder Plugin, click here.



Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
In reply to this post by basejump (Josh)
Let's list down some evaluation criteria:
1) Ease of use
2) Performance (How long it take to load the builder and the components)
3) Ease of add-in new custom component
4) Ease of integration to Grails environment

What other criteria can you think of?

Regards,
Chee Kin


On Sat, Oct 2, 2010 at 2:57 PM, Chee Kin Lim <[hidden email]> wrote:
Fyi, managed to download and install Orbeon Forms in my local tomcat and play around with it. It is using YUI as it's component suite. You can download it's binary and source code from http://forge.ow2.org/projects/ops/ and it is well documented at http://wiki.orbeon.com/forms/doc. I'm impressed. But I don't have any knowledge about XForm, how about you?

Will evaluate Better Form next.

Lastly, did anyone here know about any other open source form builders besides the one listed above?

Regards,
Chee Kin

On Sat, Oct 2, 2010 at 11:45 AM, Chee Kin Lim <[hidden email]> wrote:
Hi there,

Thank you. I am glad that you are offer to help on the Grails integration part.

As commented by Peter at http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tt2713996.html#a2717190, we may build a wizard-based form builder and generate the domain class based on input from user, then use Grails scaffolding to generate the controller and views. The challenge is ... how these generated file get compile and deploy in run-time environment while the application is running? I think to make this plugin feasible we need something like "dynamic compilation" so that the newly generated form will take effect without restart the Grails application. Do you have any ideas on this?
 
By google "open source form builders", I found the following form builders:
1) Orbeon Form Builder (Webcast looking promising) - LGPL license
http://www.orbeon.com/forms/screencast/form-builder
2) Better Form (Look lightweight) -Apache2 license
http://sourceforge.net/projects/betterform/
3) Chiba (Look dated, last release was 2009)-Apache2 license
http://sourceforge.net/projects/chiba/

Wish to hear from you soon!

Regards,
Chee Kin




On Fri, Oct 1, 2010 at 12:00 PM, baseJump-3 [via Grails] <[hidden email]> wrote:
Do you know of any good open source form builders out there? I know of none that are any good.
I have yet to find one that is really usable or that can come close to what can be done with something like jotform or wufoo
I would love to see one that could be integrate with grails. I really think the kung-fu skills that are needed are very much in the UI ninja camp(jquery?) and not so much in the grails camp.
If you and/or others can get a UI put together that gets close to as usable as wufoo or jotform I will gladly help with the grails integration part.


On Sep 30, 2010, at 10:27 PM, Lim Chee Kin wrote:

>
> Hi,
>
> the same post was created with the same title in Grails developer forum at
> http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-td2713996.html.
>
> I am looking for Form Builder Plugin which allow user to create forms from
> browser without any programming or coding, for example http://wufoo.com/
> (may not be that full-scale in term of functionality). I am surprised that I
> couldn't found any, given maturity of the Grails framework. Do you know any?
>
> I plan to create one if there is no such plugin in the market. Is it
> feasible to create Form Builder Plugin? What do you think?
>
> Your inputs and ideas is important, please advice.
>
> By the way, you can refer to some plugins developed by me at
> http://limcheekin.blogspot.com/p/my-grails-plugins.html.
>
> Thank you.
>
> Regards,
> Chee Kin
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2818208.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2825721.html
To unsubscribe from Grails Form Builder Plugin, click here.




Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Adam Evans
In reply to this post by Lim Chee Kin
I've played about with creating a form DSL before. Still not happy with what I have but the basics is their.

Create a form such as

form(action:"....") {
  textfield("Name")
  textarea("Address")
  date(label: "Age", format:"dd/MM/yyyy")
  textfield(type: "password", name:"password", label:"Password", description:"Please enter your password")
  ....

  fieldset("My fieldset"){
    select {
       option(label: "A", value:-1)
    }
  }
}

I then have a gsp tag '<form:render form="${form}" />'

This outputs the form in a default format, i like definition lists. My tag also allows me to overide output style: <form:render form="${form}" decorator="com.forms.FieldsetFormDecorator" /> . This would take the same form dsl but render it in a completely different way. This lets me have genericly styled forms simply.

I've then had FormBuilders which can take Domain objects / models to build the form datastructure to pass to my render tag. I've also implemented Form listeners, so when a form is rendered any class implementing FormListerner gets given the Form object to add or change fields as needed...Great for plugin based apps. FormListerners also get a handle on the submit event as well as render event so can perform additional operations when a form is submitted.

Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi Adam,

Great! Can I access to the codes? Any URL?

You mentioned "I've then had FormBuilders which can take Domain objects / models to build the form datastructure to pass to my render tag." How the domain class is created? By the developer?

Regards,
Chee Kin

On Sun, Oct 3, 2010 at 10:40 PM, Adam Evans [via Grails] <[hidden email]> wrote:
I've played about with creating a form DSL before. Still not happy with what I have but the basics is their.

Create a form such as

form(action:"....") {
  textfield("Name")
  textarea("Address")
  date(label: "Age", format:"dd/MM/yyyy")
  textfield(type: "password", name:"password", label:"Password", description:"Please enter your password")
  ....

  fieldset("My fieldset"){
    select {
       option(label: "A", value:-1)
    }
  }
}

I then have a gsp tag '<form:render form="${form}" />'

This outputs the form in a default format, i like definition lists. My tag also allows me to overide output style: <form:render form="${form}" decorator="com.forms.FieldsetFormDecorator" /> . This would take the same form dsl but render it in a completely different way. This lets me have genericly styled forms simply.

I've then had FormBuilders which can take Domain objects / models to build the form datastructure to pass to my render tag. I've also implemented Form listeners, so when a form is rendered any class implementing FormListerner gets given the Form object to add or change fields as needed...Great for plugin based apps. FormListerners also get a handle on the submit event as well as render event so can perform additional operations when a form is submitted.




View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2953232.html
To unsubscribe from Grails Form Builder Plugin, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

basejump (Josh)
In reply to this post by Adam Evans
Adam
So our requirements are not as much for an average users (nice to have) but for our "power users". So it doesn't need to be as easy to use but a DSL might be to heavy to use but ... maybe not. I'm still trying to give DSL's a chance for "power users". If they can figure out how to spin some of the crazy Excel worksheets that I have seen then perhaps a good dsl is not a stretch for  them to maintain.
Adam, I'd love to get a peak at your code if you are opening it up. You have it out on github or a public svn somewhere?

Chee Kin,
here is what I am thinking. GSP might not be practical to generate from a GUI form builder. Freemarker would be easy to do though and presents a lower security risk. Its what we use to allow users to design their own reports and emails.
1. JQuery UI for the builder would be best
2. Has to be simple to setup. I really think that jotform and wufoo are the acid tests. if it comes close to those then it will be good.

Here are a couple I found that could be a good start for the GUI
http://blog.sonuku.com/2009/04/11/php-formbuilder/ -- this one looks great
http://www.berthou.com/us/2009/09/05/dynamic-forms-builder-with-jquery/ -- not as good but another decent example



On Oct 3, 2010, at 9:40 AM, Adam Evans wrote:

>
> I've played about with creating a form DSL before. Still not happy with what
> I have but the basics is their.
>
> Create a form such as
>
> form(action:"....") {
>  textfield("Name")
>  textarea("Address")
>  date(label: "Age", format:"dd/MM/yyyy")
>  textfield(type: "password", name:"password", label:"Password",
> description:"Please enter your password")
>  ....
>
>  fieldset("My fieldset"){
>    select {
>       option(label: "A", value:-1)
>    }
>  }
> }
>
> I then have a gsp tag '<form:render form="${form}" />'
>
> This outputs the form in a default format, i like definition lists. My tag
> also allows me to overide output style: <form:render form="${form}"
> decorator="com.forms.FieldsetFormDecorator" /> . This would take the same
> form dsl but render it in a completely different way. This lets me have
> genericly styled forms simply.
>
> I've then had FormBuilders which can take Domain objects / models to build
> the form datastructure to pass to my render tag. I've also implemented Form
> listeners, so when a form is rendered any class implementing FormListerner
> gets given the Form object to add or change fields as needed...Great for
> plugin based apps. FormListerners also get a handle on the submit event as
> well as render event so can perform additional operations when a form is
> submitted.
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2953232.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi,

Thanks for writings. Please see my response below.

Regards,
Chee Kin

On Thu, Oct 7, 2010 at 10:03 AM, baseJump-3 [via Grails] <[hidden email]> wrote:
Adam
So our requirements are not as much for an average users (nice to have) but for our "power users". So it doesn't need to be as easy to use but a DSL might be to heavy to use but ... maybe not. I'm still trying to give DSL's a chance for "power users". If they can figure out how to spin some of the crazy Excel worksheets that I have seen then perhaps a good dsl is not a stretch for  them to maintain.
Adam, I'd love to get a peak at your code if you are opening it up. You have it out on github or a public svn somewhere?
Yes, I agreed that power user may use "view source" option to edit the form directly using DSL. I am waiting response from Adam too. Wish to hear from you again, Adam.
 

Chee Kin,
here is what I am thinking. GSP might not be practical to generate from a GUI form builder.
I am posted a topic "Dynamic Compilation" in developer forum at http://grails.1312388.n4.nabble.com/Dynamic-Compilation-td2964601.html. Let's see is there any feedback from the developer community.
 
Freemarker would be easy to do though and presents a lower security risk. Its what we use to allow users to design their own reports and emails.
I have no experience/knowledge in Freemarker, thanks for suggestion, I will look into it. I am keep the option open as the plugin is still at feasibility study stage. By the way, as you mentioned about allow user design their own reports, what reporting tool are you using?
 
1. JQuery UI for the builder would be best
Yeah. I am user of JQuery library too. I like it!

2. Has to be simple to setup. I really think that jotform and wufoo are the acid tests. if it comes close to those then it will be good.
Yes, both are good references.


Here are a couple I found that could be a good start for the GUI
http://blog.sonuku.com/2009/04/11/php-formbuilder/ -- this one looks great
Look impressive and lightweight.

http://www.berthou.com/us/2009/09/05/dynamic-forms-builder-with-jquery/ -- not as good but another decent example
Yeah, we can use it for reference. Thanks for your time to search for alternative open source form builders.

I am attempt to connecting all the dots now .... let's summarized points we had discussed so far.
1) JavaScript UI toolkit: JQuery UI, YUI, Dojo.
(JQuery UI is the preferred option at the moment. What do you think about Dojo?)
2) The view layer: GSP, Freemarker, Velocity (What do you think about Velocity from Apache?)
3) Form Builder
a) Orbeon Form Builder - heavyweight (http://www.orbeon.com/forms/screencast/form-builder)
b) jQuery/PHP Form Builder - lightweight (http://dontlink.me/formbuilder/) - Preferred option
4) Persistence Layer
a) A Generic Domain Class to store data of all forms
b) Each form have it own domain class(es) to store the data. (My preferred option, but not sure whether it is practical and technically feasible)

Wish to hear your comments for 4 summarized items above.

Regards,
Chee Kin




On Oct 3, 2010, at 9:40 AM, Adam Evans wrote:

>
> I've played about with creating a form DSL before. Still not happy with what
> I have but the basics is their.
>
> Create a form such as
>
> form(action:"....") {
>  textfield("Name")
>  textarea("Address")
>  date(label: "Age", format:"dd/MM/yyyy")
>  textfield(type: "password", name:"password", label:"Password",
> description:"Please enter your password")
>  ....
>
>  fieldset("My fieldset"){
>    select {
>       option(label: "A", value:-1)
>    }
>  }
> }
>
> I then have a gsp tag '<form:render form="${form}" />'
>
> This outputs the form in a default format, i like definition lists. My tag
> also allows me to overide output style: <form:render form="${form}"
> decorator="com.forms.FieldsetFormDecorator" /> . This would take the same
> form dsl but render it in a completely different way. This lets me have
> genericly styled forms simply.
>
> I've then had FormBuilders which can take Domain objects / models to build
> the form datastructure to pass to my render tag. I've also implemented Form
> listeners, so when a form is rendered any class implementing FormListerner
> gets given the Form object to add or change fields as needed...Great for
> plugin based apps. FormListerners also get a handle on the submit event as
> well as render event so can perform additional operations when a form is
> submitted.
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2953232.html

> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2966090.html
To unsubscribe from Grails Form Builder Plugin, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

basejump (Josh)
It can be done with GSP's. Its just easier for the "user" to put something in that can be malicious or crash the system. 
see 
for a good example go to the the renderMailView method there

On Oct 6, 2010, at 9:53 PM, Lim Chee Kin wrote:

Hi,

Thanks for writings. Please see my response below.

Regards,
Chee Kin

On Thu, Oct 7, 2010 at 10:03 AM, baseJump-3 [via Grails] <<a href="x-msg://73/user/SendEmail.jtp?type=node&amp;node=2966115&amp;i=0" target="_top" rel="nofollow">[hidden email]> wrote:
Adam
So our requirements are not as much for an average users (nice to have) but for our "power users". So it doesn't need to be as easy to use but a DSL might be to heavy to use but ... maybe not. I'm still trying to give DSL's a chance for "power users". If they can figure out how to spin some of the crazy Excel worksheets that I have seen then perhaps a good dsl is not a stretch for  them to maintain.
Adam, I'd love to get a peak at your code if you are opening it up. You have it out on github or a public svn somewhere?
Yes, I agreed that power user may use "view source" option to edit the form directly using DSL. I am waiting response from Adam too. Wish to hear from you again, Adam.
 

Chee Kin,
here is what I am thinking. GSP might not be practical to generate from a GUI form builder.
I am posted a topic "Dynamic Compilation" in developer forum at http://grails.1312388.n4.nabble.com/Dynamic-Compilation-td2964601.html. Let's see is there any feedback from the developer community.
 
Freemarker would be easy to do though and presents a lower security risk. Its what we use to allow users to design their own reports and emails.
I have no experience/knowledge in Freemarker, thanks for suggestion, I will look into it. I am keep the option open as the plugin is still at feasibility study stage. By the way, as you mentioned about allow user design their own reports, what reporting tool are you using?
 
1. JQuery UI for the builder would be best
Yeah. I am user of JQuery library too. I like it!

2. Has to be simple to setup. I really think that jotform and wufoo are the acid tests. if it comes close to those then it will be good.
Yes, both are good references.


Here are a couple I found that could be a good start for the GUI
http://blog.sonuku.com/2009/04/11/php-formbuilder/ -- this one looks great
Look impressive and lightweight.

http://www.berthou.com/us/2009/09/05/dynamic-forms-builder-with-jquery/ -- not as good but another decent example
Yeah, we can use it for reference. Thanks for your time to search for alternative open source form builders.

I am attempt to connecting all the dots now .... let's summarized points we had discussed so far.
1) JavaScript UI toolkit: JQuery UI, YUI, Dojo.
(JQuery UI is the preferred option at the moment. What do you think about Dojo?)
2) The view layer: GSP, Freemarker, Velocity (What do you think about Velocity from Apache?)
3) Form Builder
a) Orbeon Form Builder - heavyweight (http://www.orbeon.com/forms/screencast/form-builder)
b) jQuery/PHP Form Builder - lightweight (http://dontlink.me/formbuilder/) - Preferred option
4) Persistence Layer
a) A Generic Domain Class to store data of all forms
b) Each form have it own domain class(es) to store the data. (My preferred option, but not sure whether it is practical and technically feasible)

Wish to hear your comments for 4 summarized items above.

Regards,
Chee Kin




On Oct 3, 2010, at 9:40 AM, Adam Evans wrote:

>
> I've played about with creating a form DSL before. Still not happy with what
> I have but the basics is their.
>
> Create a form such as
>
> form(action:"....") {
>  textfield("Name")
>  textarea("Address")
>  date(label: "Age", format:"dd/MM/yyyy")
>  textfield(type: "password", name:"password", label:"Password",
> description:"Please enter your password")
>  ....
>
>  fieldset("My fieldset"){
>    select {
>       option(label: "A", value:-1)
>    }
>  }
> }
>
> I then have a gsp tag '<form:render form="${form}" />'
>
> This outputs the form in a default format, i like definition lists. My tag
> also allows me to overide output style: <form:render form="${form}"
> decorator="com.forms.FieldsetFormDecorator" /> . This would take the same
> form dsl but render it in a completely different way. This lets me have
> genericly styled forms simply.
>
> I've then had FormBuilders which can take Domain objects / models to build
> the form datastructure to pass to my render tag. I've also implemented Form
> listeners, so when a form is rendered any class implementing FormListerner
> gets given the Form object to add or change fields as needed...Great for
> plugin based apps. FormListerners also get a handle on the submit event as
> well as render event so can perform additional operations when a form is
> submitted.
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2953232.html

> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2966090.html
To unsubscribe from Grails Form Builder Plugin, click here.




View this message in context: Re: Grails Form Builder Plugin
Sent from the Grails - user mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Yes, I did some reading about Freemarker yesterday and I am understood that the you favor more on Freemarker than GSP with the following reasons:
1. Freemarker do not need compiliation.
2. Most important reason is it doesn't support Scriptlet (better security).
3. Better performance compared with GSP as mentioned in http://grails.1312388.n4.nabble.com/Freemarker-In-A-Grails-App-td1378733.html

Do you have any idea on persistence layer, how to store the form data?

Regards,
Chee Kin
 

On Fri, Oct 8, 2010 at 1:19 AM, baseJump-3 [via Grails] <[hidden email]> wrote:
It can be done with GSP's. Its just easier for the "user" to put something in that can be malicious or crash the system. 
see 
for a good example go to the the renderMailView method there

On Oct 6, 2010, at 9:53 PM, Lim Chee Kin wrote:

Hi,

Thanks for writings. Please see my response below.

Regards,
Chee Kin

On Thu, Oct 7, 2010 at 10:03 AM, baseJump-3 [via Grails] <[hidden email]> wrote:
Adam
So our requirements are not as much for an average users (nice to have) but for our "power users". So it doesn't need to be as easy to use but a DSL might be to heavy to use but ... maybe not. I'm still trying to give DSL's a chance for "power users". If they can figure out how to spin some of the crazy Excel worksheets that I have seen then perhaps a good dsl is not a stretch for  them to maintain.
Adam, I'd love to get a peak at your code if you are opening it up. You have it out on github or a public svn somewhere?
Yes, I agreed that power user may use "view source" option to edit the form directly using DSL. I am waiting response from Adam too. Wish to hear from you again, Adam.
 

Chee Kin,
here is what I am thinking. GSP might not be practical to generate from a GUI form builder.
I am posted a topic "Dynamic Compilation" in developer forum at http://grails.1312388.n4.nabble.com/Dynamic-Compilation-td2964601.html. Let's see is there any feedback from the developer community.
 
Freemarker would be easy to do though and presents a lower security risk. Its what we use to allow users to design their own reports and emails.
I have no experience/knowledge in Freemarker, thanks for suggestion, I will look into it. I am keep the option open as the plugin is still at feasibility study stage. By the way, as you mentioned about allow user design their own reports, what reporting tool are you using?
 
1. JQuery UI for the builder would be best
Yeah. I am user of JQuery library too. I like it!

2. Has to be simple to setup. I really think that jotform and wufoo are the acid tests. if it comes close to those then it will be good.
Yes, both are good references.


Here are a couple I found that could be a good start for the GUI
http://blog.sonuku.com/2009/04/11/php-formbuilder/ -- this one looks great
Look impressive and lightweight.

http://www.berthou.com/us/2009/09/05/dynamic-forms-builder-with-jquery/ -- not as good but another decent example
Yeah, we can use it for reference. Thanks for your time to search for alternative open source form builders.

I am attempt to connecting all the dots now .... let's summarized points we had discussed so far.
1) JavaScript UI toolkit: JQuery UI, YUI, Dojo.
(JQuery UI is the preferred option at the moment. What do you think about Dojo?)
2) The view layer: GSP, Freemarker, Velocity (What do you think about Velocity from Apache?)
3) Form Builder
a) Orbeon Form Builder - heavyweight (http://www.orbeon.com/forms/screencast/form-builder)
b) jQuery/PHP Form Builder - lightweight (http://dontlink.me/formbuilder/) - Preferred option
4) Persistence Layer
a) A Generic Domain Class to store data of all forms
b) Each form have it own domain class(es) to store the data. (My preferred option, but not sure whether it is practical and technically feasible)

Wish to hear your comments for 4 summarized items above.

Regards,
Chee Kin




On Oct 3, 2010, at 9:40 AM, Adam Evans wrote:

>
> I've played about with creating a form DSL before. Still not happy with what
> I have but the basics is their.
>
> Create a form such as
>
> form(action:"....") {
>  textfield("Name")
>  textarea("Address")
>  date(label: "Age", format:"dd/MM/yyyy")
>  textfield(type: "password", name:"password", label:"Password",
> description:"Please enter your password")
>  ....
>
>  fieldset("My fieldset"){
>    select {
>       option(label: "A", value:-1)
>    }
>  }
> }
>
> I then have a gsp tag '<form:render form="${form}" />'
>
> This outputs the form in a default format, i like definition lists. My tag
> also allows me to overide output style: <form:render form="${form}"
> decorator="com.forms.FieldsetFormDecorator" /> . This would take the same
> form dsl but render it in a completely different way. This lets me have
> genericly styled forms simply.
>
> I've then had FormBuilders which can take Domain objects / models to build
> the form datastructure to pass to my render tag. I've also implemented Form
> listeners, so when a form is rendered any class implementing FormListerner
> gets given the Form object to add or change fields as needed...Great for
> plugin based apps. FormListerners also get a handle on the submit event as
> well as render event so can perform additional operations when a form is
> submitted.
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2953232.html

> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2966090.html
To unsubscribe from Grails Form Builder Plugin, click here.




View this message in context: Re: Grails Form Builder Plugin




View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2967233.html
To unsubscribe from Grails Form Builder Plugin, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
In reply to this post by Lim Chee Kin
Re-post advices from Peter that need to take into consideration for design of the plugin:

A lot of this becomes very use case specific. Generally when I generate web apps I allow someone to describe domain objects, relationships and validation rules first. From there I then allow them to describe types of screen (list, add, edit, delete, view, import, export, report, etc) and (for example) the form has a field list which describes which fields they can see and of those which they can edit (some fields may be read only for some types of screens/users). That then keys off the domain classes, relationships, properties and validations so if you have a rich system with 3-4 different admin screens for different use cases for the same domain classes, you don't repeat the data types, field titles, validations, etc. I then provide the ability to override specific metadata nodes for a given form, so if you want firstName.Caption to be "Enter your first name" instead of "First name" you can override that without having to have more than one description of the User.firstName property.

The challenge is that the trade offs between what you want to generate, what and how you want to customize and how you want to support smart defaults that are easy to override are often a matter of personal taste. I've gone back and forth over the years on a lot of these issues and while I've found a set of heuristics that work for myself and most of my clients, they wouldn't work for the next guy down the street who has different concerns.

Generally that's the issue you can run into with a form builder (which, if you do it right actually becomes an app builder). There are lots of pretty contentious decisions to be made in your modeling languages, and if you try to make everyone happy you end up with too large a grammar and code base to be worthwhile.

Best Wishes,
Peter
Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi there!

Thanks for input from all of you.

FYI, I had documented my design idea for the Grails Form Builder plugin at https://docs.google.com/document/edit?id=1RcSV2xVm4MXA85GUk7_7x8W_GpA9-g3J9AJUDAgKCUE&hl=en&authkey=CJbw0MUM

However, I not sure and have no idea how Freemarker fit into architecture of the plugin, please advice.

Your feedback is very important to us and very much appreciated.
Please tell us what is in your mind!

Thanks.

Regards,
Chee Kin
Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi there,

Updated architecture document of the plugin for your reference at http://code.google.com/p/grails-form-builder-plugin/wiki/Architecture

What do you think about it? 

Regards,
Chee Kin

On Wed, Oct 13, 2010 at 12:20 PM, Lim Chee Kin [via Grails] <[hidden email]> wrote:
Hi there!

Thanks for input from all of you.

FYI, I had documented my design idea for the Grails Form Builder plugin at https://docs.google.com/document/edit?id=1RcSV2xVm4MXA85GUk7_7x8W_GpA9-g3J9AJUDAgKCUE&hl=en&authkey=CJbw0MUM

Your feedback is very important to us and very much appreciated.
Please tell us what is in your mind!

Thanks.

Regards,
Chee Kin


View message @ http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p2993072.html
To unsubscribe from Grails Form Builder Plugin, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi there,

Anyone?

Regards,
Chee Kin
Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

virtualeyes
In reply to this post by Adam Evans
In Java/Groovy land it seems that one must take the bean gsp/jsp route (bean builder plugin looks like the best available)

This is fine (although soul draining work) if only coders need to build the form, but what happens when non-coders need/want to modify the form? e.g. custom sort, hide/show fields and the like.

I generally build a drag & drop admin component that allows clients to do just this, but it does split the code-runs-the-show approach present in *rails frameworks.

Even with bean builder it feels like I'm going backwards, why do we save so much time with GORM, only to lose it in GSP content time sink?

An actual form generator like scaffolding, but one that you can modify at run-time would be ideal. It seems dynamic scaffolding is on the Grails road map, will be curious to see what that's about.

At any rate, time to convert drag & drop form builder to Grails, one day I'll actually build something in this rapid devel framework ;--)

Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi there,

bean builder plugin? Any URL?

Fyi, I am working on the client-side JQuery Form Builder plugin at the moment, it is request for comment (RFC) at the moment, please see the complete blog post at http://limcheekin.blogspot.com/2011/01/request-for-comment-jquery-form-builder.html

Regards,
Chee Kin


On Tue, Jan 25, 2011 at 3:58 PM, virtualeyes [via Grails] <[hidden email]> wrote:
In Java/Groovy land it seems that one must take the bean gsp/jsp route (bean builder plugin looks like the best available)

This is fine (although soul draining work) if only coders need to build the form, but what happens when non-coders need/want to modify the form? e.g. custom sort, hide/show fields and the like.

I generally build a drag & drop admin component that allows clients to do just this, but it does split the code-runs-the-show approach present in *rails frameworks.

Even with bean builder it feels like I'm going backwards, why do we save so much time with GORM, only to lose it in GSP content time sink?

An actual form generator like scaffolding, but one that you can modify at run-time would be ideal. It seems dynamic scaffolding is on the Grails road map, will be curious to see what that's about.

At any rate, time to convert drag & drop form builder to Grails, one day I'll actually build something in this rapid devel framework ;--)




If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p3235610.html
To unsubscribe from Grails Form Builder Plugin, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

virtualeyes
Lim, yes, I have been keeping tabs on your plugin; however, I want a form builder for developers, so we can quickly drag/drop, sort form fields, change field type (select to radio or checkbox), and programmatically interact with the form as we create it (i.e. loop through bean elements add css class, inline jquery, field size, etc., etc.). Having a nice form preview with form field widgets as appealing as being able to address the reality (in my mind) that a code-driven-only approach to form generation is inherently limited (not [easily] sortable, field type crudely fixed to data type, int = select, string = input).

Reality is that clients will want to have some control over their site, and that includes form generation -- they don't want to pay you to reorder form fields, change credit card from select list to radio buttons, make first & last name display on one row and the like.

I understand that GSPs are useful for making changes to a live web app., but I am hoping in the not too distant future we will be able to make changes to services and controllers (Beckwith's dynamic controller may already be there) in a deployed app.

*rails frameworks are missing this element, IMO, Formtastic in Rails is the best offering they have, and with Grails, Bean Builder seems to be the most robust to-date.

Think about how enjoyable it is to quickly prototype an app via GORM.  Would it not be pure happiness to generate forms in the same way?  Namely, quickly, and without having to type out anything that looks like a form field (hint: <g: input is already too much typing, the formfield type and corresponding attribs "should" be DB stored and output via plugin or set of grails services, the latter I am working on now)

Enough rambling ;--)
Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

Lim Chee Kin
Hi,

Please see my response below.

Regards,
Chee Kin

On Wed, Jan 26, 2011 at 5:25 PM, virtualeyes [via Grails] <[hidden email]> wrote:
Lim, yes, I have been keeping tabs on your plugin; however, I want a form builder for developers, so we can quickly drag/drop, sort form fields,

Did you try the live demo? These features are supported.
 
change field type (select to radio or checkbox),

This feature is coming soon. Please see the roadmap at http://code.google.com/p/jquery-form-builder-plugin/wiki/Roadmap.

 
and programmatically interact with the form as we create it (i.e. loop through bean elements add css class, inline jquery, field size, etc., etc.). Having a nice form preview with form field widgets as appealing as being able to address the reality (in my mind) that a code-driven-only approach to form generation is inherently limited (not [easily] sortable, field type crudely fixed to data type, int = select, string = input).


Yes, these features is needed for developer, but not so to end-user. By the way, the JQuery Form Builder plugin design is very modular, you can extend it easily to support these features.

 
Reality is that clients will want to have some control over their site, and that includes form generation -- they don't want to pay you to reorder form fields, change credit card from select list to radio buttons, make first & last name display on one row and the like.

I fully agreed with you. By the way, JQuery Form Builder plugin was designed to tackle these features.
 
 
I understand that GSPs are useful for making changes to a live web app., but I am hoping in the not too distant future we will be able to make changes to services and controllers (Beckwith's dynamic controller may already be there) in a deployed app.

*rails frameworks are missing this element, IMO, Formtastic in Rails is the best offering they have, and with Grails, Bean Builder seems to be the most robust to-date.

Think about how enjoyable it is to quickly prototype an app via GORM.  Would it not be pure happiness to generate forms in the same way?  Namely, quickly, and without having to type out anything that looks like a form field (hint: <g: input is already too much typing, the formfield type and corresponding attribs "should" be DB stored and output via plugin or set of grails services, the latter I am working on now)

Yes, the  formfield type and corresponding attribs will be stored in DB for Grails Form Builder plugin. Would you mind to share the works you are doing now? Any URL?


Enough rambling ;--)


If you reply to this email, your message will be added to the discussion below:
http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p3237678.html
To unsubscribe from Grails Form Builder Plugin, click here.

Reply | Threaded
Open this post in threaded view
|

Re: Grails Form Builder Plugin

virtualeyes
and mine below

Lim Chee Kin wrote
Hi,

Please see my response below.

Regards,
Chee Kin

On Wed, Jan 26, 2011 at 5:25 PM, virtualeyes [via Grails] <
ml-node+3237678-274542647-78519@n4.nabble.com<ml-node%2B3237678-274542647-78519@n4.nabble.com>
> wrote:

> Lim, yes, I have been keeping tabs on your plugin; however, I want a form
> builder for developers, so we can quickly drag/drop, sort form fields,


Did you try the live demo? These features are supported.

I did try the demo. The form builder I have in mind would have its initial properties auto-generated by related domain(s), so no need to type again what you already typed to create the domain class itself.  Scaffolding works like this.

> change field type (select to radio or checkbox),


This feature is coming soon. Please see the roadmap at
http://code.google.com/p/jquery-form-builder-plugin/wiki/Roadmap.

It should not be a roadmap task, but just implemented.  Why not a select list containing all possible formfield types (text,radio,select,textarea, etc.)? The whole design a form concept does not really draw me, unless the implementation is not created by me ;--).  I'm after nuts & bolts, a form is a set of fields broken out into rows/cells, as is any report (jqGrid could be used for both for example).


> and programmatically interact with the form as we create it (i.e. loop
> through bean elements add css class, inline jquery, field size, etc.,
> etc.).
> Having a nice form preview with form field widgets as appealing as being
> able to address the reality (in my mind) that a code-driven-only approach
> to
> form generation is inherently limited (not [easily] sortable, field type
> crudely fixed to data type, int = select, string = input).
>
>
Yes, these features is needed for developer, but not so to end-user. By the
way, the JQuery Form Builder plugin design is very modular, you can extend
it easily to support these features.

> Reality is that clients will want to have some control over their site,
> and
> that includes form generation -- they don't want to pay you to reorder
> form
> fields, change credit card from select list to radio buttons, make first &
> last name display on one row and the like.
>

I fully agreed with you. By the way, JQuery Form Builder plugin was designed
to tackle these features.

I like the approach you are taking, particularly the dynamic controller implementation.  Speaking of, having to restart the deployed app. when adding new app. functionality seems a real limitation of JVM compiled "dynamic" apps -- does Ruby/Rails suffer from the same problem?  Coming from PHP (yes, please hold the applause), everything is live (and comparatively slow), so never a need to restart. Too bad PHP lang is such a horrible mess, Groovy is a gift from above ;--)

>
>
I understand that GSPs are useful for making changes to a live web app., but
> I am hoping in the not too distant future we will be able to make changes
> to
> services and controllers (Beckwith's dynamic controller may already be
> there) in a deployed app.
>
> *rails frameworks are missing this element, IMO, Formtastic in Rails is
> the
> best offering they have, and with Grails, Bean Builder seems to be the
> most
> robust to-date.
>
> Think about how enjoyable it is to quickly prototype an app via GORM.
>  Would it not be pure happiness to generate forms in the same way?
> Namely,
> quickly, and without having to type out anything that looks like a form
> field (hint: <g: input is already too much typing, the formfield type and
> corresponding attribs "should" be DB stored and output via plugin or set
> of
> grails services, the latter I am working on now)
>

Yes, the  formfield type and corresponding attribs will be stored in DB for
Grails Form Builder plugin. Would you mind to share the works you are doing
now? Any URL?

Once I get a something demo-able together I will post it here.  Unfortunately, still stuck with PHP for paying Hawaiian rent (pricey!), so am getting Grails app together on the side.

> Enough rambling ;--)
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p3237678.html
>  To unsubscribe from Grails Form Builder Plugin, click
> here<http://grails.1312388.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2818208&code=bGltY2hlZWtpbkB2b2JqZWN0LmNvbXwyODE4MjA4fC0xNTgwMDcyNjQ3>.
>
>
Quoted from:
http://grails.1312388.n4.nabble.com/Grails-Form-Builder-Plugin-tp2818208p3241474.html
12