Skip to main content

skip to main content

developerWorks  >

developerWorks Interviews: Dan McCreary on XForms

Making applications run elegantly in a Web browser

developerWorks
Document options

Document options requiring JavaScript are not displayed


Rate this page

Help us improve this content


Level: Introductory

Scott Laningham (scottla@us.ibm.com), Podcast Editor, IBM developerWorks

05 Jun 2007

XML and metadata consultant Dan McCreary explains what XForms is, why it is a strategic technology, and recommends learning resources.

developerWorks: You're listening to developerWorks interviews, where we feature conversations with technical luminaries and thought leaders from a variety of disciplines on topics of interest to technology professionals. I'm your host, Scott Laningham. I'm joined today by Dan McCreary, who is an XML and meta data consultant in Minnesota. He's here to talk with us about XForms. Dan, thanks for doing this today.

McCreary: Scott, thank you for having me.

Dan McCreary on XForms

Be sure to listen to this interview.

developerWorks: So you'd better start it off right at the top here by defining XForms for us a bit, if you would. It's a hot term, but I'm just vaguely familiar with what it means. So could you do that?

McCreary: Absolutely. XForms in the broadest sense is a standard document, a recommendation document, sent out by the W3C, the World Wide Web Consortium. And it's a standard, it really defines the meaning of 21 tags that you'd stick in a Web file. It's not a huge standard. And what it is, it's a set of abstractions for defining a form that sits inside of a Web page.

developerWorks: OK.

McCreary: Things that you'd see on a typical form, you know, "Please enter your name and e-mail address, and address and ZIP code." All those things are things you see in a typical form, but the problem is that the original Web wasn't really designed to handle forms elegantly. It was designed to handle pages and the links between pages.

And people have kind of retrofitted a lot of these forms into the old Web infrastructure. And XForms is a whole new take on that. It's actually more than — a lot more than just forms. It's almost how applications can live and live elegantly inside of your Web browser.

Guest: Dan McCreary

Dan McCreary heads a technology strategy development consulting firm that helps organization use advanced metadata publishing techniques to achieve their Service Oriented Architectures (SOA), Web services, business intelligence and semantic Web projects. He founded Integrity Solutions, recognized in 1997 by City Business as one of the fastest growing companies in Minnesota. Integrity Solutions was sold to Vance Opperman's Key Technologies in 1998 and is now part of the WAM!NET Professional Services division. His career has taken him through the fields of solid state physics, computer chip design, supercomputing, working with Steve Jobs and NeXT Computer, and founding his own consulting firm in 1992. He has a strong reputation for writing and presenting to a broad audience of executives and managers on topics ranging from software development technologies to Web marketing strategies.

developerWorks: Very cool. Now, how would you describe the need for XForms? I often think in this program, when we're talking with people about different technologies and new paradigms you might say, what demanded XForms? I mean, you're speaking to that a little bit, but maybe you could go into that a bit more.

McCreary: Absolutely. So what's happened was that people wanted to do things, enter data and validate data, check to make sure that when you type in an e-mail address it's a correct syntax, make sure that there's the right number of characters and certain things, send you a list of things to pick from.

And what happened was that the retrofits that happened just started to be a lot of work. They didn't do everything people wanted to do, and so what people had to do was start to write JavaScript, which is a scripting language that runs in browsers, to do things they wanted to do. And this JavaScript has started to get more and more complicated, and now you see these typical, what we call the Web 2.0 applications, things that have really high-quality kind of feeling that allow you to do interesting things like Google Maps, send a huge amount of JavaScript into the browser.

And it takes a long time. There's differences between the browsers. And basically, you have to be an expert on this JavaScript language, and people who just want to design a form or generate a form automatically from a requirements that the users give, they have to learn all this JavaScript, and it's just gotten to be harder and harder, and fewer and fewer people can be good at it.

developerWorks: Right. OK.

McCreary: And a good example is Gmail, Google Mail. That's a pretty complicated application, but it took teams of developers writing JavaScript to make it work. And the people are saying, "Gee, why can't we make it easy to build those things?"

