Skip to content
Marcin Szczepanski edited this page Nov 15, 2013 · 15 revisions

Why FW/1? Read the introductory blog post to learn more about the framework.

Presentations

FW/1 v2.2

FW/1 v2.0

FW/1 v1.0

Some Interesting discussions on Google Groups

Please note that some of the older discussions may refer to doController which was not officially supported and later changed to Controller. There may be additional changes made in newer versions so always refer to the Reference Manual when in doubt - these posts are just to help you get an idea on what direction to go.

Full list of methods called automatically when FW/1 is asked for section.item

  1. controllers/section.cfc:before()
  2. controllers/section.cfc:startitem()
  3. controllers/section.cfc:item()
  4. services/section.cfc:item()
  5. (any service calls that were added via the service() API call)
  6. controllers/section.cfc:enditem()
  7. controllers/section.cfc:after()

URL Rewrites

Apache/ISAPI Rewrite Rules for SES URLs without the index.cfm

Options +FollowSymlinks
RewriteEngine On

# exclude files from rewriting
RewriteCond %{REQUEST_FILENAME} !-f
# exclude directories from rewriting
RewriteCond %{REQUEST_FILENAME} !-d
# exclude static files
RewriteCond %{REQUEST_URI} !^.*\.(bmp|css|gif|htc|html?|ico|jpe?g|js|pdf|png|swf|txt|xml)$

# rewrite rules, NS skips rewrite rule for internal sub-requests
# for FW/1, removes index.cfm from the URL
RewriteRule ^(.*)$ /index.cfm/$1 [NS,L]

# sends 404 to the same action as onMissingView
ErrorDocument 404 /index.cfm?action=public:error.notfound 

** Resin (Railo Express) conf for SES URLs without the index.cfm** rein.conf

<host>
...
 <rewrite-dispatch>
<!-- http://caucho.com/resin-3.1/doc/rewrite-tags.xtp -->
<dispatch regexp="\.(jsp|cfm|cfc|php|gif|css|jpg|png)" />
<dispatch regexp="^/railo-context/" />
<forward regexp="^/(.*)" target="/index.cfm/$1" />
 </rewrite-dispatch> 

Object Factories

Here are some great ColdSpring resources to get you thinking about bean factories, when you're ready, compliments of Brian Rinaldi, Brian Kotek and Kevan Stannard:

Also see: DI/1 is a very lightweight, convention over configuration, dependency injection (inversion of control) framework for ColdFusion