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:
Goal: Create an extremely lightweight convention over configuration framework. Considerations:
- Automatically call controller, model, view if appropriate
- Autowire from bean factory?
- Programmatically set everything, no XML
variables.frameworkstruct to specify everything
variables.framework.actionis URL / form variable for the, er, action, defaults to
variables.framework.homeis home action, defaults to
main.defaultfold URL / form into request.context
- implicit layouts based on actions
- Should controller / model be instantiated every request or cached?
- How should cache be refreshed?
That’s it. I wrote the first version of FW/1 on July 19th. You can see the original 381 line framework.cfc on Github. So there you go: an insight into my design process!