And what they did is, actually this has been going on for, I don't know, maybe five, six, seven years. And what they wanted to do was make sure they're all consistent with the other emerging standards that are coming out. And now people can build those things pretty easily.

developerWorks: Now, what about the origins of XForms? Can you tell us a little bit about how it came about, or you know, who was working on this concept?

McCreary: Yes, in fact, that's kind of an interesting thing because it has taken a lot longer than most people wanted it to do.

Basically around 2000 people were working ... or a little before that, were working on a standard, and what they found was that they need a lot of things, data types. And they started to invent these data types, and they realized there was a parallel effort called XML schema that also was doing data types.

And then, but XML Schema got done first and then they said, "Gee, rather than reinvent all these data types things for dates and integers and things, why don't we try to make these standards work together? Let's use the same set of data types."

And they kind of scrapped that whole effort and then redid it all, so that it's much more consistent with the XML schema data types. And schemas, the best way to describe it, it's a model of your data. It tells you what data, what order, what types, what are required for a form to be valid. And so those standards now go hand in hand.

The other thing that has happened is that the standards called stylesheets, things that define a global look and feel for your Web site — maybe the color, the margins, the borders, all of those things. Those standards started to mature dramatically.

And so now XForms can use both XML schema and stylesheets so that all your forms can have a very, very consistent look and feel, and you can change one file and all of those will change. Say if you wanted to change the margin on your forms, you can change it in one spot and all your forms would change. So the nice thing about XForms is really is that it fits beautifully with all the emerging Web standards.

developerWorks: You know, Dan — obviously, this is something you're very passionate about, but is, maybe speak a bit more if you would about kind of the cool factor about XForms in your mind.

McCreary: Yes, you know, I think the best metaphor that I like is, when you walk into a building and it's a beautifully designed building, you know, it really works, it functions well. It feels great to live in it. That's kind of what I love about XForms: Its architecture, its overall design. Architects that have been building complex Web applications have been trying to struggle with a specific way of putting things together. It's often known as MVC or Model View Controller architecture. And just to put some human terms on that, Model is what the data that you're going to be sending in from the form, View is what you see on the screen, and Control is kind of how they're all glued together.

And the problem is that old Web standards just didn't take into account good architecture. They just kind of, you had to stuff variables into JavaScript areas, and there wasn't any way to put them all in one spot so when you hit that Save button, everything just went out of your form perfectly.

developerWorks: Right.

McCreary: And XForms does all that for you. It just takes the burden off it. And there's a couple of things. First of all, you don't have to learn JavaScript. You can build all these XForms just by entering these 21 tags, or if you have a picture drawing tool that draws schemas, you can convert those pictures directly into the forms.And so everything that's required by the stylesheet will highlight them as required, maybe a red asterisk next to those. Things that are optional will be displayed slightly differently.

And so it makes it accessible to nonprogrammers. And then all this little, the detail things to make forms really work well, so if you have one field that depends on another field, or maybe something that's only relevant if a certain [valid is checked], that's all done for you automatically, too. So it just makes the process of building high-quality forms much easier.

developerWorks: Now, you said it also makes some of this accessible more to maybe nontraditional programmer types. Just how difficult is it to learn? What's the basis of prerequisite knowledge you need to have?

McCreary: You know, I'd say there's going to ... I have to address that in two levels. One is, if you're a Web programmer and you're familiar with HTML tags, all you have to do is learn basically about a dozen new tags and you can build these forms.

developerWorks: OK.

McCreary: But there's another level that's starting happening, and that's, it's part of a really much broader change that's happening in the computer industry. And the name I'll give to that is called declarative programming. The declarative means focusing on what you want the forms to do, not how you want them to do it. Declarative says that "I'm going to just give you a spec and I'm going to draw pictures for that spec. I'm not going to be a programmer. I'm going to just tell you what I want to capture. And I want you to go do it." And that's called declarative programming. And that's the big thing that's happening, and XForms is kind of a piece of that. It's not the whole picture.

