Skip to main content

Loving CFMX 7 Forms

After working heavily with the new forms capabilities in CFMX 7 for the past week or so, I want to personally thank the ColdFusion product engineers for the hard work in this area. This is by far the biggest productivity gain to ColdFusion in quite a while, and when a huge productivity gain like this is added to a tool that already beats the pants of its competitors for productivity, then the competitors better look out!


Since most of what I've been working on lately involves file uploads I've been focusing on the XML forms (XForms) and this is seriously cool stuff. I can finally just worry about the form elements themselves and not spend all my time doing formatting of the display. Not having to create HTML tables for the layout of my forms is a huge time saver, and the flexibility of being able to apply a different skin to my forms makes them extremely reusable. I can definitely see grabbing forms from one app and sticking them into another and just applying a new skin, whereas before it was often more of a pain than it was worth to reuse forms because of all the changes that would be necessary.


Bottom line: CFMX 7 completely rocks for working with forms. Flash Forms are cool as well, but even if you aren't a fan of those, you seriously need to check out XForms. Power, flexibility, and separation of the form elements from their presentation makes for a happy developer!


Comments


Agreed, i loathe FLASH Forms.. but damn well near worship the XML Forms + XLST!


I haven't looked into these much yet, but can you do file upload with Flash Forms, and if so, are there any File Upload Progress bars for the form? That has been a huge complaint in the past... having no idea how long an upload will take?


Nope, currently you can't do file uploads with Flash Forms. This is a limitation of the Flash player itself--it doesn't allow for file uploads. It's a frequently-requested feature to be added to the Flash player though, so I bet we'll see this eventually.


Are the XForms compatible with all browsers? Last time I read about them (a while ago) they weren't.


Yes, the XForms that CF generates are compatible with all browsers (no plugin needed) because CF generates standard HTML/CSS stuff on the server side before it's delivered to the user.


I don't think we will see file upload capability in the flash player any time soon. It potentially creates a HUGE security issue. You can do file uploads from flash with a little bit of javascript and the willingness to use a pop-up window. It's not the most elegent solution, but it gets the job done.


Not sure why it creates more of a security issue than any other file upload ... if it worked the same as a regular HTML file upload I don't see what the issue would be. If nothing else it could prompt the user like when a Flash movie tries to access your camera or microphone. I also don't think it'll be that long until it's in there. File upload capabilities are already built into Central so I wouldn't be surprised if it gets into the next version of the Flash player.


Ahh, after looking into it, I was getting XForms confused with the W3C's XForms (http://www.w3.org/MarkUp/Forms/2003/xforms-for-html-authors.html). Theirs is the one not compatible with many browsers currently. Once it's supported, it will really change the way forms are created.


Chris--CFMX 7 generates XForms-compliant XML when you use cfform format="xml". You can then apply a "skin" to this XForms-compliant XML, and that's what transforms the XML into HTML. You can grab the XML that CF generates and use it as straight XForms code, however, so the CF forms *do* comply with the W3C XForms standard.


Matt, thanks for the clarification. I just tested it out, and works as you said. Pretty cool!


I'd love to see real life code examples of your XForms.


I have an article that should be up on Fusion Authority before long that gives a simple example. When I finish up our CFUG web site I'll be sharing the code for that whole application and it has quite a few XForms in it.


For anyone else that comes across this entry looking for good examples, Here is the article that Matt mentioned in the comment above.

Comments

Popular posts from this blog

Installing and Configuring NextPVR as a Replacement for Windows Media Center

If you follow me on Google+ you'll know I had a recent rant about Windows Media Center, which after running fine for about a year suddenly decided as of January 29 it was done downloading the program guide and by extension was therefore done recording any TV shows.

I'll spare you more ranting and simply say that none of the suggestions I got (which I appreciate!) worked, and rather than spending more time figuring out why, I decided to try something different.

NextPVR is an awesome free (as in beer, not as in freedom unfortunately ...) PVR application for Windows that with a little bit of tweaking handily replaced Windows Media Center. It can even download guide data, which is apparently something WMC no longer feels like doing.

Background I wound up going down this road in a rather circuitous way. My initial goal for the weekend project was to get Raspbmc running on one of my Raspberry Pis. The latest version of XBMC has PVR functionality so I was anxious to try that out as a …

Setting Up Django On a Raspberry Pi

This past weekend I finally got a chance to set up one of my two Raspberry Pis to use as a Django server so I thought I'd share the steps I went through both to save someone else attempting to do this some time as well as get any feedback in case there are different/better ways to do any of this.

I'm running this from my house (URL forthcoming once I get the real Django app finalized and put on the Raspberry Pi) using dyndns.org. I don't cover that aspect of things in this post but I'm happy to write that up as well if people are interested.

General Comments and Assumptions

Using latest Raspbian “wheezy” distro as of 1/19/2013 (http://www.raspberrypi.org/downloads)We’lll be using Nginx (http://nginx.org) as the web server/proxy and Gunicorn (http://gunicorn.org) as the WSGI serverI used http://www.apreche.net/complete-single-server-django-stack-tutorial/ heavily as I was creating this, so many thanks to the author of that tutorial. If you’re looking for more details on …

The Definitive Guide to CouchDB Authentication and Security

With a bold title like that I suppose I should clarify a bit. I finally got frustrated enough with all the disparate and seemingly incomplete information on this topic to want to gather everything I know about this topic into a single place, both so I have it for my own reference but also in the hopes that it will help others.Since CouchDB is just an HTTP resource and can be secured at that level along the same lines as you'd secure any HTTP resource, I should also point out that I will not be covering things like putting a proxy in front of CouchDB, using SSL with CouchDB, or anything along those lines. This post is strictly limited to how authentication and security work within CouchDB itself.CouchDB security is powerful and granular but frankly it's also a bit quirky and counterintuitive. What I'm outlining here is my understanding of all of this after taking several runs at it, reading everything I could find on the Internet (yes, the whole Internet!), and a great deal…