Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ChrisA

macrumors G5
Original poster
Jan 5, 2006
12,561
1,671
Redondo Beach, California
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?
 

TodVader

macrumors 6502a
Sep 27, 2005
596
0
Quebec, Canada
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.
 

ChrisA

macrumors G5
Original poster
Jan 5, 2006
12,561
1,671
Redondo Beach, California
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.

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.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
I'm sure there is something like this that is in common use.

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.
 

Alain Couthures

macrumors newbie
Jul 17, 2009
2
0
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
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
Because XHTML 2 is dead, I'm now convinced that XForms won't be directly implemented in browsers for several years.

Actually XForms is still moving forward (see item 10).

So I'm happy to have developed XSLTForms

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.
 

Alain Couthures

macrumors newbie
Jul 17, 2009
2
0
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 !
 

avernet

macrumors newbie
Sep 8, 2008
14
2
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.