But what it means is that with the right software, a business unit can draw pictures ... and they need to go through a little bit of training so they know what the pictures mean. And then click a button and it generates the forms.

And what's empowering is that they don't have to be dependent on a group of Java™, or Perl, or PHP programmers to make changes. If they change ... if they say, "Well, we changed our mind, we want to change our requirement. That field that used to be optional; we now need to make that required." They go in and they change the picture, they click a few buttons, they regenerate the forms. And everything through the system is updated. And so what that does is that changes the power structure. That means that the people who used to be in control of changing the business rules, kind of the programmers, kind of are out of the loop.

And that's going to make XForms really drive into the separate business units that haven't bene getting their requirements done timely by a central IT department. So XForms is really part of that declarative movement.

developerWorks: Now, maybe that should lead into this question here: Where should people go to start learning more about it? Do you have some good resource that you'd like to point them to?

McCreary: Yes. You know, there's starting to be some really good ones. It's still a relatively new technology, so you're not going to see a ton of books on it yet, although there are a couple of them out there.

But the biggest thing that's happened just recently is Firefox has an extension called the XForms extension. And you can load that, that takes about a minute to download and set up, make sure to restart your browser. And then you can start displaying the forms. And one of the best things I suggest is just go into your favorite search engine, Google or whatever, and just type in XForms demos, or maybe XForms tutorial, or XForms cookbook. And you'll start to see a lot of sample forms out there. A lot of these forms are in open source wiki projects, and I've been pretty active at helping build one on the wiki books site. And all you really need is Notepad, you can copy the things into Notepad and save them as XHTML files.

And then you can start to change these forms. And you can start out with some small ones, then start to build more elaborate ones. The smaller ones are just a single page where you're using fields and pick lists, dropdown lists. And the more elaborate ones are very complex multipart forms, where wizards are asking you questions. And then navigating to the right part of the form based on how you answered.

But you can start out very small and then grow from there. And then eventually build some tools around that so that it works with the rest of your environment.

developerWorks: Of course, I'll put in our plug for the developerWorks site, because if you go to ibm.com/developerworks and just type in XForms in the site search engine, a number of articles will come up about XForms as well.

McCreary: Absolutely. You know, I have to just put in a plug for developerWorks. I'm not an IBM employee, but I have to tell you that our development team when we just typed in XForms tips, I think we have over 100 and some tips, very specific tips on XForms. And I think the last count there was over 6,000 articles on the developerWorks site that dealt with XForms. So there's a lot of great information there starting from very simple things into complex things.

And then you can get your feet wet with using the XForms, the Firefox extension and then use other tools after that. There's a lot of different ways to deploy this stuff, and it's very important for people to realize that XForms really is an abstract specification of a form, and that there's probably 100 different ways to deploy those forms. You can do it on a client, you can do it in the server, you can do it with JavaScript; there's actually JavaScript programs that will run directly in your Internet Explorer® that will render the forms. There's even Flash versions that will run.

So just start to learn the abstractions and then based on your business requirements you can pick different deployment options later on.

developerWorks: Thank you, Dan, for supporting my plug on developerWorks. You know more about what's on our site with XForms than I do [LAUGHTER].

McCreary: It's a great resource. Very handy to have.

developerWorks: Let me ask you a couple of quick wrapup things here. You know, where is XForms in terms of a fully mature technology right now? Are there some limitations? Are we not quite all the way there yet with it?

McCreary: Yes, absolutely. Anybody who goes into this should certainly have an awareness of where they are. XForms as a recommendation happened just, I believe it was last year that it fully went into recommendation status. And after it goes into recommendation, people start to build implementations. The Firefox extension I'd say is, they call it the Point 7 release, so it's about 70 percent done. And most of the simple forms run without any problems on it.

We're loading some pretty complicated forms, and as things get complicated as you get very large documents, and we have I think over 250 data elements in our forms, so you can see that they're pretty complicated. We're pushing the envelope there and running into a few things.

But IBM does have developers working on that, and that extension. And then there are some other products. But there are a few little annoyances that you still have to drop into JavaScript for.

