Looking for something like xforms

Discussion in 'Web Design and Development' started by ChrisA, Jul 17, 2009.

  1. ChrisA macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #1
    I'm looking to build a web application that will use many forms. I know how to make and use HTML forms. But I want something less labor intensive and easier to maintain.

    I found "xforms" ( http://www.w3.org/MarkUp/Forms/ ) and it looked great but it is not widely supported. Someday maybe browsers will directly support xforms and then I'll use it. What xforms does is allow me to design a form and even some business logic using XML and then when the user submits the form I get back an XML string. All I have to do is maintain the XML files, not much code writing involved.

    So I'm looking for some other way to do this. I want (1) simple declarative forms specification and (2) the data to be returned to my (server based) app as XML

    What is the lightest weight, easiest to learn system for a forms intensive web site?
     
  2. TodVader macrumors 6502a

    TodVader

    Joined:
    Sep 27, 2005
    Location:
    Quebec, Canada
    #2
    I'm not sure if you know PHP but it would be pretty easy to create a class with a sample form and subclass it for different needs.
     
  3. ChrisA thread starter macrumors G4

    Joined:
    Jan 5, 2006
    Location:
    Redondo Beach, California
    #3
    That's the kind of thing I've been doing. My gaol is to reduce the amount of executable code in the app by a factor of 10. Doing this would cut down test time after every version release and have other large impacts on lifecyce cost.
    With xforms all you do is make an XML file that lists the form elements and how they get stuffed into the XML you get when the usre clicks submit. The browser handles the rest. The browser will format the page for mobile device or for audio browsers for the blind. All this with about 12 lines of XML and zero executable code.

    With my own PHP code I have to do things like check if X is in the correct range and put up an error notice. with xforms I simply specify an acceptable range as a feild attribute.

    I'm sure there is something like this that is in common use.
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    Not that I've seen. That's why they're working on xForms. You may want to look at other languages, such as Ruby, which may have some classes that at least reduce the complexity of the validation code.
     
  5. Alain Couthures macrumors newbie

    Joined:
    Jul 17, 2009
    #5
    Because XHTML 2 is dead, I'm now convinced that XForms won't be directly implemented in browsers for several years.

    So I'm happy to have developed XSLTForms (http://www.agencexml.com/xsltforms) which is an opensource client-side implementation based on XSLT 1.0 and Javascript. XSLTForms runs on every recent browser without plug-in or installation. No problem with new versions of browsers because XSLT and Javascript are now well supported. It is now shipped with Mark Logic Server and eXist.

    I'm now using XSLTForms with PHP for one of my customers.

    So don't hesitate to contact me for more information
     
  6. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #6
    Actually XForms is still moving forward (see item 10).

    The big problem with your implementation is it requires JavaScript. That makes it unusable by people who don't have it enabled, like myself. So your solution is unusable as a solution to me. Though it's still an interesting implementation.
     
  7. Alain Couthures macrumors newbie

    Joined:
    Jul 17, 2009
    #7
    Yes, XForms is alive and kicking but many HTML fans hate namespaces... Microsoft is not interested in XForms and I have never heard something about Google and XForms...

    With Javascript disabled, I'm afraid just server implementations will work (Orbeon seems to have this option) because even the Mozilla extension, which is a plug-in, doesn't work without Javascript !
     
  8. avernet macrumors newbie

    Joined:
    Sep 8, 2008
    #8
    Chris,

    This is not the type of thread that I used to follow on the MacRumors forums ;), but hey, since I love and work with XForms I'll chime in. If you are looking at XForms, you should read Nick's blog post from just a few days ago: XForms status update. He describes well the diversity and richness of the XForms implementations out there, amongst which many are free, open source, and enjoy an active community.

    I am working on Orbeon Forms, which is an open source and mostly server-side implementation of XForms running in a Java servlet container (like Tomcat) on the server-side. Feel free to get get in touch with me; I'm always glad to help.

    Cheers,

    Alex
     

Share This Page