Ray asked during our developer meeting today if .NET had any tools like JAXB. The Soapsuds Tool looks to be similar, although it certainly doesn’t appear to have as many features. But I think Ray was asking the wrong question. A CFC is approximately equal to a JavaBean in structure, so where JAXB for ColdFusion? Who’s creating a CFC generation tool? CFCZone.org would be the reasonable place to start but they’re still in startup mode (ie: no content). XML parsing is certainly easier in CF than it is in Java, so maybe it’s a moot point, but nonetheless it could be helpful to have a XML to CFC generator.
.NET XML Serialization looks a lot like JAXB. I haven’t worked enough with either to give many details, but IIRC, in .NET you can customize the XML bindings by annotating your class with attributes (instead of writing a schema document). Pretty handy.
I’m not sure how useful a xml to cfc generator would be since CF’s CFCs are so ‘lose’ already (ie, you don’t need to use a setter, and we don’t call setters automatically.) That being said, if you did use setX/getX for your CFCs, the tool would save you a bit of typing. Hmmm, now, if it would also go from CFC to XML, it could be cool. I’ll try this when I’m spending a few hours at the airport this week. 😉
I’ve been going crazy revising my Code Generator tool to build the common CRUD pieces embedded within a CFC. The structure it needs to create the code can either come from an XML packet, a CSV string, or from an actual “sniff” of the database by scanning system tables and such.
The CFC part is finished, I’m adding the ability to create a Fusebox3 framework in addition (or instead).
Also, the tool supports other languages as well. I’m getting ready to add PHP as I type this.
The CFC generation is still limited – it only generates what it sees at a DB table structure level. But, that’s still a huge time saver.