Goal: Create an extremely lightweight convention over configuration framework. Considerations:That's it. I wrote the first version of FW/1 on July 19th. You can see the original 381 line framework.cfc on RIAForge. If you click 'Return to SVN History', you'll see the entire history of framework.cfc - with the majority of changes since early November being Ryan Cogswell's awesome contributions. One of the reasons I love version control (and why I was so pleased to see Ray add source / history browsing to RIAForge!). So there you go: an insight into my design process!Caveats:
- Leverage Application.cfc and lifecycle
- Automatically call controller, model, view if appropriate
- Autowire from bean factory?
- Application.cfc extends org.corfield.X
- Programmatically set everything, no XML
- variables.framework struct to specify everything
- variables.framework.action is URL / form variable for the, er, action, defaults to 'action'
- variables.framework.home is home action, defaults to main.default
- fold URL / form into request.context
- ?action=section.item maps to controllers/section.cfc:item() then models/section.cfc:item() then views/section/item.cfm
- implicit layouts based on actions
- Should controller / model be instantiated every request or cached?
- How should cache be refreshed?
FW/1 - The "napkin" spec
February 6, 2010 · 6 Comments
A few folks have asked me to post the "napkin" on which I wrote the spec for FW/1. My "napkin" is actually Evernote because I have it on every computer and my iPhone so it's always with me and it's easy to develop notes with.
I started the spec on July 17th and "finished" it on July 20th. The spec was titled "New Lightweight Framework". Here's what it said:
Tags: coldfusion · fw1 · oss

6 responses so far ↓
1 Lola LB // Feb 7, 2010 at 5:02 AM
2 Mark Phillips // Feb 8, 2010 at 7:46 PM
3 John Allen // Feb 9, 2010 at 3:58 PM
Just released my first production app (internal non public) using FW/1. Working like a charm.
Thanks Sean!
4 Sean Corfield // Feb 11, 2010 at 1:17 PM
5 Joel Cox // Feb 11, 2010 at 1:44 PM
Just taking a quick look through your spec and admiring FW/1 for its grace and simplicity.
One thing I noticed, though, it that the delimiter for a subsystem action is the colon and it seems to be hard-coded that way. We ran into an issue with colons when we used it as the delimiter for Mach-II modules. Certain network appliances (shall remain nameless) deem the colon to be the URL delimiter for port number (and only for the port number) and when they attempted to handle a Mach-II URL with a colon as a module delimiter all hell broke loose. We had a change it to another character to restore order.
Just a suggestion to make the delimiter a configurable parameter.
6 Sean Corfield // Feb 12, 2010 at 4:41 PM
Leave a Comment