Frameworks without the XML

I'm so glad someone other than me said this. This is the Steve Nelson is quoted in the latest Teratech Interview:

In my opinion, using XML files to create a new framework programming language has more drawbacks than benefits. The biggest drawback is that the developer needs to learn yet another series of tags and syntax and keywords in order to use a framework

I agree whole-heartedly. I've always been uncomfortable with the fact that I need to learn a new XML dialect to program with the most common CF based frameworks.

Steve says he created a version of the Fusebox framework without any core files or XML configuration. It's entirely based on CFCs.

Unfortunately, I can't find a link to the interview.

Update: Steve's interview was was posted to the webapper blog

Comments
Brian Rinaldi's Gravatar I posted a link to his post on this when he presented it to the Maryland CFUG in one of my open source updates - http://www.webapper.net/index.cfm/2006/11/17/CFCOn...

However, the post notes that nothing was recorded and no files were available yet. On the upside, he did mention that he will present this at the Frameworks conference which is just around the corner (on the downside perhaps, if you are like me, you cannot make it).
# Posted By Brian Rinaldi | 1/24/07 4:05 PM
Matt Woodward's Gravatar Personally I think this is vastly overstated, and really only applies to Fusebox specifically. Mach-II doesn't have all the duplicate functionality re-created in the XML (you don't do "programming" per se in the Mach-II XML file; it's just controller logic), and as for "learning a new XML dialect," there are a mere handful of things in the framework "dialect" that you really need to learn.
# Posted By Matt Woodward | 1/24/07 4:32 PM
Jeffry Houser's Gravatar Brian,

Thanks for the additional link. Yes, i wish I could see Steve's presentation at the conference, but I won't be there.

Matt,

I'm sure that there is more depth to the quote I grabbed. To work with Model-Glue you need to learn the XML dialect. I thought Mach-II and Fusebox used similar approaches.

Are you saying that writing that XML file to define controller logic is not programming? If so, I'm not certain if I agree.
# Posted By Jeffry Houser | 1/24/07 5:21 PM
Peter Bell's Gravatar I haven't yet seen Steve's post, but if I am right, this is just a matter of choice of concrete syntax for a domain specific language between XML and an API for a set of methods. I'll post something on this tonight.
# Posted By Peter Bell | 1/24/07 6:37 PM
Matt Woodward's Gravatar Jeffry--yes, I'm saying that using XML as a declarative way of outlining the event structure of your application isn't really "programming" in my mind. Fusebox is more programming because you have things like conditionals, redirects, etc. in the XML. I guess what I take issue with is the notion that it's so difficult to learn one more small thing (namely the XML syntax) that gives you such a HUGE amount of flexibility in your applications. Making one small change in an XML file that totally changes the flow of an application without touching any of your CFCs or CFML files is pretty powerful stuff.
# Posted By Matt Woodward | 1/24/07 7:40 PM
Peter Bell's Gravatar Matt, I agree 100% that describing your intent in a DSL (i.e. your XML file) can be MUCH more efficient and powerful than using a general purpose programming language to do everything, but I'll disagree with you that it isn't programming. It is true that you're not using a turing complete language and that you don't necessarily have conditionals and loops, but to me programming is the process of describing your intent to other programmers in a way that a computer can execute, so whether you're creating executable UML models doing MDA, writing XML, setting configuratio properties in a config file or writing a method in Java or ColdFusion, it is still programming.
# Posted By Peter Bell | 1/24/07 7:46 PM
Javier Julio's Gravatar Steve Nelson gave his presentation at the MD CF user's group meeting last year. You can download the zip file here: http://www.mdcfug.com/meetings.cfm. You'll see his presentation listed under November 2006. I love the idea behind it as its not based on any XML whatsoever. Don't get me wrong I love XML based frameworks but was nice to see something different that offers us another choice.
# Posted By Javier Julio | 1/24/07 8:29 PM
Peter Bell's Gravatar Choice is good :-> Of course, there is no reason why MG or M2 should be tied to the concrete syntax of an XML file. It'd be a fairly straightforward process to create a syntax that was easier on the eyes and to write a parser and providing full programmatic configuration for the frameworks would also be an option if anyone felt strongly enough about it to go that way.

Although even though I dislike them passionately, there are still plenty of good reasons to use XMl files:

Good reasons to use XML:
http://www.pbell.com/index.cfm/2006/10/4/The-Benef...

And some thoughts on why you might prefer scripting instead:
http://www.pbell.com/index.cfm/2006/10/14/Beyond-t...
# Posted By Peter Bell | 1/24/07 8:34 PM
Matt Woodward's Gravatar Well, I suppose technically if you type code of any sort into an IDE it's programming if you really want to split semantic hairs (which IMO is what's going on here). I don't think that's the point. My point is that, both in this blog post and in Steve's interview, there's the underlying sense of "that stuff's a pain because I have to learn a whole new programming syntax," and I think that's hugely overstated. In Mach-II you have to learn all of about 8 tags.

As programmers we have to learn new things all the time (and should be!) so I don't see why having to deal with a little XML is such a huge deal. It's a powerful, flexible way to solve the problem of configuration files in frameworks.
# Posted By Matt Woodward | 1/25/07 6:38 AM
Peter Bell's Gravatar Agreed. And to use CFCs to do the same as efficiently, you'd STILL need to learn those 8 things - they'd just be method calls instead of XML tags. Only thing unique to XML is the concrete syntax which is mainly around the angle brackets and closing tags and stuff like that which I think most people know already.
# Posted By Peter Bell | 1/25/07 6:59 AM
Joe Rinehart's Gravatar Matt makes a very good point about the differences between the use of XML in Fusebox vs. almost every other CF framework (the "others" from here on).

In the "others," application logic is never declared in XML. In ColdSpring, dependencies are arranged. In Mach-II and Model-Glue, UI gestures are related to controller-tier functions. In Transfer and Reactor, relationships between model objects and database tables are declared.

For all of these tasks, CFML would be a very wordy way to go. It'd certainly be possible, but it would obfuscate the meaning of the text (imagine all the extra <cfset /> statements used to configure a MG app by hand!).

Secondly, XML allows the framework developers to write their own "jargon" that's task specific - which is probably easier to learn than a custom CFC-based API that'd be needed to build an all-CFC framework.
# Posted By Joe Rinehart | 1/25/07 7:30 AM
Steve Nelson's Gravatar I'm going to post the codebase for the app that i'm going to demonstrate at the conference. Of course i need to give the presentation first before i do that.

I hope you all don't think i'm against any of the current frameworks. I think they're great. At the same time I think healthy arguments about how we write applications is a good thing. So please bring a healthy dose of skepticism and find holes in my ideas.
# Posted By Steve Nelson | 1/25/07 1:16 PM
Jeffry Houser's Gravatar I just wanted to add for all interested, Steve's interview was posted to the webapper blog

http://www.webapper.net/index.cfm/2007/1/26/Steve-...
# Posted By Jeffry Houser | 1/26/07 10:33 PM
All Content Copyright 2005, 2006, 2007 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version 5.8.