So with me "abandoning" that CFML book I was writing (Abandonware: "Learn CFML in 24h" notes), I've now got rekindled interest in it. I'm nothing if not contrary.
I've read over what I've done so far and I'm reasonably happy with it as a first draft / general direction sort of thing, but it's also raised some questions.
If you haven't looked, it's currently got these chapter headings (only a few have content: * indicates a first draft of the whole chapter is there; ** means I've started it, but it's incomplete):
- Housekeeping (*)
- Commands/statements/expressions, variables, operators (*)
- Flow control structures (*)
- Built-in types (*)
- OO with CFML (*)
- OO with CFML cont'ed
- Error handling (*)
- Clean code
- The CFML application server, the request/response process & scopes (**)
- Application framework
- Basic database persistence with ORM
- MVC basics
- View logic with CFML tags
- Custom Tags
- Advanced OO
- Advanced DB
- Advanced ORM
- File system / HTTP / FTP
- Functional programming concepts
- Threads and locking
- Java interaction
- Are the chapter breaks for 0-22 in a sensible order? Does anything stand out as being out of place? It's supposed to progress from chapter to chapter, with a subsequent chapter pretty much requiring the framing of one or more of the earlier chapters for it to make sense in context.
- What should I do for chapters 23-24? I am actively omitting a lot of CFML (like
<cfclient>and anything referenced in ColdFusion UI the Right Way). None of that stuff should be in CFML and I'm damned if I will ever encourage anyone to ever use it. Or even make them aware of it. When thinking about this, bear in mind this thing is about CFML (the language), it's not about ColdFusion (the application server). So I'm not interested in stuff that's mostly related to the ColdFusion server (admin, security etc). There's some stuff CFML facilitates like all the PDF manipulation and spreadsheet stuff which is "significant" to CFML, but don't in themselves represent anything "different" in the way one uses CFML. Once one knows how to use functions and tags, one knows how to use said functionality to do PDF stuff or spreadsheet stuff. There's no need to go over it again.
- MVC. Nolan did an excellent presentation at CFSummit about MVC without a framework, which - coincidentally - was where I was gonna start with this, but the more I think about it... the more I think it's just encouraging bad practice to take that approach. If one is doing MVC, one should use a framework. I guess the first bit could be a discussion on the MVC pattern, but I don't want to be writing code that demonstrates a sub-par approach to things. Equally I don't want to regurgitate stuff that I'm sure FW/1 / ColdBox etc already covers much better. What should the narrative approach be here? Sean and Brad, I'd be particularly interested in what you think on this one?
- It irks me that in chapter 0 I encourage readers to save CFM files into a web-browseable directory. That is pretty poor practice, although it's kinda necessary for running small scripts like one will end up with in this book. I don't really want to get into "web sites" too much, but I guess it's innate to CFML usage, and this made me think I ought to mention "do not put your CFML files in a web browseable directory" somewhere. But there's not much to say on that (other than explain why, and what one should do instead). Is there scope for a full "other best practices" chapter? I will already cover most of what I want to say on that in the TDD (might undergo a title change, based on some stuff we're doing on our project now), and Clean Code chapters, but there are perhaps some CFML-specific best practices that ought to be written down?
- Alex was dismayed I changed the slant from Lucee-centric to ColdFusion-centric. I couldn't write it completely Lucee-centric because, well: almost everyone using CFML doesn't use Lucee. And the more I wrote code that needed to run on both, the more Lucee f***ed me off for not being CFML-compliant (their prerogative, and I used to be all for it, but I've changed my mind there). This was more in the CFScript docs I wrote, but it was also impacting me here. But Alex makes a good point in that there's benefit to include Lucee's CFML in all this too. So I thought an appendix? What do you think?
- Anything else I've obviously missed from all this? I've had some pretty CFML-savvy eyes over this thing already, but more eyes would be better.
And... hang on... am not I a PHP developer these days? :-S
Oh, and a special shout out to James Mohler who's dived in and trying his best to help with this thing. And even more so for enduring my idiosyncractic pull request requirements. Cheers fella.