One of my best examples is I think every form that I see that does shopping carts have currency amounts that needed to be displayed. And one good example is there's no way to format currency, these dollar signs and commas, with a stylesheet. Stylesheets just quite, aren't quite there, powerful enough to do that. So you have to drop into JavaScript to go and format these currencies. Now, a lot of people are worried about that. They want to make those little things easier. And so I think the next versions of XForms are going to take those into account. And there's a technology called bindings, XML bindings, that will bind things like a currency amount or maybe date formatting with something that's going to make it much easier in the future.

But the key thing is, you're going to be writing 10 lines of JavaScript, not 1,000 lines. So just be aware of those things, and look at it carefully.

I think in the next two years, you're going to see not just a lot more XForms tools, but you're going to see entire systems built with XForms and also further tightly coupled to vertical industries.

I think IBM has some very powerful demonstrations with their native XML database that really do solve industry specific problems. And the thing is because these industries have XML schemas or the models defined for their data, and you can generate the forms directly from those models, they already have forms that are ready to go. And when you hit Save, it goes right into their native XML database. And it completely eliminates all that middle tier Java or Visual Basic® or .NET code. So it's really very, very transformative in its ability to change the way we do things. So XForms and native XML databases and things are really going to change the world a lot in the next two years. I think this is a very hot area that really empowers non programmers to take charge of their data.

developerWorks: You probably already answered this and spoken to it thoroughly throughout this thing, but kind of as a wrapup thought here. There are so many technologies and new approaches and things that are coming along, you know, all the time. And everybody can't keep up with everything. But it sounds like XForms is one of those things that people really need to learn more about and to learn how to use. So where would you put it on the grand scheme of things in terms of importance?

McCreary: You know, I'd say, and one of the metaphors I like to use is, evolution kind of happened not just at a continuous process but in huge changes. You know, the [Camberin] explosion is a good example where there's a huge explosion of new technologies, and it really has a huge impact.

I think in the next five years, we're going to see an explosion of declarative systems — systems that allow people to draw pictures and generate pretty complicated functionality just from those pictures.

And you're not going to be required to know these really huge .... One of the ironic things about Java is, Java is a fantastic, flexible language, but there's now I think over 10,000 class libraries that come with Java. And what people are saying is that less is more. The fewer things you have to learn the more empowered people can be. And the easier it is to build a little graphical tool.

So I think the thing that people should really watch carefully is this movement towards declarative languages, and to be aware of those, and to figure out how you're going to solve business problems with a smaller language rather than using one language that does everything.

And that's going to really have a huge impact in the future. So I say keep an eye on that declarative space, look at the way that XML and XForms and XML standards are all kind of working together to solve complete problems. And you're going to be well off after that.

developerWorks: Valuable stuff. Thanks for sharing these views on XForms with us today, Dan. Great to have you on the podcast.

McCreary: Thank you very much, Scott. And you have a great day.

developerWorks: Our guest again has been XML and metadata consultant Dan McCreary. Dan's Web site is easy to remember: danmcreary.com. I've included that link in the show notes for this podcast, as well as other helpful links on XForms. Find the show notes at ibm.com/developerworks/podcast. Also be sure to check out our new developerWorks space on XForms, which pulls together feature stories, forms, podcasts, a technical library, a lot of great stuff around XForms, all in one portlet-style Web page. There's a link to that space in the show notes as well, or you can find it listed at ibm.com/developerworks/spaces. That's it for this edition of developerWorks interviews. I'm Scott Laningham. Talk to you next time.



Resources



About the author

Scott Laningham

Scott Laningham, host of developerWorks podcasts, was previously editor of developerWorks newsletters. Prior to IBM, he was an award-winning reporter and director for news programming featured on Public Radio International, a freelance writer for the American Communications Foundation and CBS Radio, and a songwriter/musician.




Rate this page


Please take a moment to complete this form to help us better serve you.



 


 


Not
useful
Extremely
useful
 


Share this....

digg Digg this story del.icio.us del.icio.us Slashdot Slashdot it!



Back to top